/* Glow Tournament — Teoxane-inspired palette: deep slate-purple, white
   hairline accents, geometric sans headings. Scoped under .gt-body so it
   never leaks into the rest of a WordPress theme. */

.gt-body {
	--gt-ink-900: #1E1C29;
	--gt-ink-800: #2E2C3D;
	--gt-ink-700: #3D3A4E;
	--gt-slate-600: #4B4A5E;
	--gt-slate-500: #6F6C89;
	--gt-lilac-400: #8C8AA0;
	--gt-lilac-300: #A99FC7;
	--gt-lilac-200: #B7ACD6;
	--gt-cream-100: #D8D4C8;
	--gt-white: #FFFFFF;
	--gt-success: #8FBF9F;
	--gt-danger: #D98B8B;
	--gt-radius: 14px;
	--gt-font-display: 'Poppins', 'Century Gothic', 'Futura', sans-serif;
	--gt-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	/* Used inside rgba() for hairline borders / hover tints so the dark
	   theme can relight them without touching every call site. */
	--gt-ink-rgb: 75, 74, 94;
	--gt-lilac-rgb: 140, 138, 160;
	--gt-page-bg: #FFFFFF;

	font-family: var(--gt-font-body);
	color: var(--gt-ink-900);
	background: var(--gt-page-bg);
}

.gt-body * { box-sizing: border-box; }

.gt-body a { text-decoration: none; color: inherit; }

.gt-empty-note { color: var(--gt-slate-500); font-style: italic; }

/* ---------- Banner ---------- */

.gt-banner {
	position: relative;
	padding: 72px 32px 56px;
	--gt-banner-gradient: linear-gradient(135deg, var(--gt-slate-600) 0%, var(--gt-ink-800) 65%, var(--gt-ink-900) 100%);
	background-image: var(--gt-banner-desktop, var(--gt-banner-gradient));
	background-size: cover;
	background-position: var(--gt-banner-desktop-pos, center);
	color: var(--gt-white);
	overflow: hidden;
}

/* Admin can upload a separate crop for phones — swapped in purely via
   CSS var() fallback chains so it needs no JS/picture-element device
   detection; if no mobile image was uploaded it just keeps the
   desktop one (and that keeps falling back to the plain gradient). */
@media (max-width: 640px) {
	.gt-banner {
		background-image: var(--gt-banner-mobile, var(--gt-banner-desktop, var(--gt-banner-gradient)));
		background-position: var(--gt-banner-mobile-pos, var(--gt-banner-desktop-pos, center));
	}
}

.gt-banner__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(30, 28, 41, 0.35) 0%, rgba(30, 28, 41, 0.85) 100%);
}

.gt-banner__content {
	position: relative;
	z-index: 1;
	max-width: 1080px;
	margin: 0 auto;
	text-align: left;
}

.gt-banner-edit-btn {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(30, 28, 41, 0.45);
	color: #FFFFFF;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease;
}

.gt-banner-edit-btn:hover { background: rgba(30, 28, 41, 0.72); }

.gt-banner-modal-preview {
	width: 100%;
	aspect-ratio: 3 / 1;
	border-radius: 10px;
	background-size: cover;
	background-position: center;
	background-color: rgba(var(--gt-ink-rgb), 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
	border: 1px solid rgba(var(--gt-ink-rgb), 0.14);
}

.gt-banner-modal-preview__empty { color: var(--gt-slate-500); font-size: 13px; }

.gt-banner-modal-hint {
	margin: -8px 0 14px;
	font-size: 12px;
	color: var(--gt-slate-500);
}

.gt-banner-slot {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid rgba(var(--gt-ink-rgb), 0.1);
}

.gt-banner-slot:last-of-type { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.gt-banner-slot__title {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--gt-slate-500);
}

.gt-banner-modal-preview--mobile {
	max-width: 190px;
	aspect-ratio: 9 / 16;
	margin-left: auto;
	margin-right: auto;
}

.gt-banner-modal-preview--mobile-landscape { aspect-ratio: 2 / 1; }

.gt-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 40px;
}

.gt-logo__mark { display: inline-flex; }

.gt-logo__text {
	font-family: var(--gt-font-display);
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
}

.gt-eyebrow {
	font-family: var(--gt-font-display);
	font-size: 14px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gt-lilac-200);
	margin: 0 0 8px;
}

.gt-title {
	font-family: var(--gt-font-display);
	font-size: clamp(36px, 6vw, 58px);
	line-height: 1.05;
	margin: 0 0 20px;
}

.gt-title__thin { font-weight: 400; display: block; }
.gt-title__bold { font-weight: 700; display: block; }

.gt-tagline {
	font-size: 16px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
	max-width: 480px;
	margin: 0 0 36px;
}

.gt-meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
}

.gt-meta-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	font-weight: 500;
}

.gt-meta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.35);
	font-size: 14px;
}

/* ---------- Categories grid ---------- */

.gt-categories {
	max-width: 1080px;
	margin: 0 auto;
	padding: 56px 32px 72px;
}

.gt-section-title {
	font-family: var(--gt-font-display);
	font-size: 26px;
	font-weight: 600;
	margin: 0 0 28px;
	color: var(--gt-ink-800);
}

.gt-category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 22px;
}

.gt-category-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px;
	border-radius: var(--gt-radius);
	background: var(--gt-white);
	border: 1px solid rgba(var(--gt-ink-rgb), 0.12);
	box-shadow: 0 1px 3px rgba(30, 28, 41, 0.06);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.gt-category-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 24px rgba(30, 28, 41, 0.12);
	border-color: var(--gt-lilac-300);
}

.gt-category-card__top {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.gt-category-card__title {
	font-family: var(--gt-font-display);
	font-size: 19px;
	font-weight: 600;
	margin: 0;
	color: var(--gt-ink-900);
}

.gt-category-card__format {
	font-size: 13.5px;
	color: var(--gt-slate-500);
	margin: 0;
}

.gt-category-card__stats {
	display: flex;
	justify-content: space-between;
	font-size: 12.5px;
	color: var(--gt-slate-500);
}

/* ---------- Badges ---------- */

.gt-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.02em;
	background: rgba(var(--gt-lilac-rgb), 0.14);
	color: var(--gt-slate-600);
}

.gt-badge--status.gt-badge--open { background: rgba(143, 191, 159, 0.18); color: #3E7A54; }
.gt-badge--status.gt-badge--closed { background: rgba(217, 139, 139, 0.18); color: #A24545; }

/* ---------- Progress bar ---------- */

.gt-progress-bar {
	height: 8px;
	border-radius: 999px;
	background: rgba(var(--gt-ink-rgb), 0.12);
	overflow: hidden;
}

.gt-progress-bar__fill {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--gt-lilac-300), var(--gt-slate-600));
	transition: width 0.4s ease;
}

.gt-progress-summary {
	margin-bottom: 28px;
}

.gt-progress-summary__row {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 14.5px;
	margin-bottom: 10px;
}

.gt-deadline { color: var(--gt-slate-500); }

/* ---------- Tournament information ---------- */

.gt-tournament-info {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 32px 72px;
}

.gt-tournament-info__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.gt-tournament-info__header .gt-section-title { margin-bottom: 0; }
.gt-tournament-info__header .gt-btn { width: auto; }

.gt-info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1px;
	background: rgba(var(--gt-ink-rgb), 0.12);
	border: 1px solid rgba(var(--gt-ink-rgb), 0.12);
	border-radius: var(--gt-radius);
	overflow: hidden;
}

.gt-info-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: var(--gt-white);
	padding: 18px 20px;
}

.gt-info-label {
	font-family: var(--gt-font-display);
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--gt-slate-500);
}

.gt-info-value {
	font-size: 17px;
	font-weight: 600;
	color: var(--gt-ink-900);
}

.gt-info-description {
	margin-top: 28px;
	padding: 24px 28px;
	background: var(--gt-white);
	border: 1px solid rgba(var(--gt-ink-rgb), 0.12);
	border-radius: var(--gt-radius);
}

.gt-info-description h3 {
	font-family: var(--gt-font-display);
	font-size: 15px;
	margin: 0 0 10px;
	color: var(--gt-slate-500);
}

.gt-info-description p {
	font-size: 15px;
	line-height: 1.7;
	color: var(--gt-ink-800);
	margin: 0;
}

/* ---------- Admin controls ---------- */

.gt-admin-toolbar {
	display: flex;
	gap: 10px;
	margin-top: 28px;
	flex-wrap: wrap;
}

.gt-btn.gt-btn--admin {
	padding: 10px 16px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	background: rgba(255, 255, 255, 0.1);
	color: var(--gt-white);
	font-family: var(--gt-font-display);
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	width: auto;
}

.gt-btn.gt-btn--admin:hover { background: rgba(255, 255, 255, 0.2); }

.gt-admin-toolbar--inline { margin-top: 14px; }

.gt-btn.gt-btn--admin.gt-btn--dark {
	background: var(--gt-ink-900);
	border-color: var(--gt-ink-900);
	color: var(--gt-white);
}

.gt-btn.gt-btn--admin.gt-btn--dark:hover { opacity: 0.85; background: var(--gt-ink-900); }

.gt-admin-note {
	font-size: 12.5px;
	color: var(--gt-slate-500);
	background: rgba(var(--gt-lilac-rgb), 0.1);
	padding: 8px 10px;
	border-radius: 8px;
	margin: -8px 0 16px;
}

.gt-category-card__admin {
	display: flex;
	gap: 8px;
	margin-top: 4px;
	padding-top: 12px;
	border-top: 1px dashed rgba(var(--gt-ink-rgb), 0.15);
}

.gt-icon-btn {
	font-family: var(--gt-font-body);
	font-size: 12.5px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid rgba(var(--gt-ink-rgb), 0.2);
	background: var(--gt-white);
	color: var(--gt-slate-600);
	cursor: pointer;
}

.gt-icon-btn:hover { background: rgba(var(--gt-lilac-rgb), 0.1); }

.gt-icon-btn--danger { color: #A24545; border-color: rgba(217, 139, 139, 0.4); }
.gt-icon-btn--danger:hover { background: rgba(217, 139, 139, 0.1); }

.gt-icon-btn--small {
	padding: 3px 8px;
	font-size: 11px;
}

/* ---------- Modal ---------- */

.gt-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(30, 28, 41, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;
}

.gt-modal {
	background: var(--gt-white);
	border-radius: var(--gt-radius);
	width: 100%;
	max-width: 460px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 24px;
	font-family: var(--gt-font-body);
	color: var(--gt-ink-900);
}

.gt-modal__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 18px;
}

.gt-modal__header h3 {
	font-family: var(--gt-font-display);
	font-size: 19px;
	margin: 0;
}

.gt-modal__close {
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--gt-slate-500);
	padding: 4px;
}

.gt-modal__form label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 14px;
}

.gt-modal__form input,
.gt-modal__form select,
.gt-modal__form textarea {
	display: block;
	width: 100%;
	margin-top: 5px;
	padding: 9px 11px;
	border-radius: 8px;
	border: 1px solid rgba(var(--gt-ink-rgb), 0.25);
	font-size: 14px;
	font-family: var(--gt-font-body);
	box-sizing: border-box;
}

.gt-modal__form textarea {
	min-height: 100px;
	resize: vertical;
	line-height: 1.5;
}

.gt-modal__form input:focus,
.gt-modal__form select:focus,
.gt-modal__form textarea:focus {
	outline: none;
	border-color: var(--gt-slate-600);
}

/* ---------- Floating bottom nav ---------- */

body.gt-body { padding-bottom: 96px; }

.gt-bottom-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 20px;
	z-index: 500;
	display: flex;
	justify-content: center;
	padding: 0 24px;
	box-sizing: border-box;
	pointer-events: none;
}

.gt-bottom-nav__inner {
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 1080px;
	background: var(--gt-white);
	border: 1px solid rgba(var(--gt-ink-rgb), 0.1);
	border-radius: 999px;
	padding: 8px 10px;
	box-shadow: 0 12px 32px rgba(30, 28, 41, 0.16);
}

.gt-bottom-nav__brand-wrap { position: relative; flex-shrink: 0; }

.gt-bottom-nav__brand {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	color: var(--gt-slate-600);
	border-radius: 50%;
	transition: background 0.15s ease;
}

.gt-bottom-nav__brand--btn:hover { background: rgba(var(--gt-lilac-rgb), 0.15); }

.gt-bottom-nav__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	gap: 9px;
	height: 48px;
	padding: 0 18px;
	border-radius: 999px;
	border: none;
	background: transparent;
	color: var(--gt-slate-600);
	font-family: var(--gt-font-display);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.gt-bottom-nav__item:hover { background: rgba(var(--gt-lilac-rgb), 0.12); color: var(--gt-ink-900); }

.gt-bottom-nav__item--active {
	background: var(--gt-lilac-300);
	color: var(--gt-white);
	font-weight: 600;
}

.gt-bottom-nav__item--active:hover { background: var(--gt-lilac-300); color: var(--gt-white); opacity: 0.9; }

.gt-bottom-nav__icon { display: inline-flex; line-height: 1; flex-shrink: 0; }

.gt-bottom-nav__popup-wrap { position: relative; display: flex; flex: 1; }
.gt-bottom-nav__popup-wrap .gt-bottom-nav__item { width: 100%; }

.gt-categories-popup {
	position: absolute;
	bottom: calc(100% + 14px);
	left: 50%;
	transform: translateX(-50%);
	width: 260px;
	max-height: 320px;
	overflow-y: auto;
	background: var(--gt-white);
	border-radius: var(--gt-radius);
	box-shadow: 0 16px 40px rgba(30, 28, 41, 0.25);
	padding: 8px;
}

.gt-categories-popup__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 11px 12px;
	border-radius: 10px;
	text-decoration: none;
	color: var(--gt-ink-900);
}

.gt-categories-popup__item:hover { background: rgba(var(--gt-lilac-rgb), 0.1); }

.gt-categories-popup__name {
	font-family: var(--gt-font-display);
	font-size: 13.5px;
	font-weight: 600;
}

.gt-categories-popup__rating {
	font-size: 11.5px;
	color: var(--gt-slate-500);
	white-space: nowrap;
}

.gt-categories-popup__empty {
	padding: 14px;
	margin: 0;
	color: var(--gt-slate-500);
	font-size: 13px;
	text-align: center;
}

@media (max-width: 640px) {
	.gt-bottom-nav__item { padding: 0 10px; font-size: 12.5px; gap: 6px; }
}

@media (max-width: 430px) {
	.gt-bottom-nav__item .gt-bottom-nav__label { display: none; }
	.gt-bottom-nav__item { padding: 0 14px; }
}

/* ---------- Footer ---------- */

.gt-footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
	padding: 32px 24px;
	color: var(--gt-slate-500);
	font-size: 13px;
	border-top: 1px solid rgba(var(--gt-ink-rgb), 0.12);
}

.gt-footer__mark { display: inline-flex; color: var(--gt-lilac-400); }

/* ---------- Category subheader ---------- */

.gt-subheader {
	position: relative;
	--gt-banner-gradient: linear-gradient(135deg, var(--gt-slate-600), var(--gt-ink-800));
	background-image: var(--gt-banner-desktop, var(--gt-banner-gradient));
	background-size: cover;
	background-position: var(--gt-banner-desktop-pos, center);
	color: var(--gt-white);
	padding: 28px 32px;
	overflow: hidden;
}

@media (max-width: 640px) {
	.gt-subheader {
		background-image: var(--gt-banner-mobile, var(--gt-banner-desktop, var(--gt-banner-gradient)));
		background-position: var(--gt-banner-mobile-pos, var(--gt-banner-desktop-pos, center));
	}
}

.gt-subheader__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(30, 28, 41, 0.45) 0%, rgba(30, 28, 41, 0.82) 100%);
}

.gt-subheader__inner {
	position: relative;
	z-index: 1;
	max-width: 1080px;
	margin: 0 auto;
}

.gt-subheader__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.gt-subheader__mark { display: inline-flex; color: rgba(255, 255, 255, 0.55); flex-shrink: 0; }

.gt-back-link {
	display: inline-block;
	font-size: 13.5px;
	color: rgba(255, 255, 255, 0.75);
}

.gt-back-link:hover { color: var(--gt-white); }

.gt-category-heading h1 {
	font-family: var(--gt-font-display);
	font-size: clamp(26px, 4vw, 36px);
	margin: 0 0 12px;
}

.gt-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.gt-subheader .gt-badge { background: rgba(255, 255, 255, 0.14); color: var(--gt-white); }
.gt-subheader .gt-badge--status.gt-badge--open { background: rgba(143, 191, 159, 0.28); color: #D3F0DC; }
.gt-subheader .gt-badge--status.gt-badge--closed { background: rgba(217, 139, 139, 0.28); color: #F5D6D6; }

/* ---------- Tabs ---------- */

.gt-category-main {
	max-width: 1080px;
	margin: 0 auto;
	padding: 32px 32px 72px;
}

.gt-tabs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-bottom: 1px solid rgba(var(--gt-ink-rgb), 0.15);
	margin: 0 0 32px;
}

.gt-tab {
	font-family: var(--gt-font-display);
	font-size: 15px;
	font-weight: 500;
	padding: 14px 18px;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	color: var(--gt-slate-500);
	cursor: pointer;
	flex-shrink: 0;
	white-space: nowrap;
}

.gt-tab.is-active {
	color: var(--gt-ink-900);
	border-bottom-color: var(--gt-slate-600);
}

.gt-tab-panel[hidden] { display: none; }

/* ---------- Registration ---------- */

.gt-registration-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 28px;
	align-items: start;
}

@media (max-width: 760px) {
	.gt-registration-grid { grid-template-columns: 1fr; }
}

.gt-team-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.gt-team-card {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	padding: 16px;
	border-radius: var(--gt-radius);
	background: var(--gt-white);
	border: 1px solid rgba(var(--gt-ink-rgb), 0.12);
}

.gt-team-card .gt-player-slot { flex: 1 1 160px; min-width: 0; }

.gt-team-card__admin { display: flex; gap: 8px; flex-shrink: 0; }

.gt-player-slot--empty { opacity: 0.75; }

.gt-avatar.gt-avatar--empty {
	width: 44px;
	height: 44px;
	border: 1.5px dashed rgba(var(--gt-ink-rgb), 0.35);
	color: var(--gt-slate-500);
	font-size: 20px;
	font-weight: 400;
	background: transparent;
}

.gt-player-name--tbd { color: var(--gt-slate-500); font-style: italic; font-weight: 500; }

.gt-player-slot { display: flex; align-items: center; gap: 12px; }

.gt-avatar {
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--gt-white);
	font-family: var(--gt-font-display);
	font-weight: 600;
	font-size: 15px;
	flex-shrink: 0;
}

.gt-player-info { display: flex; flex-direction: column; min-width: 0; }

.gt-player-name {
	font-weight: 600;
	font-size: 14.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gt-player-rating { font-size: 12.5px; color: var(--gt-slate-500); }

.gt-signup-card {
	position: sticky;
	top: 24px;
	padding: 24px;
	border-radius: var(--gt-radius);
	background: var(--gt-white);
	border: 1px solid rgba(var(--gt-ink-rgb), 0.12);
}

.gt-signup-card h3 {
	font-family: var(--gt-font-display);
	margin: 0 0 18px;
	font-size: 18px;
}

.gt-signup-card fieldset {
	border: none;
	padding: 0;
	margin: 0 0 18px;
}

.gt-signup-card legend {
	font-family: var(--gt-font-display);
	font-size: 12.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--gt-slate-500);
	margin-bottom: 10px;
}

.gt-optional-tag {
	text-transform: none;
	font-weight: 400;
	letter-spacing: normal;
	color: var(--gt-slate-500);
	opacity: 0.85;
}

.gt-signup-card label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 10px;
	color: var(--gt-ink-800);
}

.gt-signup-card label[hidden] { display: none; }

.gt-signup-card input,
.gt-signup-card select {
	display: block;
	width: 100%;
	margin-top: 5px;
	padding: 9px 11px;
	border-radius: 8px;
	border: 1px solid rgba(var(--gt-ink-rgb), 0.25);
	font-size: 14px;
	font-family: var(--gt-font-body);
	background: var(--gt-white);
	color: var(--gt-ink-900);
}

.gt-signup-card input:focus,
.gt-signup-card select:focus {
	outline: none;
	border-color: var(--gt-slate-600);
}

.gt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 12px 16px;
	border-radius: 999px;
	border: none;
	font-family: var(--gt-font-display);
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

.gt-banner-actions { margin-top: 20px; }
.gt-banner-actions .gt-btn { width: auto; }

.gt-btn__icon { display: inline-flex; margin-right: 8px; }

.gt-btn--primary {
	background: var(--gt-ink-900);
	color: var(--gt-white);
}

.gt-btn:hover { opacity: 0.88; }
.gt-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.gt-form-message {
	margin-top: 12px;
	font-size: 13px;
	padding: 10px 12px;
	border-radius: 8px;
}

.gt-form-message--error { background: rgba(217, 139, 139, 0.15); color: #A24545; }
.gt-form-message--success { background: rgba(143, 191, 159, 0.18); color: #3E7A54; }

.gt-empty-state {
	padding: 20px;
	border-radius: var(--gt-radius);
	background: rgba(var(--gt-lilac-rgb), 0.08);
	color: var(--gt-slate-600);
}

.gt-empty-state--panel {
	max-width: 480px;
	margin: 40px auto;
	text-align: center;
}

/* ---------- Draw / bracket ---------- */

.gt-draw-stage { margin-bottom: 40px; }
.gt-draw-stage:last-child { margin-bottom: 0; }

.gt-draw-stage__title {
	font-family: var(--gt-font-display);
	font-size: 18px;
	font-weight: 700;
	color: var(--gt-ink-900);
	margin: 0 0 18px;
	padding-bottom: 10px;
	border-bottom: 2px solid rgba(169, 159, 199, 0.35);
}

.gt-bracket {
	position: relative;
	display: flex;
	gap: 28px;
	overflow-x: auto;
	padding-bottom: 12px;
}

.gt-bracket-round {
	position: relative;
	z-index: 1;
	min-width: 240px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* The round title stays pinned at the top; only the matches below it
   are centered. The bracket row (.gt-bracket) stretches every round
   column to the height of the tallest one (Round 1) by default flex
   behavior, and flex:1 here lets this wrapper claim all the leftover
   height so space-around can spread its matches out — landing each
   one vertically centered between the two matches feeding it, the
   classic CSS-only bracket alignment. */
.gt-bracket-round__matches {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 18px;
	justify-content: space-around;
}

/* Connector lines tracing each match to the two matches that feed
   into it — inserted as the bracket's first child so it paints behind
   the (opaque) match cards. Only drawn between rounds that cleanly
   halve; see drawBracketLines() in glow-tournament.js. */
.gt-bracket-lines {
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
	overflow: visible;
}

.gt-bracket-lines__path {
	fill: none;
	stroke: var(--gt-lilac-300);
	stroke-width: 2;
	stroke-linecap: round;
}

/* A single round (Round Robin has no bracket stages) reads better as a
   wrapping grid than one long vertical strip. */
.gt-bracket--single-round { flex-wrap: wrap; }

.gt-bracket--single-round .gt-bracket-round {
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: flex-start;
	min-width: 100%;
}

/* Dissolve the matches wrapper for the single-round grid so its cards
   go back to being direct flex/wrap items of .gt-bracket-round,
   matching the plain wrapping-grid layout above (no bracket alignment
   needed when there's only one round). */
.gt-bracket--single-round .gt-bracket-round__matches {
	display: contents;
}

.gt-bracket--single-round .gt-match-card {
	flex: 1 1 260px;
	max-width: 320px;
}

.gt-bracket-round__title {
	font-family: var(--gt-font-display);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--gt-slate-500);
	margin: 0;
}

.gt-match-card {
	display: block;
	border-radius: 10px;
	border: 1px solid rgba(var(--gt-ink-rgb), 0.14);
	background: var(--gt-white);
	overflow: hidden;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

/* Finished matches get a quiet grey tint so it's obvious at a glance
   which matches are done — text colors below still keep AA contrast. */
.gt-match-card--completed { background: rgba(var(--gt-ink-rgb), 0.045); }

/* Schedule cards are links through to their category page. */
a.gt-match-card--schedule:hover {
	border-color: var(--gt-lilac-300);
	box-shadow: 0 6px 16px rgba(var(--gt-ink-rgb), 0.12);
}

.gt-match-card__team {
	display: flex;
	justify-content: space-between;
	padding: 10px 12px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--gt-ink-800);
	border-bottom: 1px solid rgba(var(--gt-ink-rgb), 0.1);
}

.gt-match-card__team:last-of-type { border-bottom: none; }

.gt-match-card__team.is-winner { font-weight: 700; color: var(--gt-ink-900); background: rgba(143, 191, 159, 0.14); }

.gt-match-card__team.is-loser { font-weight: 400; color: var(--gt-slate-500); }

.gt-match-card__meta {
	padding: 8px 12px;
	font-size: 11.5px;
	color: var(--gt-slate-500);
	background: rgba(var(--gt-ink-rgb), 0.05);
}

/* ---------- Draw admin ---------- */

.gt-draw-info {
	background: var(--gt-white);
	border: 1px solid rgba(var(--gt-ink-rgb), 0.15);
	border-radius: var(--gt-radius);
	padding: 16px 20px;
	margin-bottom: 20px;
	max-width: 420px;
}

.gt-draw-info h3 {
	font-family: var(--gt-font-display);
	font-size: 14px;
	margin: 0 0 10px;
	color: var(--gt-slate-500);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.gt-draw-info__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 7px 0;
	border-top: 1px solid rgba(var(--gt-ink-rgb), 0.08);
	font-size: 13.5px;
}

.gt-draw-info__row:first-of-type { border-top: none; }

.gt-draw-info__row span { color: var(--gt-slate-500); }
.gt-draw-info__row strong { font-weight: 700; color: var(--gt-ink-900); }

.gt-draw-info__row select {
	padding: 5px 8px;
	border-radius: 6px;
	border: 1px solid rgba(var(--gt-ink-rgb), 0.25);
	font-family: var(--gt-font-body);
	font-size: 13px;
	font-weight: 600;
	background: var(--gt-white);
	color: var(--gt-ink-900);
}

.gt-draw-admin-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 24px;
}

.gt-btn-tiny {
	font-family: var(--gt-font-body);
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
	border: none;
	background: var(--gt-ink-900);
	color: var(--gt-white);
	cursor: pointer;
}

.gt-btn-tiny:hover { opacity: 0.85; }

.gt-standings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

.gt-standings-card {
	border: 1px solid rgba(var(--gt-ink-rgb), 0.14);
	border-radius: var(--gt-radius);
	padding: 16px;
	background: var(--gt-white);
}

.gt-standings-card h4 {
	font-family: var(--gt-font-display);
	font-size: 14.5px;
	margin: 0 0 10px;
}

.gt-standings-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.gt-standings-table th { text-align: left; color: var(--gt-slate-500); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid rgba(var(--gt-ink-rgb), 0.15); }
.gt-standings-table td { padding: 6px; border-bottom: 1px solid rgba(var(--gt-ink-rgb), 0.08); }
.gt-standings-table tr:first-child td { font-weight: 700; }

.gt-match-card--admin .gt-match-card__team {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.gt-reassign-team-btn { padding: 2px 8px; font-size: 10.5px; flex-shrink: 0; }

.gt-match-card__scorebar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background: rgba(var(--gt-ink-rgb), 0.04);
}

.gt-score-input {
	width: 44px;
	padding: 4px 6px;
	border-radius: 6px;
	border: 1px solid rgba(var(--gt-ink-rgb), 0.25);
	font-size: 12.5px;
	text-align: center;
}

.gt-bracket-round--losers .gt-bracket-round__title { color: #A2723A; }
.gt-bracket-round--grandfinal .gt-bracket-round__title { color: #6B4FA0; }
.gt-bracket-round--consolation .gt-bracket-round__title { color: var(--gt-slate-500); }

/* ---------- Schedule of Play (match card list) ---------- */

.gt-schedule-list {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
}

.gt-schedule-list .gt-match-card {
	flex: 1 1 300px;
	max-width: 360px;
}

.gt-match-card--schedule .gt-match-card__meta--top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	background: rgba(var(--gt-ink-rgb), 0.05);
	border-bottom: 1px solid rgba(var(--gt-ink-rgb), 0.12);
	font-size: 12px;
	font-weight: 600;
	color: var(--gt-slate-600);
}

.gt-vs { color: var(--gt-slate-500); font-size: 12px; }

/* ---------- Results (podium) ---------- */

.gt-results__title {
	font-family: var(--gt-font-display);
	font-size: 20px;
	font-weight: 700;
	color: var(--gt-ink-900);
	margin: 0 0 28px;
}

.gt-podium {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 16px;
	max-width: 640px;
	margin: 0 auto;
}

.gt-podium-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	min-width: 0;
	max-width: 220px;
}

.gt-podium-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-bottom: 10px;
	text-align: center;
}

.gt-podium-team__name {
	font-family: var(--gt-font-display);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--gt-ink-900);
	line-height: 1.3;
}

.gt-podium-block {
	width: 100%;
	border-radius: 12px 12px 0 0;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 12px;
	color: #FFFFFF;
}

.gt-podium-rank {
	font-family: var(--gt-font-display);
	font-size: 28px;
	font-weight: 700;
}

/* A single ink-to-lilac cascade instead of literal medal colors — 1st
   is the deepest, richest tier (the same ink shades as the brand's
   dark CTAs), fading through slate to the lilac accent for 3rd. Literal
   hex, not the --gt-ink-* vars, since those swap meaning in dark theme
   (they become near-white text colors there) and these blocks are
   meant to stay this exact tone regardless of site theme. */
.gt-podium-col--first .gt-podium-block {
	height: 120px;
	background: linear-gradient(160deg, #2E2C3D 0%, #1E1C29 100%);
	box-shadow: 0 10px 24px rgba(169, 159, 199, 0.4);
}
.gt-podium-col--second .gt-podium-block { height: 90px; background: linear-gradient(160deg, #4B4A5E 0%, #3D3A4E 100%); }
.gt-podium-col--third .gt-podium-block { height: 70px; background: linear-gradient(160deg, #8C8AA0 0%, #A99FC7 100%); }

.gt-podium-col--first .gt-podium-team__name { font-size: 15px; }

@media (max-width: 480px) {
	.gt-podium { gap: 8px; }
	.gt-podium-team__name { font-size: 12px; }
	.gt-podium-col--first .gt-podium-team__name { font-size: 13px; }
	.gt-podium-col--first .gt-podium-block { height: 96px; }
	.gt-podium-col--second .gt-podium-block { height: 74px; }
	.gt-podium-col--third .gt-podium-block { height: 58px; }
}

.gt-schedule-admin-toolbar { margin-bottom: 18px; }

.gt-schedule-grid-wrap { overflow-x: auto; }

.gt-schedule-grid {
	width: 100%;
	min-width: 560px;
	border-collapse: separate;
	border-spacing: 8px;
}

.gt-schedule-grid th {
	text-align: left;
	font-family: var(--gt-font-display);
	font-size: 13px;
	color: var(--gt-slate-500);
	padding: 0 8px 6px;
}

.gt-schedule-grid__th-inner {
	display: flex;
	align-items: center;
	gap: 4px;
}

.gt-schedule-grid__court-name { white-space: nowrap; }

.gt-court-edit-btn {
	width: 20px;
	height: 20px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--gt-slate-500);
	opacity: 0.65;
}

.gt-court-edit-btn:hover { opacity: 1; background: rgba(var(--gt-lilac-rgb), 0.15); }

.gt-schedule-grid__time {
	white-space: nowrap;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--gt-slate-500);
	padding-right: 10px;
	vertical-align: top;
	width: 70px;
}

.gt-schedule-cell {
	vertical-align: top;
	border-radius: 10px;
	padding: 10px;
	min-width: 160px;
	height: 66px;
}

.gt-schedule-cell--empty {
	background: rgba(var(--gt-lilac-rgb), 0.06);
	border: 1px dashed rgba(var(--gt-ink-rgb), 0.2);
	text-align: center;
}

.gt-schedule-cell--empty .gt-schedule-cell-btn {
	margin-top: 14px;
	border-style: dashed;
}

.gt-schedule-cell--filled {
	background: var(--gt-white);
	border: 1px solid rgba(var(--gt-ink-rgb), 0.15);
}

.gt-schedule-cell__round {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--gt-slate-500);
	margin-bottom: 4px;
}

.gt-schedule-cell__teams {
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.4;
	margin-bottom: 8px;
}

.gt-schedule-cell__team {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--gt-ink-800);
	line-height: 1.4;
}

.gt-schedule-cell__team.is-winner { font-weight: 700; color: var(--gt-ink-900); }
.gt-schedule-cell__team.is-loser { font-weight: 400; color: var(--gt-slate-500); }

.gt-schedule-cell__score { font-weight: 700; flex-shrink: 0; }

.gt-schedule-cell--filled .gt-schedule-cell-btn { margin-top: 8px; }

.gt-schedule-cell--finished { background: rgba(var(--gt-ink-rgb), 0.045); }

.gt-schedule-cell--busy {
	background: repeating-linear-gradient(135deg, rgba(var(--gt-lilac-rgb), 0.08), rgba(var(--gt-lilac-rgb), 0.08) 6px, rgba(var(--gt-lilac-rgb), 0.14) 6px, rgba(var(--gt-lilac-rgb), 0.14) 12px);
	border: 1px dashed rgba(var(--gt-ink-rgb), 0.3);
	cursor: not-allowed;
}

.gt-schedule-cell--busy .gt-schedule-cell__round { color: var(--gt-slate-500); }
.gt-schedule-cell--busy .gt-schedule-cell__teams { color: var(--gt-slate-500); font-weight: 500; }

.gt-schedule-cell__busy-tag {
	display: inline-block;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--gt-slate-500);
}

.gt-status-pill {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	text-transform: capitalize;
	background: rgba(var(--gt-lilac-rgb), 0.15);
	color: var(--gt-slate-600);
}

.gt-status-pill--completed { background: rgba(143, 191, 159, 0.18); color: #3E7A54; }
.gt-status-pill--in_progress { background: rgba(217, 180, 139, 0.22); color: #A2723A; }

/* ---------- Theme popup (bottom nav logo) ---------- */

.gt-bottom-nav__brand.gt-bottom-nav__brand--btn {
	border: none;
	background: transparent;
	cursor: pointer;
	padding: 0;
}

.gt-theme-popup {
	left: 0;
	transform: none;
	width: 190px;
	padding: 6px;
}

.gt-theme-popup__item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px;
	border-radius: 10px;
	border: none;
	background: none;
	cursor: pointer;
	font-family: var(--gt-font-body);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--gt-ink-900);
	text-align: left;
}

.gt-theme-popup__item:hover { background: rgba(var(--gt-lilac-rgb), 0.1); }

.gt-theme-popup__swatch {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	flex-shrink: 0;
	border: 1px solid rgba(var(--gt-ink-rgb), 0.2);
}

.gt-theme-popup__swatch--default { background: linear-gradient(135deg, #FFFFFF 50%, #4B4A5E 50%); }
.gt-theme-popup__swatch--dark { background: linear-gradient(135deg, #2E2C3D 50%, #17151F 50%); }

.gt-theme-popup__check {
	margin-left: auto;
	opacity: 0;
	color: var(--gt-lilac-300);
	font-weight: 700;
}

.gt-theme-popup__item.is-active .gt-theme-popup__check { opacity: 1; }

/* ==================== Dark theme ====================
   Toggled via [data-gt-theme="dark"] on <body>. The whole site is built
   on top of --gt-white (surface) / --gt-ink-900 (primary text) /
   --gt-ink-800 (secondary text) / --gt-slate-500 / --gt-slate-600, so
   redefining those here re-themes almost everything automatically. The
   banner, subheader and "always-dark" CTA buttons are intentionally
   dark in both themes, so they're pinned back below with literal
   colors instead of the variables. */

[data-gt-theme="dark"] {
	--gt-white: #211F2C;
	--gt-ink-900: #F3F1F8;
	--gt-ink-800: #D8D5E3;
	--gt-slate-500: #A9A6BD;
	--gt-slate-600: #C4C1D4;
	--gt-page-bg: #17151F;
	--gt-ink-rgb: 255, 255, 255;
	--gt-lilac-rgb: 169, 159, 199;
}

/* Banner / subheader stay their own dark gradient regardless of theme —
   spelled out literally so they're immune to the redefinitions above. */
[data-gt-theme="dark"] .gt-banner {
	--gt-banner-gradient: linear-gradient(135deg, #4B4A5E 0%, #2E2C3D 65%, #1E1C29 100%);
	color: #FFFFFF;
}

[data-gt-theme="dark"] .gt-subheader {
	--gt-banner-gradient: linear-gradient(135deg, #4B4A5E, #2E2C3D);
	color: #FFFFFF;
}

[data-gt-theme="dark"] .gt-back-link:hover { color: #FFFFFF; }
[data-gt-theme="dark"] .gt-subheader .gt-badge { color: #FFFFFF; }
[data-gt-theme="dark"] .gt-avatar { color: #FFFFFF; }

[data-gt-theme="dark"] .gt-btn.gt-btn--admin { color: #FFFFFF; }

[data-gt-theme="dark"] .gt-btn.gt-btn--admin.gt-btn--dark,
[data-gt-theme="dark"] .gt-btn-tiny,
[data-gt-theme="dark"] .gt-btn--primary {
	background: #1E1C29;
	border-color: #1E1C29;
	color: #FFFFFF;
}

[data-gt-theme="dark"] .gt-btn.gt-btn--admin.gt-btn--dark:hover,
[data-gt-theme="dark"] .gt-btn-tiny:hover { background: #1E1C29; }

[data-gt-theme="dark"] .gt-bottom-nav__item--active,
[data-gt-theme="dark"] .gt-bottom-nav__item--active:hover { color: #FFFFFF; }

/* Status colors were tuned for light surfaces — lighten for dark ones. */
[data-gt-theme="dark"] .gt-badge--status.gt-badge--open,
[data-gt-theme="dark"] .gt-status-pill--completed,
[data-gt-theme="dark"] .gt-form-message--success { color: #8FBF9F; }

[data-gt-theme="dark"] .gt-badge--status.gt-badge--closed,
[data-gt-theme="dark"] .gt-icon-btn--danger,
[data-gt-theme="dark"] .gt-form-message--error { color: #E39C9C; }

[data-gt-theme="dark"] .gt-status-pill--in_progress { color: #E0B685; }
[data-gt-theme="dark"] .gt-bracket-round--losers .gt-bracket-round__title { color: #E0B685; }
[data-gt-theme="dark"] .gt-bracket-round--grandfinal .gt-bracket-round__title { color: #C6B3EA; }

[data-gt-theme="dark"] .gt-match-card__team.is-winner { background: rgba(143, 191, 159, 0.16); }
