*,
*::before,
*::after {
	box-sizing: border-box;
}

body { background: #222; color: #eee; font-family: sans-serif; margin: 0; }
.calendar-container { width: min(96vw, 1180px); margin: 32px auto; background: #181818; border-radius: 12px; padding: 24px; box-shadow: 0 2px 16px #0008; }
.site-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-bottom: 18px;
	padding: 12px 16px;
	border: 1px solid #323232;
	border-radius: 14px;
	background: linear-gradient(180deg, #1b1b1b 0%, #111111 100%);
}
.site-brand-logo {
	width: min(220px, 34vw);
	height: auto;
	display: block;
	object-fit: contain;
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}
.site-brand-copy {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.site-brand-title {
	font-size: clamp(1.2rem, 2.2vw, 1.8rem);
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #f8fafc;
	line-height: 1;
}
.site-brand-tagline {
	font-size: 0.85rem;
	color: #cbd5e1;
	line-height: 1.3;
}
.site-nav {
	display: flex;
	gap: 8px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}
.site-nav-link {
	display: inline-block;
	padding: 8px 12px;
	border: 1px solid #3a3a3a;
	border-radius: 8px;
	background: #202020;
	color: #cbd5e1;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
}
.site-nav-link:hover {
	border-color: #60a5fa;
	color: #dbeafe;
}
.site-nav-link.is-active {
	background: #1d4ed8;
	border-color: #1d4ed8;
	color: #eff6ff;
}
.site-nav-link-live {
	margin-left: auto;
	background: #475569;
	border-color: #475569;
	color: #f1f5f9;
}
.site-nav-link-live:hover {
	border-color: #64748b;
	color: #f8fafc;
}
.site-nav-link-live.is-live {
	background: #b91c1c;
	border-color: #b91c1c;
	color: #fef2f2;
}
.site-nav-link-live.is-live:hover {
	border-color: #dc2626;
	color: #fff1f2;
}
h1, h2 { color: #fff; }
#calendarGrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 32px; min-width: 0; }
.calendar-header { font-weight: bold; text-align: center; background: #333; border-radius: 4px; padding: 6px 0; }
.calendar-day { background: #292929; border-radius: 4px; min-height: 60px; padding: 4px; text-align: left; position: relative; min-width: 0; }
.calendar-day.has-event { background: #292929; color: #eee; }
.calendar-event-list { margin-top: 4px; }
.calendar-event { font-size: 0.95em; margin-bottom: 4px; padding: 6px; border-radius: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow: hidden; position: relative; isolation: isolate; }
.calendar-event + .calendar-event {
	margin-top: 4px;
	padding-top: 9px;
	border-top: 1px solid rgba(148, 163, 184, 0.45);
}
.calendar-event-title { font-size: 0.68rem; line-height: 1.1; color: #d1d5db; font-weight: 500; overflow-wrap: anywhere; word-break: break-word; }
.calendar-event-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; min-width: 0; width: 100%; overflow: hidden; }
.calendar-event-time { font-size: 0.68rem; line-height: 1.1; color: #cbd5e1; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.calendar-event,
.upcoming-event-item {
	cursor: pointer;
}
.live-panel {
	border: 1px solid #323232;
	background: #202020;
	border-radius: 10px;
	padding: 12px;
	margin-bottom: 14px;
}
.live-panel h2 {
	margin: 0 0 8px 0;
	font-size: 1rem;
}
.live-game-display {
	padding: 10px;
	border-radius: 8px;
	background: #111827;
	border: 1px solid #374151;
	min-height: 72px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.live-game-title {
	font-weight: 700;
	color: #f9fafb;
}
.live-game-meta {
	font-size: 0.85rem;
	color: #cbd5e1;
}
.live-game-score {
	font-size: 1.3rem;
	font-weight: 800;
	color: #22c55e;
	line-height: 1.1;
	margin-top: 4px;
}
.live-controls-grid,
.live-score-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-top: 8px;
}
.live-gymnastics-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-top: 8px;
}
.live-gymnastics-grid input {
	width: 100%;
}
.live-controls-grid button,
.live-controls-grid select,
.live-score-grid input {
	width: 100%;
}
@media (max-width: 640px) {
	.site-nav-link-live {
		margin-left: 0;
	}
	.live-controls-grid,
	.live-score-grid {
		grid-template-columns: 1fr;
	}
}

/* ── Public live scoreboard ── */
#liveRoot {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}
.live-game-card-public {
	border: 1px solid #2f3b52;
	background: #111827;
	border-radius: 12px;
	padding: 14px;
}
.live-idle-msg {
	text-align: center;
	color: #9ca3af;
	padding: 40px 0;
	font-size: 1rem;
}
.live-upcoming-label {
	text-align: center;
	color: #9ca3af;
	font-size: 1rem;
	padding: 16px 0 8px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.live-competition-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 16px;
}
.live-competition-logo {
	width: 36px;
	height: 36px;
	object-fit: contain;
}
.live-competition-name {
	font-size: 0.9rem;
	font-weight: 600;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.live-scoreboard {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 0 8px;
}
.live-side {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	flex: 1;
}
.live-team-logo {
	width: 120px;
	height: 120px;
	object-fit: contain;
}
.live-team-name {
	font-size: 1rem;
	font-weight: 700;
	color: #f3f4f6;
	text-align: center;
	line-height: 1.2;
}
.live-score-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}
.live-score-line {
	display: flex;
	align-items: center;
	gap: 10px;
}
.live-score-num {
	font-size: 3.2rem;
	font-weight: 900;
	color: #f9fafb;
	line-height: 1;
	min-width: 2ch;
	text-align: center;
}
.live-score-sep {
	font-size: 2rem;
	font-weight: 300;
	color: #6b7280;
}
.live-badge {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	color: #22c55e;
	animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}
.live-time-label {
	font-size: 0.78rem;
	color: #9ca3af;
}
.live-stats-section {
	margin-top: 24px;
	border-top: 1px solid #2f3b52;
	padding-top: 16px;
}
.live-stats-heading {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #93c5fd;
	margin-bottom: 12px;
	text-align: center;
}
.live-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
	gap: 8px;
}
.live-gym-grid {
	width: 100%;
	border-collapse: collapse;
	margin-top: 4px;
}
.live-gym-row {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 0;
	border-bottom: 1px solid #1e293b;
	align-items: center;
}
.live-gym-row:last-child {
	border-bottom: none;
}
.live-gym-header .live-gym-col-label {
	color: #94a3b8;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-align: center;
	padding: 6px 4px;
}
.live-gym-event-label {
	color: #94a3b8;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 10px 4px;
}
.live-gym-value {
	text-align: center;
	font-size: 1.25rem;
	font-weight: 800;
	color: #f8fafc;
	padding: 10px 4px;
}
.live-gym-allaround {
	border-top: 2px solid #334155;
	margin-top: 2px;
}
.live-gym-allaround .live-gym-event-label {
	color: #93c5fd;
}
.live-gym-allaround .live-gym-value {
	color: #93c5fd;
}
.live-stat-cell {
	background: #0f172a;
	border: 1px solid #334155;
	border-radius: 8px;
	padding: 10px 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}
.live-stat-label {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #94a3b8;
	text-align: center;
}
.live-stat-value {
	font-size: 1.4rem;
	font-weight: 800;
	color: #f8fafc;
	line-height: 1;
}
@media (max-width: 640px) {
	.live-team-logo {
		width: 80px;
		height: 80px;
	}
	.live-score-num {
		font-size: 2.4rem;
	}
}

.upcoming-events-section { margin-bottom: 20px; }
.upcoming-events-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.upcoming-events-header h2 { margin: 0; font-size: 1.05rem; }
.stats-panel {
	padding: 10px;
	border-radius: 10px;
	background: #202020;
	border: 1px solid #323232;
}
.player-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.player-tab {
	border: 1px solid #3a3a3a;
	border-radius: 8px;
	background: #181818;
	color: #d1d5db;
	padding: 8px 12px;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
}
.player-tab.is-active {
	background: #0f766e;
	border-color: #0f766e;
	color: #ecfeff;
}
.player-teams {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.player-team-card {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid #3a3a3a;
	background: #181818;
}
.player-team-logo {
	width: 52px;
	height: 52px;
	object-fit: contain;
	border-radius: 6px;
	background: #101010;
	padding: 2px;
}
.player-team-name {
	font-weight: 700;
	color: #f3f4f6;
	line-height: 1.2;
}
.player-team-trophies {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 6px;
	margin-bottom: 8px;
}
.player-team-trophy {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 700;
	line-height: 1;
}
.player-team-trophy[title] {
	cursor: help;
}
.player-team-trophy-icon {
	font-size: 0.95rem;
}
.player-team-trophy-count {
	font-size: 0.84rem;
	color: #e5e7eb;
}
.player-team-trophy.is-gold .player-team-trophy-icon {
	color: #fbbf24;
}
.player-team-trophy.is-silver .player-team-trophy-icon {
	color: #d1d5db;
}
.player-team-trophy.is-bronze .player-team-trophy-icon {
	color: #d97706;
}
.player-team-sport {
	font-size: 0.78rem;
	color: #9ca3af;
}
.player-team-meta-section {
	margin-top: 10px;
}
.player-team-meta-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #94a3b8;
	margin-bottom: 6px;
}
.player-team-meta-values {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.player-team-meta-pill {
	display: inline-flex;
	align-items: center;
	padding: 4px 8px;
	border-radius: 999px;
	background: #0f172a;
	border: 1px solid #334155;
	color: #e2e8f0;
	font-size: 0.76rem;
	line-height: 1.1;
	cursor: pointer;
	font-family: inherit;
}
.player-team-meta-pill.is-active {
	background: #1d4ed8;
	border-color: #60a5fa;
	color: #eff6ff;
}
.player-team-meta-empty {
	font-size: 0.76rem;
	color: #9ca3af;
}
.player-team-record-title {
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #93c5fd;
	margin-bottom: 6px;
}
.player-team-record-summary {
	font-size: 1.35rem;
	font-weight: 800;
	color: #f8fafc;
	line-height: 1;
	padding: 4px 0;
}
.player-team-record-detail {
	margin-top: 4px;
	font-size: 0.78rem;
	color: #cbd5e1;
}
.player-team-record-placement {
	margin-top: 6px;
	font-size: 0.86rem;
	font-weight: 700;
	color: #facc15;
}
.player-team-soccer-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin-top: 12px;
}
.player-team-soccer-stat {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 10px;
	border-radius: 8px;
	background: #0f172a;
	border: 1px solid #334155;
}
.player-team-soccer-stat-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #93c5fd;
}
.player-team-soccer-stat-value {
	font-size: 1.25rem;
	font-weight: 800;
	color: #f8fafc;
	line-height: 1;
}
.player-stats-modal-section {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #2f3b52;
}
.player-stats-modal-title {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #93c5fd;
	margin-bottom: 10px;
}
.player-stats-event-card {
	padding: 10px;
	border-radius: 8px;
	background: #0f172a;
	border: 1px solid #334155;
	margin-bottom: 8px;
}
.player-stats-event-heading {
	font-size: 0.82rem;
	font-weight: 700;
	color: #f8fafc;
	margin-bottom: 8px;
}
.player-stats-event-values {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.player-stats-event-values.is-gymnastics .player-stats-event-item.is-score {
	grid-column: 1;
}
.player-stats-event-values.is-gymnastics .player-stats-event-item.is-placement {
	grid-column: 2;
}
.player-stats-event-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px;
	border-radius: 6px;
	background: #111827;
	border: 1px solid #243041;
}
.player-stats-event-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #94a3b8;
}
.player-stats-event-value {
	font-size: 0.98rem;
	font-weight: 700;
	color: #f8fafc;
}
.player-team-record-empty {
	font-size: 0.8rem;
	color: #9ca3af;
	padding: 4px 0;
}
.player-team-games-section {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #2f3b52;
}
.player-team-games-links {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
.player-team-games-link {
	border: none;
	background: transparent;
	padding: 0;
	font-size: 0.82rem;
	font-weight: 700;
	color: #93c5fd;
	text-decoration: underline;
	cursor: pointer;
}
.player-team-games-link:hover {
	color: #dbeafe;
}
.player-team-games-list {
	margin-top: 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.player-team-games-list-title {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #94a3b8;
}
.player-team-games-item {
	padding: 8px 10px;
	border-radius: 8px;
	background: #0f172a;
	border: 1px solid #334155;
	font-size: 0.82rem;
	line-height: 1.3;
	color: #e2e8f0;
}
.upcoming-events-list { display: flex; flex-direction: column; gap: 8px; }
.upcoming-event-item { background: #202020; border: 1px solid #323232; border-left: 4px solid var(--event-color, #2563eb); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; position: relative; isolation: isolate; overflow: visible; }
.event-status-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(-12deg);
	font-size: clamp(0.92rem, 2vw, 1.35rem);
	font-weight: 900;
	letter-spacing: 0.22em;
	color: #ef4444;
	opacity: 1;
	text-transform: uppercase;
	pointer-events: none;
	white-space: normal;
	width: 100%;
	text-align: center;
	padding: 0 10px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
	z-index: 2;
}
.calendar-event .event-status-overlay {
	font-size: clamp(0.72rem, 1.2vw, 0.95rem);
	letter-spacing: 0.18em;
}
.upcoming-event-status {
	color: #ef4444;
	font-size: 0.88rem;
	font-weight: 900;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-align: center;
	padding: 2px 0;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.upcoming-event-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.upcoming-event-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.upcoming-competition-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; background: transparent; border: 1px solid #343434; padding: 2px; }
.upcoming-event-left { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; flex: 1 1 280px; }
.upcoming-event-logos { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; flex-wrap: wrap; }
.upcoming-event-logos .team-logo { width: 40px; height: 40px; }
.upcoming-event-matchup { color: #e5e7eb; font-size: 0.82rem; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.upcoming-vs { color: #cbd5e1; font-size: 0.82rem; }
.upcoming-event-date { color: #cbd5e1; font-size: 0.76rem; white-space: nowrap; }
.upcoming-event-title { color: #f3f4f6; font-size: 0.86rem; font-weight: 600; }
.upcoming-event-meta { display: flex; flex-direction: column; gap: 2px; color: #9ca3af; font-size: 0.74rem; }
.upcoming-event-meta .event-address-link {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.upcoming-event-meta .event-address-link:hover,
.upcoming-event-meta .event-address-link:focus-visible {
	color: #fff;
	opacity: 0.9;
}
.upcoming-empty { margin: 0; padding: 14px 12px; background: #202020; border: 1px solid #323232; border-radius: 8px; color: #9ca3af; }
.event-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.event-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.58);
}
.event-modal-panel {
	position: relative;
	width: min(560px, 100%);
	max-height: 80vh;
	overflow: auto;
	background: #171717;
	border: 1px solid #3a3a3a;
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
	padding: 14px;
}
.event-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}
.event-modal-header h2 {
	margin: 0;
	font-size: 1.1rem;
}
.event-modal-actions {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.event-modal-header button {
	height: 34px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid #3a3a3a;
	background: #202020;
	color: #e5e7eb;
	cursor: pointer;
}
.event-modal-header button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.event-gallery-refresh-btn {
	width: 34px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.event-gallery-refresh-btn svg {
	display: block;
}
@keyframes gallery-refresh-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}
.event-modal-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.event-status-notice {
	align-self: stretch;
	padding: 8px 10px;
	border: 1px solid #ef4444;
	border-radius: 8px;
	background: rgba(127, 29, 29, 0.35);
	color: #fca5a5;
	font-size: 1rem;
	font-weight: 900;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-align: center;
}
.record-modal-logo-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 6px 0 2px;
}
.record-modal-logo {
	width: 56px;
	height: 56px;
	object-fit: contain;
	border-radius: 10px;
	background: #101010;
	border: 1px solid #2f2f2f;
	padding: 6px;
}
.event-matchup-block {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 12px;
	align-items: center;
	padding: 10px;
	border-radius: 8px;
	background: #202020;
	border: 1px solid #2f2f2f;
}
.event-matchup-side {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.event-matchup-top-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.event-matchup-logo-wrap {
	width: 84px;
	height: 84px;
	border-radius: 10px;
	background: #171717;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #343434;
}
.event-matchup-logo {
	width: 64px;
	height: 64px;
	object-fit: contain;
}
.event-matchup-fallback {
	font-size: 1rem;
	font-weight: 700;
	color: #e5e7eb;
}
.event-matchup-score {
	min-width: 32px;
	text-align: center;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
	color: #f3f4f6;
}
.event-matchup-name {
	font-size: 1rem;
	font-weight: 700;
	color: #e5e7eb;
	text-align: center;
	line-height: 1.2;
	word-break: break-word;
}
.event-matchup-center {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
}
.event-matchup-vs {
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: #9ca3af;
}
.event-matchup-result {
	font-size: 1.5rem;
	font-weight: 700;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
}
.event-matchup-result-w {
	background: #10b981;
	color: #fff;
}
.event-matchup-result-l {
	background: #ef4444;
	color: #fff;
}
.event-matchup-result-d {
	background: #6b7280;
	color: #fff;
}
.event-tournament-header {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 12px;
	border-radius: 8px;
	background: #202020;
	border: 1px solid #2f2f2f;
}
.event-tournament-logo {
	width: 84px;
	height: 84px;
	object-fit: contain;
	border-radius: 10px;
	background: transparent;
	border: 1px solid #343434;
	padding: 8px;
}
.event-tournament-name {
	font-size: 1rem;
	font-weight: 700;
	color: #f3f4f6;
	text-align: center;
}
.event-detail-row {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 10px;
	align-items: start;
	padding: 8px 10px;
	border-radius: 8px;
	background: #202020;
	border: 1px solid #2f2f2f;
}
.event-detail-label {
	color: #9ca3af;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.event-detail-value {
	color: #f3f4f6;
	font-size: 0.92rem;
	line-height: 1.35;
	word-break: break-word;
}
.event-modal-body .event-address-link {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.event-modal-body .event-address-link:hover,
.event-modal-body .event-address-link:focus-visible {
	color: #fff;
	opacity: 0.9;
}
.event-detail-competition {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.event-detail-competition-logo {
	width: 24px;
	height: 24px;
	object-fit: contain;
	border-radius: 4px;
	background: transparent;
	border: 1px solid #343434;
	padding: 2px;
}
.tournament-results-dropdown {
	border: 1px solid #2f2f2f;
	border-radius: 8px;
	background: #202020;
	overflow: hidden;
}
.tournament-results-summary {
	padding: 10px 12px;
	cursor: pointer;
	font-weight: 700;
	color: #f3f4f6;
	list-style: none;
}
.tournament-results-summary::-webkit-details-marker {
	display: none;
}
.tournament-results-summary::after {
	content: '▾';
	float: right;
	color: #9ca3af;
}
.tournament-results-dropdown[open] .tournament-results-summary::after {
	content: '▴';
}
.tournament-results-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 0 10px 10px;
}
.tournament-result-item {
	display: grid;
	grid-template-columns: 120px 1fr auto;
	gap: 10px;
	align-items: center;
	border: 1px solid #2f2f2f;
	border-radius: 8px;
	padding: 8px;
	background: #181818;
}
.tournament-result-stage {
	font-size: 0.82rem;
	font-weight: 700;
	color: #93c5fd;
}
.tournament-result-matchup {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	flex-wrap: wrap;
	color: #f3f4f6;
	font-size: 0.88rem;
}
.tournament-result-logo {
	width: 16px;
	height: 16px;
	object-fit: contain;
	border-radius: 4px;
	background: #101010;
	border: 1px solid #2f2f2f;
	padding: 1px;
}
.tournament-result-vs {
	font-size: 0.75rem;
	font-weight: 700;
	color: #9ca3af;
	text-transform: uppercase;
}
.tournament-result-score {
	font-size: 0.9rem;
	font-weight: 700;
	color: #f3f4f6;
	white-space: nowrap;
}
.day-number { font-weight: 600; }
.hint-text { color: #c7d2fe; margin-top: 0; margin-bottom: 14px; }
.legend-key { margin: 0 0 10px; color: #d1d5db; font-size: 0.9rem; }
.scrimmage-star { color: #f59e0b; font-weight: 700; }
.event-status-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 6px;
	border-radius: 999px;
	background: rgba(239, 68, 68, 0.16);
	border: 1px solid rgba(239, 68, 68, 0.45);
	color: #fca5a5;
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.month-nav {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}
.month-nav h2 {
	margin: 0;
	font-size: 1.15rem;
	text-align: center;
}
.month-nav #prevMonthBtn {
	justify-self: start;
}
.month-nav #viewPrevMonthBtn {
	justify-self: start;
}
.month-nav #nextMonthBtn {
	justify-self: end;
}
.month-nav #viewNextMonthBtn {
	justify-self: end;
}
.month-nav button {
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #202020;
	color: #eee;
	padding: 4px 8px;
	font-size: 0.82rem;
	line-height: 1.1;
	cursor: pointer;
}
.subtle-btn {
	display: block;
	margin: 0 auto 14px;
	padding: 4px 8px;
	font-size: 0.82rem;
	color: #9ca3af;
	background: transparent;
	border: 1px solid #3a3a3a;
	border-radius: 999px;
	cursor: pointer;
	opacity: 0.85;
}
.subtle-btn:hover {
	color: #d1d5db;
	opacity: 1;
}
.calendar-day.selected-day {
	box-shadow: inset 0 0 0 2px #f59e0b;
}
.calendar-day.current-day {
	background: #2f3238;
	box-shadow: inset 0 0 0 1px #6b7280;
}
.calendar-day.current-day.selected-day {
	box-shadow: inset 0 0 0 2px #f59e0b;
}
#addressList { list-style: none; padding: 0; }
#addressList li { background: #292929; margin-bottom: 6px; border-radius: 4px; padding: 8px; }

.editor-section { margin-bottom: 24px; }
.is-hidden { display: none !important; }
.editor-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.event-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
:root {
	--control-height: 40px;
}
.all-day-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: var(--control-height);
	padding: 0 10px;
	border: 1px solid #454545;
	border-radius: 6px;
	background: linear-gradient(180deg, #232323 0%, #1c1c1c 100%);
	box-sizing: border-box;
	line-height: 1;
	cursor: pointer;
}
.toggle-label-text {
	font-size: 0.95rem;
	color: #f3f4f6;
}
.toggle-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.toggle-track {
	width: 42px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	border-radius: 999px;
	background: linear-gradient(180deg, #4b5563 0%, #374151 100%);
	padding: 2px;
	box-sizing: border-box;
	box-shadow: inset 0 1px 2px #0007;
	transition: background 0.2s ease, box-shadow 0.2s ease;
}
.toggle-thumb {
	display: block;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e5e7eb 70%, #d1d5db 100%);
	box-shadow: 0 1px 2px #0006;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.toggle-input:checked + .toggle-track {
	background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
	box-shadow: inset 0 1px 2px #0005, 0 0 0 1px #60a5fa66;
}
.toggle-input:checked + .toggle-track .toggle-thumb {
	transform: translateX(20px);
	box-shadow: 0 2px 4px #0008;
}
.toggle-input:focus-visible + .toggle-track {
	box-shadow: 0 0 0 2px #93c5fd;
}
.time-range-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.team-preview {
	display: flex;
	align-items: center;
	gap: 8px;
	height: var(--control-height);
	padding: 0 10px;
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #202020;
	box-sizing: border-box;
	font-size: 0.92rem;
	color: #d1d5db;
}
.simple-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	height: var(--control-height);
	padding: 0 10px;
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #202020;
	box-sizing: border-box;
	cursor: pointer;
}
.simple-checkbox input {
	width: 16px;
	height: 16px;
	margin: 0;
}
.side-options {
	display: flex;
	justify-content: flex-end;
}
.team-logo {
	width: 22px;
	height: 22px;
	object-fit: contain;
	border-radius: 4px;
	background: transparent;
	padding: 0;
}
.calendar-event .team-logo {
	width: 44px;
	height: 44px;
}
#teamPreviewLogo.team-logo {
	width: 28px;
	height: 28px;
}
.event-label-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	min-width: 0;
}
.matchup-inline {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
	max-width: 100%;
	min-width: 0;
}
.matchup-inline span {
	overflow-wrap: anywhere;
	word-break: break-word;
}
.event-badge {
	font-size: 0.72rem;
	line-height: 1;
	padding: 3px 6px;
	border-radius: 999px;
	background: #f59e0b;
	color: #111827;
	font-weight: 700;
}
.editor-form input,
.editor-form select,
.editor-form button,
.inline-controls button {
	height: var(--control-height);
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #202020;
	color: #eee;
	padding: 0 10px;
	box-sizing: border-box;
}
.editor-form select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #93c5fd 50%), linear-gradient(135deg, #93c5fd 50%, transparent 50%);
	background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 30px;
}
.event-form textarea {
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #202020;
	color: #eee;
	padding: 10px;
	box-sizing: border-box;
	min-height: 92px;
	resize: vertical;
	font-family: inherit;
}
.baseball-avg-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--control-height);
	padding: 0 12px;
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #1a1a1a;
	box-sizing: border-box;
	color: #9ca3af;
	font-size: 0.9rem;
}
.baseball-avg-value {
	font-weight: 700;
	color: #93c5fd;
	font-size: 1rem;
}
.editor-form button,
.inline-controls button {
	cursor: pointer;
	background: #2563eb;
	border-color: #2563eb;
}
.inline-controls button.danger { background: #b91c1c; border-color: #b91c1c; }
.editable-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inline-controls { display: flex; gap: 6px; }
.backend-links {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	margin-bottom: 12px;
}
.backend-links a {
	display: inline-block;
	padding: 6px 10px;
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	color: #c7d2fe;
	text-decoration: none;
	font-size: 0.9rem;
	background: #202020;
}
.backend-links a:hover {
	border-color: #60a5fa;
	color: #dbeafe;
}
.link-row { margin-top: 16px; }
.link-row a { color: #93c5fd; text-decoration: none; }
.link-row a:hover { text-decoration: underline; }

.admin-page .calendar-day {
	cursor: pointer;
	transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.admin-page .calendar-day.calendar-day-empty {
	cursor: default;
}

.admin-page .calendar-day:hover {
	transform: translateY(-1px);
	box-shadow: inset 0 0 0 1px #60a5fa;
}

.admin-page .calendar-day.calendar-day-empty:hover {
	transform: none;
	box-shadow: none;
}

@media (max-width: 640px) {
	body {
		overflow-x: hidden;
	}
	.calendar-container {
		width: calc(100% - 16px);
		margin: 12px auto;
		padding: 12px;
	}
	.site-brand {
		flex-direction: column;
		gap: 10px;
		padding: 12px;
		text-align: center;
	}
	.site-brand-logo {
		width: min(200px, 68vw);
	}
	#calendarGrid {
		gap: 4px;
	}
	.calendar-day {
		min-height: 56px;
		padding: 3px;
	}
	.calendar-event {
		padding: 4px;
		gap: 2px;
		margin-bottom: 3px;
	}
	.calendar-event-main {
		gap: 4px;
		flex-wrap: nowrap;
	}
	.calendar-event .team-logo {
		width: 24px;
		height: 24px;
	}
	.calendar-event-title {
		font-size: 0.62rem;
	}
	.calendar-event-time {
		font-size: 0.62rem;
		line-height: 1.05;
		white-space: normal;
	}
	.tournament-result-item {
		grid-template-columns: 1fr;
		gap: 6px;
	}
	.tournament-result-score {
		justify-self: start;
	}
	.editor-form { grid-template-columns: 1fr; }
	.time-range-row { grid-template-columns: 1fr; }
	.editable-row { flex-direction: column; align-items: flex-start; }
	.event-detail-row { grid-template-columns: 1fr; }
	.upcoming-event-top { flex-wrap: wrap; gap: 6px; }
	.upcoming-event-right { width: 100%; justify-content: space-between; margin-left: 0; }
	.upcoming-event-left { width: 100%; }
	.upcoming-event-logos { flex-wrap: wrap; }
	.upcoming-event-matchup { width: 100%; }
	.upcoming-event-logos .team-logo { width: 34px; height: 34px; }
	.upcoming-event-status { font-size: 0.8rem; letter-spacing: 0.12em; }
	.player-teams { grid-template-columns: 1fr; }
	.player-team-soccer-stats { grid-template-columns: 1fr; }
	.player-stats-event-values { grid-template-columns: 1fr; }
	.player-stats-event-values.is-gymnastics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
