:root {
	--bg: #f4f5f7;
	--text: #0f172a;
	--muted: #6b7280;
	--card: #ffffff;
	--shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
	--accent: #0b1b3a;
	--panel: #fefefe;
	--nav-muted: rgba(15, 23, 42, 0.7);
	--glass: rgba(255, 255, 255, 0.6);
	--border: rgba(148, 163, 184, 0.14);
	--split-bg: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
	--tab-track: rgba(15, 23, 42, 0.14);
}

body.dark {
	--bg: #0a1120;
	--text: #f8fafc;
	--muted: #9aa4b2;
	--card: #0f1a2b;
	--shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
	--accent: #e2e8f0;
	--panel: #121d2e;
	--nav-muted: rgba(248, 250, 252, 0.8);
	--glass: rgba(12, 20, 36, 0.75);
	--border: rgba(255,255,255,0.06);
	--split-bg: linear-gradient(180deg, rgba(12,20,36,0.95), rgba(12,20,36,0.85));
	--tab-track: rgba(255,255,255,0.06);
}

@media (prefers-color-scheme: dark) {
	body:not(.light) {
		--bg: #0a1120;
		--text: #f8fafc;
		--muted: #9aa4b2;
		--card: #0f1a2b;
		--shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
		--accent: #e2e8f0;
		--panel: #121d2e;
		--nav-muted: rgba(248, 250, 252, 0.8);
		--glass: rgba(12, 20, 36, 0.75);
	}
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

                        html, body {
                                margin: 0 !important;
                                padding: 0 !important;
                                border: 0 !important;
                                width: 100%;
                                overflow-x: hidden;
                        }

html {
	scrollbar-width: none;
}
html::-webkit-scrollbar {
	display: none;
}

body {
	font-family: 'Noto Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	transition: background 0.3s ease, color 0.3s ease;
}

.wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 18px 24px 80px;
	padding-bottom: max(80px, env(safe-area-inset-bottom, 0px));
}

.top-nav {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	color: var(--nav-muted);
	font-weight: 700;
	letter-spacing: 0.4px;
}

.nav-center {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	column-gap: 80px;
	margin: 0 auto;
	width: 100%;
}

.nav-left,
.nav-right {
	display: flex;
	align-items: center;
	gap: 120px;
}

.nav-left {
	justify-content: flex-end;
}

.nav-right {
	justify-content: flex-start;
}

.top-nav .nav-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--nav-muted);
	text-decoration: none;
}

.top-nav .nav-item:hover,
.top-nav .nav-item:focus {
	text-decoration: none;
}

.theme-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--glass);
	border: 1px solid rgba(148, 163, 184, 0.2);
	color: var(--text);
	padding: 8px 14px;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 600;
	backdrop-filter: blur(6px);
	transition: all 0.3s ease;
}

.theme-toggle:hover {
	transform: scale(1.02);
}

.theme-toggle-wrap {
	margin-top: 28px;
	display: flex;
	justify-content: center;
}

.site-admin-dock {
	margin-top: 28px;
}

.site-admin-inline-panel {
	margin-top: 0;
	box-shadow: none;
	border-radius: 22px;
	background: color-mix(in srgb, var(--card) 92%, transparent);
}

.site-admin-toggle,
.site-admin-btn,
.site-admin-mini-btn {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--glass);
	color: var(--text);
	border-radius: 999px;
	padding: 10px 16px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	backdrop-filter: blur(8px);
}

.site-admin-toggle:hover,
.site-admin-btn:hover,
.site-admin-mini-btn:hover {
	transform: translateY(-1px);
}

.site-admin-body {
	margin-top: 12px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 28px;
	padding: 24px;
	box-shadow: var(--shadow);
	display: grid;
	gap: 18px;
}

.site-admin-head,
.site-admin-toolbar,
.site-admin-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.site-admin-title,
.site-admin-group-title {
	font-weight: 800;
	color: var(--accent);
}

.site-admin-status,
.site-admin-auth-status,
.site-admin-note {
	color: var(--muted);
	font-size: 14px;
	line-height: 1.55;
}

.site-admin-auth-box,
.site-admin-group {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 20px;
	padding: 16px;
	display: grid;
	gap: 12px;
}

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

.admin-menu {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 4px;
}

.admin-menu-btn {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--glass);
	color: var(--text);
	border-radius: 999px;
	padding: 10px 16px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	backdrop-filter: blur(8px);
}

.admin-menu-btn:hover {
	transform: translateY(-1px);
}

.admin-menu-btn.active {
	background: #2563eb;
	border-color: #2563eb;
	color: #ffffff;
}

.admin-menu-section {
	display: none;
	gap: 12px;
	margin-top: 8px;
}

.admin-menu-section.active {
	display: grid;
}

.admin-subcard {
	background: color-mix(in srgb, var(--card) 92%, transparent);
	border: 1px solid var(--border);
	border-radius: 22px;
	padding: 18px;
	box-shadow: var(--shadow);
	gap: 10px;
	display: grid;
}

.admin-subcard-title {
	font-weight: 800;
	font-size: 15px;
	color: var(--accent);
}

.admin-search-input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text);
	font: inherit;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-search-input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.admin-warning-box {
	display: grid;
	gap: 6px;
	padding: 12px 14px;
	border-radius: 16px;
	border: 1px solid rgba(220, 38, 38, 0.24);
	background: rgba(220, 38, 38, 0.08);
	color: #991b1b;
	font-size: 12px;
	line-height: 1.6;
}

body.dark .admin-warning-box {
	background: rgba(239, 68, 68, 0.12);
	border-color: rgba(248, 113, 113, 0.28);
	color: #fecaca;
}

.admin-danger-btn {
	background: #dc2626;
	border-color: #dc2626;
	color: #ffffff;
}

.admin-danger-btn:hover {
	background: #b91c1c;
	border-color: #b91c1c;
}

/* ── Match Manager: Discord-style sidebar + detail ── */
.admin-match-manager {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 0;
	border-radius: 22px;
	overflow: hidden;
	border: 1px solid var(--border);
	background: var(--card);
	box-shadow: var(--shadow);
	min-height: 460px;
}
.admin-match-sidebar {
	display: flex;
	flex-direction: column;
	background: color-mix(in srgb, var(--panel) 60%, transparent);
	border-right: 1px solid var(--border);
	padding: 12px 0 0;
}
.admin-match-sidebar-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 12px 10px;
}
.admin-match-add-btn {
	appearance: none;
	border: none;
	background: #2563eb;
	color: #fff;
	border-radius: 8px;
	padding: 6px 12px;
	font-weight: 800;
	font-size: 12px;
	cursor: pointer;
	transition: background 0.15s;
}
.admin-match-add-btn:hover { background: #1d4ed8; }
.admin-match-search {
	margin: 0 10px 8px;
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text);
	font: inherit;
	font-size: 13px;
	outline: none;
}
.admin-match-search:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.admin-match-list {
	flex: 1;
	overflow-y: auto;
	padding: 0 6px;
	scrollbar-width: thin;
}
.admin-match-list-info {
	padding: 6px 12px 10px;
	font-size: 11px;
	color: var(--muted);
}
.admin-match-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 10px;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.12s;
	margin-bottom: 2px;
}
.admin-match-item:hover {
	background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.admin-match-item.active {
	background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.admin-match-item-sport {
	font-size: 18px;
	flex-shrink: 0;
	width: 28px;
	text-align: center;
}
.admin-match-item-info {
	flex: 1;
	min-width: 0;
	overflow: hidden;
}
.admin-match-item-teams {
	font-weight: 700;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.admin-match-item-date {
	font-size: 11px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.admin-match-item-tag {
	font-size: 9px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 6px;
	background: color-mix(in srgb, var(--accent) 12%, transparent);
	color: var(--accent);
	flex-shrink: 0;
}

/* Detail panel */
.admin-match-detail {
	display: flex;
	flex-direction: column;
	padding: 24px;
}
.admin-match-detail-empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
}
.admin-match-detail-form {
	display: grid;
	gap: 16px;
}
.admin-match-detail-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
}
.admin-match-detail-badge {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	padding: 4px 10px;
	border-radius: 8px;
	font-size: 11px;
	font-weight: 700;
	background: color-mix(in srgb, var(--accent) 10%, transparent);
	color: var(--accent);
}
.admin-match-label {
	display: block;
	font-weight: 700;
	font-size: 13px;
	margin-bottom: 4px;
}
.admin-match-input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--panel);
	color: var(--text);
	font: inherit;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-match-input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.admin-match-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.admin-match-form-grid-3 {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 12px;
}
.admin-match-detail-actions {
	display: flex;
	gap: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--border);
}
.admin-match-action-btn {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--glass);
	color: var(--text);
	border-radius: 10px;
	padding: 10px 18px;
	font: inherit;
	font-weight: 800;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s;
}
.admin-match-action-btn.primary {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}
.admin-match-action-btn.primary:hover { background: #1d4ed8; }
.admin-match-action-btn.danger {
	background: transparent;
	border-color: #dc2626;
	color: #dc2626;
}
.admin-match-action-btn.danger:hover {
	background: #dc2626;
	color: #fff;
}

@media (max-width: 700px) {
	.admin-match-manager {
		grid-template-columns: 1fr;
		min-height: auto;
	}
	.admin-match-sidebar {
		border-right: none;
		border-bottom: 1px solid var(--border);
		max-height: 260px;
	}
	.admin-match-detail {
		padding: 16px;
	}
}

.admin-formation-card {
	display: grid;
	gap: 12px;
	padding: 16px;
	border-radius: 20px;
	border: 1px solid var(--border);
	background: color-mix(in srgb, var(--panel) 90%, transparent);
}

.admin-formation-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.admin-formation-title {
	font-weight: 800;
	color: var(--accent);
}

.admin-formation-sport {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 999px;
	background: var(--glass);
	border: 1px solid var(--border);
	font-size: 12px;
	font-weight: 800;
	color: var(--text);
}

.admin-formation-players {
	display: grid;
	gap: 8px;
}

.admin-formation-player-row {
	display: grid;
	grid-template-columns: 72px 1fr 1.1fr 84px 84px 44px;
	gap: 8px;
	align-items: center;
}

.admin-formation-input,
.admin-formation-select {
	width: 100%;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text);
	font: inherit;
	outline: none;
}

.admin-formation-input:focus,
.admin-formation-select:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.admin-formation-delete {
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	border-radius: 12px;
}

.admin-formation-toolbar {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.admin-formation-note {
	font-size: 12px;
	line-height: 1.6;
	color: var(--muted);
}

/* Visual Formation Editor */
.admin-formation-stage {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.admin-formation-team-switch {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
.admin-formation-visual {
	position: relative;
}
.admin-formation-court-wrap {
	position: relative;
	width: 100%;
	border-radius: 20px;
	overflow: hidden;
	border: 2px solid var(--border);
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}
.admin-formation-court-empty {
	padding: 48px 16px;
	text-align: center;
	color: var(--muted);
	font-size: 13px;
}
/* Court surfaces */
.admin-court {
	position: relative;
	width: 100%;
	overflow: hidden;
}
.admin-court-volleyball {
	aspect-ratio: 2 / 1;
	background: linear-gradient(135deg, #fb923c 0%, #f97316 36%, #ea580c 68%, #c2410c 100%);
}
.admin-court-basketball {
	aspect-ratio: 1.88 / 1;
	background: linear-gradient(180deg, #d8a879 0%, #cb976c 50%, #b57f54 100%);
}
.admin-court-soccer {
	aspect-ratio: 1.5 / 1;
	background: repeating-linear-gradient(90deg, #22C55E 0%, #22C55E 10%, #16A34A 10%, #16A34A 20%);
}
/* Court line overlays */
.admin-court svg.court-lines {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
/* Draggable player dots */
.admin-court .fm-dot {
	position: absolute;
	width: 42px;
	height: 42px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 13px;
	color: #fff;
	transform: translate(-50%, -50%);
	cursor: grab;
	z-index: 10;
	box-shadow: 0 6px 18px rgba(0,0,0,0.3);
	border: 3px solid rgba(255,255,255,0.9);
	transition: box-shadow 0.15s, transform 0.1s;
}
.admin-court .fm-dot:active {
	cursor: grabbing;
	box-shadow: 0 10px 28px rgba(0,0,0,0.45);
	z-index: 20;
}
.admin-court .fm-dot.home {
	background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
}
.admin-court .fm-dot.away {
	background: linear-gradient(135deg, #fb7185 0%, #ef4444 100%);
}
.admin-court .fm-dot.fm-selected {
	box-shadow: 0 0 0 4px #facc15, 0 6px 18px rgba(0,0,0,0.3);
	transform: translate(-50%, -50%) scale(1.12);
	z-index: 25;
}
.admin-court .fm-dot-label {
	position: absolute;
	bottom: -20px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	font-size: 9px;
	font-weight: 700;
	color: #fff;
	background: rgba(0,0,0,0.6);
	padding: 2px 6px;
	border-radius: 6px;
	pointer-events: none;
	max-width: 80px;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* Popover */
.admin-formation-popover {
	display: grid;
	gap: 6px;
	padding: 14px;
	border-radius: 16px;
	border: 1px solid var(--border);
	background: var(--panel);
	box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.admin-formation-popover-title {
	font-weight: 800;
	font-size: 14px;
	color: var(--accent);
	margin-bottom: 2px;
}
.admin-formation-popover-label {
	font-size: 11px;
	font-weight: 700;
	color: var(--muted);
}
.admin-formation-popover-actions {
	display: flex;
	gap: 8px;
	margin-top: 4px;
}
@media (max-width: 500px) {
	.admin-court .fm-dot {
		width: 32px;
		height: 32px;
		font-size: 11px;
		border-radius: 10px;
		border-width: 2px;
	}
	.admin-court .fm-dot-label {
		font-size: 7px;
		bottom: -16px;
	}
}

.site-admin-field {
	display: grid;
	gap: 6px;
	margin-top: 8px;
}

.site-admin-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--accent);
}

.site-admin-input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text);
	font: inherit;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-admin-input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.site-admin-btn.primary {
	background: #2563eb;
	border-color: #2563eb;
	color: #ffffff;
}

.site-admin-mini-btn.warn {
	color: #dc2626;
	border-color: rgba(220, 38, 38, 0.24);
	background: rgba(220, 38, 38, 0.06);
}

body.site-admin-editing [data-site-field] {
	outline: 2px dashed rgba(37, 99, 235, 0.5);
	outline-offset: 4px;
	border-radius: 10px;
	background: rgba(37, 99, 235, 0.08);
	box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.04);
	caret-color: #2563eb;
	cursor: text;
	transition: outline-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.site-admin-editing [data-site-field]:focus {
	outline-color: #2563eb;
	background: rgba(37, 99, 235, 0.12);
	box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.08);
}

body.site-admin-editing .season-tab {
	pointer-events: none;
}

body.site-admin-editing .site-admin-toggle,
body.site-admin-editing .site-admin-btn,
body.site-admin-editing .site-admin-mini-btn,
body.site-admin-editing .theme-toggle {
	pointer-events: auto;
}

.top-nav .logo {
	width: 48px;
	height: 48px;
	object-fit: contain;
}

.hero {
	text-align: center;
	margin-top: 18px;
}

.hero h1 {
	font-family: 'Black Han Sans', 'Noto Sans KR', sans-serif;
	font-weight: 400;
	font-size: clamp(48px, 8vw, 96px);
	letter-spacing: 1px;
}

.hero .season {
	font-weight: 700;
	color: var(--text);
	margin-top: 6px;
}

.panel {
	margin-top: 28px;
	background: var(--card);
	border-radius: 30px;
	padding: 38px 44px 48px;
	box-shadow: none;
	border: 1px solid var(--border);
	transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.panel-title {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: 0.6px;
	margin-bottom: 26px;
	color: var(--accent);
}

.teams {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 60px;
	align-items: center;
	text-align: center;
}

.split-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
	align-items: start;
}

.split-panel {
	background: var(--split-bg);
	border-radius: 26px;
	--panel-hpad: 26px;
	padding: 24px var(--panel-hpad) 26px;
	display: grid;
	gap: 18px;
	box-shadow: var(--shadow);
	border: 1px solid var(--border);
}

.split-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 20px;
	font-weight: 800;
	color: var(--accent);
}

.gender-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: end;
	gap: 0;
	position: relative;
	/* horizontal padding matches panel horizontal padding variable */
	padding: 0 var(--panel-hpad) 10px;
	justify-self: start;
	width: 100%;
	--tab-accent: #2563eb;
	--active-tab: 0;
	overflow: hidden;
}

/* base track that stretches to the card edges (account for panel padding)
   negative offsets match the panel horizontal padding (26px) so the line
   reaches the rounded card edge visually. */

.gender-tabs::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--tab-track);
	border-radius: 999px;
}

/* sliding accent that sits on top of the base track and animates between
   the two halves. left calculation offsets the panel padding so the blue
   bar aligns visually with the card edges. */

.gender-tabs::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	/* exact half width so each tab corresponds to 50% */
	width: 50%;
	height: 3px;
	background: var(--tab-accent);
	border-radius: 999px;
	transform: translateX(calc(var(--active-tab) * 100%));
	transition: transform 0.28s cubic-bezier(.2,.9,.2,1);
}

.gender-tab {
	border: none;
	background: transparent;
	color: var(--text);
	font-weight: 800;
	padding: 4px 10px 8px;
	cursor: pointer;
	position: relative;
	font-size: 16px;
	transition: color 0.2s ease;
}

.gender-tab.active {
	color: var(--tab-accent);
}

.gender-content {
	position: absolute;
	inset: 0;
	opacity: 0;
	transform: translateX(calc(var(--slide-dir, 1) * 18px));
	transition: transform 0.35s cubic-bezier(.2,.9,.2,1), opacity 0.25s ease;
	pointer-events: none;
}

.gender-content.active {
	display: grid;
	gap: 12px;
	opacity: 1;
	transform: translateX(0);
	pointer-events: auto;
}

.gender-panels {
	position: relative;
	width: 100%;
	min-height: 320px;
	height: var(--panel-height, auto);
	transition: height 0.25s ease;
}

.centered-panel .split-title {
	justify-content: center;
}

.centered-panel .gender-tabs {
	justify-self: center;
}

.centered-panel .gender-content {
	justify-items: center;
}

.centered-panel .team-card {
	width: 100%;
	max-width: 420px;
}

.schedule-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 24px;
	text-align: center;
	margin-top: 12px;
}

.season-tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: end;
	gap: 0;
	position: relative;
	padding: 0 12px 10px;
	margin-bottom: 18px;
	--tab-accent: #2563eb;
	--active-tab: 0;
}

.season-tabs::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--tab-track);
	border-radius: 999px;
}

.season-tabs::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: calc(100% / 3);
	height: 3px;
	background: var(--tab-accent);
	border-radius: 999px;
	transform: translateX(calc(var(--active-tab) * 100%));
	transition: transform 0.28s cubic-bezier(.2,.9,.2,1);
}

.season-tab {
	border: none;
	background: transparent;
	color: var(--text);
	font-weight: 800;
	padding: 6px 10px 8px;
	cursor: pointer;
	font-size: 16px;
	transition: color 0.2s ease;
}

.season-tab.active {
	color: var(--tab-accent);
}

.season-content {
	display: none;
}

.season-content.active {
	display: block;
}

.schedule-col {
	background: var(--panel);
	border-radius: 20px;
	padding: 18px 16px 20px;
	min-height: 220px;
	display: grid;
	gap: 10px;
}

.schedule-col h3 {
	font-size: 28px;
	font-weight: 800;
	color: var(--accent);
}

.season-label {
	font-weight: 800;
	color: var(--text);
}

.season-item {
	color: var(--muted);
	font-weight: 600;
}

.team-card {
	background: var(--panel);
	border-radius: 22px;
	padding: 28px 22px 22px;
	transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
	text-align: center;
	box-shadow: var(--shadow);
}

.team-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
}

.team-card h3 {
	font-size: 22px;
	margin-bottom: 12px;
}

.mascot {
	width: 120px;
	height: 120px;
	object-fit: contain;
	margin: 12px 0 18px;
}

.stats {
	display: flex;
	justify-content: center;
	gap: 26px;
	font-weight: 700;
	margin-top: 8px;
}

.stat {
	display: grid;
	gap: 4px;
	min-width: 56px;
}

.stat .value {
	font-size: 22px;
}

.stat .label {
	letter-spacing: 1px;
	font-size: 12px;
	text-transform: uppercase;
}

.stat.win .value {
	color: #10b981;
}

.stat.draw .value {
	color: #94a3b8;
}

.stat.lose .value {
	color: #ef4444;
}

@media (max-width: 860px) {
	.top-nav {
		gap: 40px;
	}

	.nav-center {
		display: flex;
		gap: 32px;
		flex-wrap: wrap;
		justify-content: center;
	}

	.nav-left,
	.nav-right {
		gap: 24px;
		justify-content: center;
	}

	.theme-toggle {
		margin-top: 0;
	}

	.teams {
		grid-template-columns: 1fr;
	}

	.split-grid {
		grid-template-columns: 1fr;
	}

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

@media (max-width: 600px) {
	.wrap {
		padding: 12px 16px 60px;
		padding-left: max(16px, env(safe-area-inset-left, 0px));
		padding-right: max(16px, env(safe-area-inset-right, 0px));
		padding-bottom: max(60px, env(safe-area-inset-bottom, 0px));
	}

	.top-nav {
		gap: 20px;
	}

	.nav-center {
		gap: 16px;
	}

	.nav-left,
	.nav-right {
		gap: 16px;
		font-size: 14px;
	}

	.top-nav .logo {
		width: 40px;
		height: 40px;
	}

	.hero h1 {
		font-size: clamp(36px, 10vw, 60px);
	}

	.hero p {
		font-size: 14px;
	}

	.panel {
		margin-top: 20px;
		padding: 24px 18px 28px;
		border-radius: 20px;
	}

	.panel-title {
		font-size: 20px;
		margin-bottom: 18px;
	}

	.team-item {
		padding: 14px;
	}

	.team-logo {
		width: 40px;
		height: 40px;
	}

	.team-name {
		font-size: 14px;
	}

	.team-record {
		font-size: 12px;
	}

	.split-card {
		padding: 16px;
		border-radius: 16px;
	}

	.tabs {
		padding: 4px;
		gap: 4px;
	}

	.tab-btn {
		padding: 8px 12px;
		font-size: 13px;
	}

	.schedule-item {
		padding: 14px;
	}

	.schedule-teams img {
		width: 28px;
		height: 28px;
	}

	.schedule-teams span {
		font-size: 13px;
	}

	.theme-toggle {
		padding: 6px 12px;
		font-size: 14px;
	}

	.site-admin-inline-grid {
		grid-template-columns: 1fr;
	}

	.admin-menu {
		flex-direction: column;
	}

	.admin-menu-btn {
		width: 100%;
		justify-content: center;
	}

	.admin-formation-player-row {
		grid-template-columns: 1fr 1fr;
	}

	.site-admin-body {
		padding: 18px;
		border-radius: 22px;
	}

	.stat-row {
		gap: 10px;
	}

	.stat .value {
		font-size: 18px;
	}

	.stat .label {
		font-size: 11px;
	}
}

@media (max-width: 360px) {
	.wrap {
		padding: 10px 12px 50px;
	}

	.nav-left,
	.nav-right {
		gap: 12px;
		font-size: 12px;
	}

	.top-nav .logo {
		width: 36px;
		height: 36px;
	}

	.hero h1 {
		font-size: 28px;
	}

	.hero p {
		font-size: 12px;
	}

	.panel {
		padding: 18px 14px 22px;
		border-radius: 16px;
	}

	.panel-title {
		font-size: 16px;
		margin-bottom: 14px;
	}

	.team-item {
		padding: 12px;
	}

	.team-logo {
		width: 32px;
		height: 32px;
	}

	.team-name {
		font-size: 12px;
	}

	.team-record {
		font-size: 10px;
	}

	.tab-btn {
		padding: 6px 8px;
		font-size: 11px;
	}

	.schedule-teams img {
		width: 24px;
		height: 24px;
	}

	.schedule-teams span {
		font-size: 11px;
	}

	.theme-toggle {
		padding: 5px 10px;
		font-size: 12px;
	}

	.stat .value {
		font-size: 16px;
	}

	.stat .label {
		font-size: 10px;
	}

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

	.cal-tooltip {
		max-width: min(250px, 80vw);
		padding: 10px 12px;
		font-size: 11px;
	}
}

/* ── iframe embed support ── */
/* iframe embed support — always applied */
html.in-iframe, html.in-iframe body {
	width: 100%;
	height: 100%;
	overflow-x: hidden;
}
html.in-iframe body {
	-webkit-text-size-adjust: 100%;
}
html.in-iframe .wrap {
	max-width: 1200px;
	margin: 0 auto;
}
html.in-iframe .gender-panels {
	min-height: 0;
}
html.in-iframe .gender-content {
	position: relative;
	inset: auto;
}
html.in-iframe .gender-content:not(.active) {
	display: none;
}
html.in-iframe .gender-content.active {
	position: relative;
	opacity: 1;
	transform: none;
	pointer-events: auto;
}
html.in-iframe .cal-tooltip {
	min-width: 160px;
	white-space: normal;
	word-break: break-word;
}
html.in-iframe.google-sites-embed #adminDock {
	display: none;
}

/* iframe + narrow viewport only (mobile) */
@media (max-width: 860px) {
	html.in-iframe .wrap {
		padding: 12px 12px 24px;
	}
	html.in-iframe .split-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	html.in-iframe .schedule-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	html.in-iframe .teams {
		grid-template-columns: 1fr;
	}
	html.in-iframe .nav-center {
		display: flex;
		gap: 16px;
		flex-wrap: wrap;
		justify-content: center;
	}
	html.in-iframe .nav-left,
	html.in-iframe .nav-right {
		gap: 16px;
		justify-content: center;
		font-size: 14px;
	}
	html.in-iframe .panel {
		padding: 22px 16px 26px;
		border-radius: 20px;
	}
	html.in-iframe .split-panel {
		--panel-hpad: 16px;
		padding: 20px 16px 22px;
	}
	html.in-iframe .team-card {
		padding: 20px 16px 18px;
	}
	html.in-iframe .mascot {
		width: 90px;
		height: 90px;
		margin: 8px 0 14px;
	}
	html.in-iframe .hero h1 {
		font-size: clamp(32px, 10vw, 56px);
	}
	html.in-iframe .stats {
		gap: 18px;
	}
	html.in-iframe .stat .value {
		font-size: 20px;
	}
}

/* ── Calendar ── */

.calendar-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 18px;
}

.calendar-month-label {
	font-weight: 800;
	font-size: 20px;
	min-width: 180px;
	text-align: center;
	color: var(--accent);
}

.calendar-nav-btn {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--glass);
	color: var(--text);
	border-radius: 50%;
	width: 38px;
	height: 38px;
	font-size: 20px;
	font-weight: 800;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, background 0.2s ease;
	backdrop-filter: blur(6px);
}

.calendar-nav-btn:hover {
	transform: scale(1.08);
}

.calendar-today-btn {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--glass);
	color: var(--text);
	border-radius: 999px;
	padding: 6px 16px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	backdrop-filter: blur(6px);
	transition: transform 0.2s ease;
	margin-left: 4px;
}

.calendar-today-btn:hover {
	transform: scale(1.04);
}

.calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	font-weight: 700;
	font-size: 13px;
	color: var(--muted);
	margin-bottom: 6px;
	gap: 4px;
}

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.calendar-day {
	position: relative;
	min-height: 64px;
	border-radius: 14px;
	padding: 6px 4px 4px;
	cursor: default;
	transition: background 0.15s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
}

.calendar-day:hover {
	background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.calendar-day.empty {
	pointer-events: none;
}

.calendar-day .day-number {
	font-weight: 700;
	font-size: 14px;
	color: var(--text);
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

.calendar-day.today .day-number {
	background: #2563eb;
	color: #fff;
}

.calendar-day.selected {
	background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.calendar-day.other-month .day-number {
	color: var(--muted);
	opacity: 0.4;
}

.calendar-dots {
	display: flex;
	gap: 3px;
	flex-wrap: wrap;
	justify-content: center;
}

.calendar-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
}

.calendar-dot.basketball { background: #f59e0b; }
.calendar-dot.volleyball { background: #3b82f6; }
.calendar-dot.soccer { background: #10b981; }

.calendar-event-list {
	margin-top: 18px;
	display: grid;
	gap: 8px;
}

.calendar-event-list:empty {
	display: none;
}

.calendar-event-item {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 12px 16px;
	transition: transform 0.2s ease;
}

.calendar-event-item:hover {
	transform: translateY(-1px);
}

.calendar-event-sport {
	font-size: 22px;
	flex-shrink: 0;
}

.calendar-event-info {
	flex: 1;
	min-width: 0;
}

.calendar-event-title {
	font-weight: 700;
	font-size: 14px;
}

.calendar-event-meta {
	font-size: 12px;
	color: var(--muted);
	margin-top: 2px;
}

.calendar-event-badge {
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--accent) 8%, transparent);
	color: var(--accent);
}

.calendar-no-events {
	text-align: center;
	color: var(--muted);
	font-size: 14px;
	padding: 16px 0;
}

@media (max-width: 700px) {
	.calendar-day {
		min-height: 48px;
		border-radius: 10px;
		padding: 4px 2px 2px;
	}
	.calendar-day .day-number {
		font-size: 12px;
		width: 24px;
		height: 24px;
	}
	.calendar-dot {
		width: 5px;
		height: 5px;
	}
	.calendar-month-label {
		font-size: 16px;
		min-width: 140px;
	}
}
