/*
 * Atlas Arcadia - the public player page ([aa_player]).
 *
 * Plan: docs/plans/2026-10-16-002-feat-profile-refresh-public-player-page-plan.md (U4)
 * Design: Public.dc.html (desktop 1280) and PublicMobile.dc.html (390).
 *
 * TOKEN MAP (design variable -> site token):
 *   --aa-yellow / --aa-orange / --aa-brown / --aa-cream   same names
 *   --aa-red-count        --aa-stripe-4 (#e8542a, the red band of the retro sweep)
 *   --aa-black            --aa-black
 *   --aa-orange-light     --aa-stripe-2 (#f5a623)
 *   --aa-brown-light      --aa-muted
 *   --aa-yellow-light     --aa-yellow-light (added to tokens.css)
 *   --aa-orange-dark      --aa-orange-dark  (added to tokens.css)
 *   --shadow-card         --aa-shadow-card  (added to tokens.css; same value as .aa-card)
 *   Press Start 2P        --aa-pixel (Beep Mode One); no Google font
 *   --font-display        --aa-display (Cartridge); --font-body --aa-text (Poppins)
 *
 * Every var() carries a literal fallback so the page holds if tokens.css is absent.
 * Background and colour are set together on every surface.
 * BREAKPOINT 767px (Elementor's phone boundary): the card becomes a centred column.
 */

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

.aa-player {
	--pl-orange: var(--aa-orange, #db680b);
	--pl-orange-dark: var(--aa-orange-dark, #b8560a);
	--pl-orange-light: var(--aa-stripe-2, #f5a623);
	--pl-brown: var(--aa-brown, #6a3306);
	--pl-brown-light: var(--aa-muted, #7d6f5a);
	--pl-yellow: var(--aa-yellow, #fae905);
	--pl-yellow-light: var(--aa-yellow-light, #fff7b0);
	--pl-red: var(--aa-stripe-4, #e8542a);
	--pl-black: var(--aa-black, #000);
	--pl-cream: var(--aa-cream, #fdf6e8);
	--pl-rule: var(--aa-rule, #e2ded4);
	--pl-shadow: var(--aa-shadow-card, 0 1px 3px rgba(60, 40, 20, .14));
	--pl-display: var(--aa-display, 'Cartridge', ui-sans-serif, system-ui, sans-serif);
	--pl-accent: 'Righteous', var(--pl-display);
	--pl-text: var(--aa-text, 'Poppins', ui-sans-serif, system-ui, sans-serif);
	--pl-pixel: var(--aa-pixel, 'Beep Mode One', ui-monospace, 'Courier New', monospace);

	width: 100%;
	max-width: var(--aa-column, 1200px);
	margin: 0 auto;
	padding: 32px 24px 64px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	background: transparent;
	color: var(--pl-brown);
	font-family: var(--pl-text);
}

/* The page template prints the shell page's title ("Player") as a heading; the card is the page. */
body.aa-player-view .elementor-location-single .elementor-widget-heading,
body.aa-player-view .elementor-widget-heading .elementor-heading-title {
	display: none;
}

/* --- owner banner --- */
.aa-player__banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	padding: 12px 20px;
	border-radius: 8px;
	background: var(--pl-yellow-light);
	color: var(--pl-brown);
	font-size: 15px;
}

.aa-player__banner a,
.aa-player__banner a:visited {
	color: var(--pl-brown);
	font-size: 15px;
	text-decoration: underline;
}

.aa-player__banner a:hover {
	color: var(--pl-orange);
}

/* --- the card --- */
.aa-player__card,
.aa-player__contrib {
	background: #fff;
	color: var(--pl-brown);
	border-radius: 8px;
	box-shadow: var(--pl-shadow);
}

.aa-player__card {
	overflow: hidden;
}

.aa-player__stripes {
	display: flex;
	flex-direction: column;
}

.aa-player__stripes i {
	display: block;
	height: 10px;
}

.aa-player__stripes i:nth-child(1) { background: var(--pl-yellow); }
.aa-player__stripes i:nth-child(2) { background: var(--pl-orange); }
.aa-player__stripes i:nth-child(3) { background: var(--pl-red); }
.aa-player__stripes i:nth-child(4) { background: var(--pl-brown); }

.aa-player__body {
	padding: 40px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 32px 40px;
}

.aa-player__photo {
	flex: 0 0 auto;
	width: 168px;
	height: 168px;
	border-radius: 9999px;
	background: var(--pl-orange);
	box-shadow: 0 0 0 5px var(--pl-yellow), 0 0 0 8px var(--pl-brown);
	line-height: 0;
}

.aa-player .aa-player__photo img.aa-player__avatar {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	border-radius: 9999px;
	object-fit: cover;
}

.aa-player__who {
	flex: 999 1 360px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aa-player .aa-player__name {
	margin: 0;
	padding: 0;
	font-family: var(--pl-display);
	font-weight: 700;
	font-size: 52px;
	line-height: 1.05;
	letter-spacing: normal;
	text-transform: none;
	color: var(--pl-brown);
	overflow-wrap: anywhere;
}

.aa-player .aa-player__real {
	margin: 0;
	font-family: var(--pl-accent);
	font-size: 24px;
	color: var(--pl-orange-dark);
	overflow-wrap: anywhere;
}

.aa-player .aa-player__bio {
	margin: 4px 0 0;
	max-width: 60ch;
	font-size: 18px;
	line-height: 1.6;
	color: var(--pl-brown);
	white-space: pre-line;
	overflow-wrap: anywhere;
}

/* --- score box --- */
.aa-player__score {
	flex: 1 1 260px;
	max-width: 320px;
	padding: 20px 24px;
	border-radius: 8px;
	background: var(--pl-black);
	color: var(--aa-cream, #fdf6e8);
	box-shadow: inset 0 0 0 3px var(--pl-brown);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.aa-player__score-label {
	font-family: var(--pl-pixel);
	font-size: 12px;
	letter-spacing: 2px;
	color: var(--pl-orange-light);
}

.aa-player__score-num {
	font-family: var(--pl-pixel);
	font-size: 34px;
	line-height: 1.2;
	letter-spacing: 2px;
	color: var(--pl-yellow);
	text-shadow: 3px 3px 0 var(--pl-orange-dark);
}

.aa-player__level {
	display: block;
}

.aa-player__score-cap {
	font-size: 13px;
	color: var(--pl-cream);
}

/* --- accepted contributions --- */
.aa-player__contrib {
	padding: 24px 28px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.aa-player .aa-player__h2 {
	margin: 0;
	padding: 0;
	font-family: var(--pl-display);
	font-weight: 700;
	font-size: 24px;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	color: var(--pl-brown);
}

.aa-player .aa-player__empty,
.aa-player .aa-player__note {
	margin: 0;
	font-size: 15px;
	color: var(--pl-brown-light);
}

.aa-player .aa-player__list {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
}

.aa-player .aa-player__item {
	display: grid;
	grid-template-columns: 6.5rem minmax(0, 1fr) auto 3.5rem;
	align-items: baseline;
	gap: 4px 16px;
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--pl-rule);
	font-size: 15px;
	line-height: 1.4;
}

.aa-player .aa-player__item:last-child {
	border-bottom: 0;
}

.aa-player__type {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--pl-orange-dark);
}

.aa-player .aa-player__link,
.aa-player .aa-player__link:visited {
	color: var(--pl-brown);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: .15em;
	overflow-wrap: anywhere;
}

.aa-player .aa-player__link:hover {
	color: var(--pl-orange);
}

.aa-player__date {
	font-size: 13px;
	color: var(--pl-brown-light);
	white-space: nowrap;
}

.aa-player__pts {
	font-family: var(--pl-pixel);
	font-size: 15px;
	text-align: right;
	color: var(--pl-brown);
}

/* --- phone: a centred column --- */
@media (max-width: 767px) {
	.aa-player {
		padding: 20px 16px 40px;
		gap: 16px;
	}

	.aa-player__banner {
		flex-wrap: nowrap;
		padding: 10px 16px;
		font-size: 14px;
	}

	.aa-player__banner a,
	.aa-player__banner a:visited {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		font-size: 14px;
		white-space: nowrap;
	}

	.aa-player__stripes i {
		height: 8px;
	}

	.aa-player__body {
		padding: 28px 20px 24px;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: center;
		gap: 12px;
		text-align: center;
	}

	.aa-player__photo {
		width: 128px;
		height: 128px;
		box-shadow: 0 0 0 4px var(--pl-yellow), 0 0 0 7px var(--pl-brown);
	}

	.aa-player__who {
		flex: 0 1 auto;
		width: 100%;
		align-items: center;
		gap: 12px;
	}

	.aa-player .aa-player__name {
		margin-top: 8px;
		font-size: 38px;
	}

	.aa-player .aa-player__real {
		font-size: 20px;
	}

	.aa-player .aa-player__bio {
		margin: 0;
		font-size: 16px;
	}

	.aa-player__score {
		flex: 0 0 auto;
		align-self: stretch;
		max-width: none;
		margin-top: 8px;
		padding: 16px 20px;
		align-items: center;
	}

	.aa-player__score-label {
		font-size: 11px;
	}

	.aa-player__score-num {
		font-size: 30px;
	}

	.aa-player__score-cap {
		font-size: 12px;
	}

	.aa-player__contrib {
		padding: 20px;
		gap: 6px;
	}

	.aa-player .aa-player__h2 {
		font-size: 22px;
	}

	.aa-player .aa-player__empty,
	.aa-player .aa-player__note {
		font-size: 14px;
	}

	.aa-player .aa-player__item {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"type pts"
			"link link"
			"date date";
		gap: 2px 12px;
	}

	.aa-player__type { grid-area: type; }
	.aa-player .aa-player__link { grid-area: link; }
	.aa-player__date { grid-area: date; }
	.aa-player__pts { grid-area: pts; }
}
