/*
 * Creator application page. Loaded after the landing page's styles.css, so it
 * inherits the header, footer, .button, fonts and .firework keyframes, and only
 * adds what this page needs. Everything is scoped under .apply-page.
 */
.apply-page {
	--sky: #1594b7;
	--pink: #f14a98;
	--mint: #00ce8c;
	--mint-dark: #007e63;
	--sun: #ffdc54;
	--card-line: #258eac;
	--card-shadow: #bfe6ef;
	--soft: #eef8fb;
	--error: #c42a5a;
}

/* Celebration fireworks may spill past the card; never let them widen the page. */
html:has(body.apply-page) { overflow-x: clip; }

/* Keep the footer on the bottom edge when the page is shorter than the window. */
body.apply-page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}
.apply-page main { flex: 1 0 auto; }
.apply-page > footer { flex-shrink: 0; margin-top: 0; }

/* Steps and panels toggle with the hidden attribute; keep it winning over display rules. */
.apply-page [hidden] { display: none !important; }

/* ---------- Hero band ---------- */
.apply-page .ap-band {
	background: linear-gradient(180deg, #9b5ed7 0%, #8584e6 45%, #57d2f7 100%);
	border-bottom: 5px solid #fff;
}
.apply-page .ap-hero {
	padding: 34px 0 120px;
	text-align: center;
}
.apply-page .ap-hero h1 {
	margin: 14px 0 12px;
	color: #fff;
	font-size: clamp(36px, 4.4vw, 58px);
}
.apply-page .ap-hero h1 em {
	color: #ffdd52;
	font-style: normal;
	text-shadow: 0 3px 0 rgba(102, 82, 156, .27);
}
.apply-page .ap-back {
	display: inline-block;
	color: #fff;
	font-weight: 800;
	font-size: 14px;
	text-decoration: none;
	opacity: .9;
}
.apply-page .ap-back:hover { opacity: 1; text-decoration: underline; }

/* ---------- Layout ---------- */
.apply-page .ap-layout {
	display: grid;
	grid-template-columns: 340px minmax(0, 1fr);
	gap: 36px;
	align-items: start;
	margin-top: -84px;
	padding-bottom: 90px;
}
.apply-page .ap-preview {
	position: sticky;
	top: 24px;
}
.apply-page .ap-card {
	background: #fff;
	border: 3px solid var(--card-line);
	border-radius: 23px;
	box-shadow: 0 6px 0 var(--card-shadow);
	padding: 30px 36px 32px;
}

/* ---------- Nametag ---------- */
.apply-page .nametag {
	position: relative;
	background: #fff;
	border: 4px solid #fff;
	border-radius: 28px;
	box-shadow: 0 0 0 3px var(--card-line), 0 9px 0 3px #2889a83b;
	overflow: hidden;
	transition: transform .5s cubic-bezier(.2, 1.4, .4, 1);
}
.apply-page .nametag-sky {
	position: relative;
	height: 170px;
	/* Pre-resized copies of the landing page's badge art: the browser's own
	   downscale of the 1672px original leaves jagged edges at card size. */
	background: url('assets/card-banner-800.webp') center 28% / cover no-repeat;
	background-image: image-set(
		url('assets/card-banner-400.webp') 1x,
		url('assets/card-banner-800.webp') 2x,
		url('assets/card-banner-1200.webp') 3x
	);
	border-bottom: 4px solid #fff;
}
.apply-page .nametag-ribbon {
	position: absolute;
	bottom: -16px;
	left: 50%;
	z-index: 1;
	transform: translateX(-50%);
	padding: 4px 14px;
	background: #fff;
	border: 2px solid #24abd0;
	border-radius: 30px;
	color: #078cae;
	font-weight: 900;
	font-size: 12px;
	white-space: nowrap;
}
.apply-page .nametag-body {
	padding: 30px 22px 26px;
	text-align: center;
}
.apply-page .nametag-name {
	margin: 0;
	font-family: 'Baloo 2', sans-serif;
	font-weight: 800;
	font-size: 34px;
	line-height: 1.05;
	color: var(--sky);
	overflow-wrap: anywhere;
}
.apply-page .nametag-name.is-empty { color: #b4c3cb; }
.apply-page .nametag-handle {
	margin: 6px 0 0;
	color: #223744;
	font-weight: 900;
	font-size: 16px;
}
.apply-page .nametag-user {
	margin: 8px 0 0;
	color: #4b6170;
	font-size: 13px;
}
.apply-page .nametag-user:empty { display: none; }
.apply-page .nametag-platforms,
.apply-page .nametag-tags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}
.apply-page .nametag-platforms li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px 4px 4px;
	border: 2px solid var(--brand);
	border-radius: 30px;
	font-weight: 800;
	font-size: 13px;
	animation: ap-pop .35s cubic-bezier(.2, 1.6, .4, 1) both;
}
.apply-page .nametag-platforms li.is-main { background: color-mix(in srgb, var(--brand) 12%, #fff); }
.apply-page .nametag-platforms small {
	color: #4b6170;
	font-weight: 700;
	font-size: 11px;
}
.apply-page .nametag-platforms .platform-mark {
	width: 22px;
	height: 22px;
	font-size: 9px;
}
.apply-page .nametag-tags li {
	padding: 3px 10px;
	background: #fff6cf;
	border: 1.5px solid #f2c94c;
	border-radius: 30px;
	color: #7a5a00;
	font-weight: 800;
	font-size: 12px;
	animation: ap-pop .35s cubic-bezier(.2, 1.6, .4, 1) both;
}
.apply-page .nametag-stamp {
	position: absolute;
	right: 14px;
	top: 18px;
	margin: 0;
	padding: 6px 12px;
	border: 3px solid var(--mint);
	border-radius: 10px;
	color: var(--mint-dark);
	background: #fff;
	font-family: 'Baloo 2', sans-serif;
	font-weight: 800;
	font-size: 15px;
	transform: rotate(-9deg) scale(2.2);
	opacity: 0;
	pointer-events: none;
}
.apply-page .nametag.is-sent { transform: rotate(-2deg); }
.apply-page .nametag.is-sent .nametag-stamp {
	opacity: 1;
	transform: rotate(-9deg) scale(1);
	transition: transform .35s cubic-bezier(.3, 1.5, .5, 1) .25s, opacity .2s .25s;
}
.apply-page .ap-fireworks {
	position: absolute;
	inset: -40px;
	pointer-events: none;
	z-index: 3;
}
.apply-page .nametag-platforms li.is-placeholder,
.apply-page .nametag-tags li.is-placeholder {
	padding: 5px 12px;
	border: 2px dashed #cfe1e7;
	background: none;
	color: #9aaab4;
	animation: none;
}
.apply-page .nametag li.is-settled { animation: none; }
@keyframes ap-pop {
	from { transform: scale(.4); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

/* ---------- Stepper ---------- */
.apply-page .stepper {
	display: flex;
	justify-content: space-between;
	gap: 6px;
	margin: 0 0 28px;
	padding: 0 0 20px;
	border-bottom: 2px dashed #d8e8ed;
	list-style: none;
	counter-reset: none;
}
.apply-page .stepper li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 1;
	color: #8a9aa5;
	font-weight: 800;
	font-size: 12px;
	text-align: center;
}
.apply-page .stepper span {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #eef3f5;
	border: 2px solid #d8e2e6;
	color: #8a9aa5;
	font-size: 15px;
	font-weight: 900;
}
.apply-page .stepper li.is-current { color: #223744; }
.apply-page .stepper li.is-current span {
	background: var(--sun);
	border-color: #e6b923;
	color: #7a5a00;
	box-shadow: 0 3px 0 #e6b92366;
}
.apply-page .stepper li.is-done { color: var(--mint-dark); }
.apply-page .stepper li.is-done span {
	background: var(--mint);
	border-color: var(--mint-dark);
	color: transparent;
	position: relative;
}
.apply-page .stepper li.is-done span::after {
	content: '';
	position: absolute;
	width: 9px;
	height: 15px;
	border: solid #fff;
	border-width: 0 3px 3px 0;
	transform: translateY(-2px) rotate(45deg);
}

/* ---------- Form ---------- */
.apply-page .ap-step {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}
.apply-page .ap-step legend {
	padding: 0;
	color: var(--sky);
	font-family: 'Baloo 2', sans-serif;
	font-weight: 800;
	font-size: 34px;
	line-height: 1.1;
	scroll-margin-top: 30px;
}
/* Step headings take focus when the step changes, for screen readers; no ring, like the sent panel */
.apply-page .ap-step legend:focus { outline: none; }
.apply-page .ap-help {
	margin: 6px 0 24px;
	color: #4b6170;
	font-size: 16px;
}
.apply-page .field { margin-bottom: 18px; }
.apply-page .ap-step legend + .field { padding-top: 22px; }
.apply-page .field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px;
}
.apply-page label,
.apply-page .label {
	display: block;
	margin: 0 0 6px;
	color: #223744;
	font-weight: 800;
	font-size: 15px;
}
.apply-page .optional {
	color: #8a9aa5;
	font-weight: 700;
	font-size: 13px;
}
.apply-page input:not([type=checkbox]):not([type=radio]),
.apply-page select,
.apply-page textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 8px;
	padding: 12px 14px;
	border: 2px solid #cfe1e7;
	border-radius: 13px;
	background: #fbfeff;
	color: #223744;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
}
.apply-page textarea { resize: vertical; line-height: 1.5; }
.apply-page input::placeholder,
.apply-page textarea::placeholder { color: #9aaab4; font-weight: 600; }
.apply-page input:focus,
.apply-page select:focus,
.apply-page textarea:focus {
	outline: none;
	border-color: #28b8ef;
	box-shadow: 0 0 0 4px #28b8ef33;
	background: #fff;
}
.apply-page [aria-invalid="true"] { border-color: var(--error) !important; }
.apply-page .field-error {
	display: none;
	margin: -2px 0 10px;
	color: var(--error);
	font-weight: 800;
	font-size: 14px;
}
.apply-page .field-error.show { display: block; }
/* Input with a fixed URL prefix, e.g. play.pixadom.com/r/ + handle */
.apply-page .prefix-input {
	display: flex;
	align-items: stretch;
	margin-bottom: 8px;
	border: 2px solid #cfe1e7;
	border-radius: 13px;
	background: #eef6f9;
	overflow: hidden;
}
.apply-page .prefix-input:focus-within {
	border-color: #28b8ef;
	box-shadow: 0 0 0 4px #28b8ef33;
}
.apply-page .prefix-input span {
	display: flex;
	align-items: center;
	padding: 0 4px 0 14px;
	color: #4b6170;
	font-weight: 800;
	white-space: nowrap;
}
.apply-page .prefix-input input {
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	padding-left: 2px !important;
	box-shadow: none !important;
	background: #fff !important;
}
.apply-page .prefix-input:has([aria-invalid="true"]) { border-color: var(--error); }
/* Handle hint: a friendly bubble instead of a plain error */
.apply-page .prefix-input.has-oops {
	border-color: #f2c94c;
	box-shadow: 0 0 0 4px #ffdc5433;
}
.apply-page .handle-wrap { position: relative; }
/* The bubble sits under the input, in the flow, so the field's label stays readable */
.apply-page .handle-hint {
	position: relative;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	width: fit-content;
	max-width: 100%;
	box-sizing: border-box;
	margin: 2px 0 8px;
	padding: 6px 8px 6px 12px;
	background: #fff8d9;
	border: 2px solid #f2c94c;
	border-radius: 14px;
	box-shadow: 0 4px 0 #f2c94c55, 0 8px 20px #22374422;
	font-size: 13px;
	animation: ap-pop .25s cubic-bezier(.2, 1.6, .4, 1) both;
	transform-origin: 30px 0;
}
/* Arrow pointing up at the input */
.apply-page .handle-hint::after {
	content: '';
	position: absolute;
	top: -8px;
	left: 168px;
	width: 12px;
	height: 12px;
	background: #fff8d9;
	border: solid #f2c94c;
	border-width: 0 2px 2px 0;
	transform: rotate(-135deg);
}
.apply-page .handle-hint.nudge { animation: ap-nudge .45s ease-in-out; }
.apply-page .hint-preview {
	font-family: 'Baloo 2', sans-serif;
	font-weight: 800;
	font-size: 16px;
	line-height: 1.2;
	color: #223744;
	overflow-wrap: anywhere;
}
.apply-page .hint-preview mark {
	display: inline-block;
	min-width: .6em;
	margin: 0 1px;
	padding: 0 3px;
	background: #ffd6ea;
	border: 1.5px solid #f14a98;
	border-radius: 6px;
	color: #c42a5a;
	line-height: 1.15;
	text-align: center;
	animation: ap-wiggle .6s ease-in-out 2;
}
.apply-page .hint-text {
	color: #5c4a00;
	font-weight: 700;
}
.apply-page .hint-char {
	display: inline-block;
	padding: 0 6px;
	background: #fff;
	border: 1.5px solid #f2c94c;
	border-radius: 20px;
	font-weight: 900;
}
.apply-page .hint-fix {
	padding: 4px 11px;
	border: 2px solid var(--mint-dark);
	border-radius: 30px;
	background: #e3fbf2;
	color: var(--mint-dark);
	font: inherit;
	font-weight: 900;
	cursor: pointer;
}
.apply-page .hint-fix:hover { background: #ccf6e7; }
.apply-page .hint-fix .fix-short { display: none; }
@keyframes ap-wiggle {
	0%, 100% { transform: rotate(0); }
	25% { transform: rotate(-10deg); }
	75% { transform: rotate(10deg); }
}
@keyframes ap-nudge {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-6px); }
	75% { transform: translateX(6px); }
}
.apply-page .field-note {
	margin: 0 0 6px;
	color: #8a9aa5;
	font-size: 13px;
}
.apply-page .field-note a { color: #176079; font-weight: 800; }
.apply-page .counter {
	margin: -4px 0 6px;
	color: #8a9aa5;
	font-size: 13px;
	text-align: right;
}
.apply-page .sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}
.apply-page :focus-visible { outline: 3px solid #28b8ef; outline-offset: 2px; }

/* Tick boxes */
.apply-page .tick {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 6px 0 8px;
	cursor: pointer;
}
.apply-page .tick input {
	width: 24px;
	height: 24px;
	accent-color: var(--mint);
	flex: none;
}
.apply-page .tick a { color: #176079; }

/* Platform tiles */
.apply-page .platforms {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-bottom: 14px;
}
.apply-page .platform {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 14px 6px 12px;
	border: 2px solid #d8e8ed;
	border-radius: 16px;
	background: #fff;
	cursor: pointer;
	transition: transform .15s, border-color .15s, box-shadow .15s;
}
.apply-page .platform input {
	position: absolute;
	opacity: 0;
}
.apply-page .platform:hover { transform: translateY(-2px); }
.apply-page .platform:has(input:checked) {
	border-color: var(--brand);
	box-shadow: 0 4px 0 color-mix(in srgb, var(--brand) 78%, #000);
	background: color-mix(in srgb, var(--brand) 7%, #fff);
}
.apply-page .platform:has(input:focus-visible) { outline: 3px solid #28b8ef; outline-offset: 2px; }
/* Selected tick: a small mint badge on the tile's corner, clear of the icon */
.apply-page .platform:has(input:checked)::before {
	content: '';
	position: absolute;
	top: -7px;
	right: -7px;
	width: 22px;
	height: 22px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--mint);
	box-shadow: 0 2px 0 var(--mint-dark);
}
.apply-page .platform:has(input:checked)::after {
	content: '';
	position: absolute;
	top: -1px;
	right: 1px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg);
}
.apply-page .platform-mark {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--brand);
	color: var(--brand-ink);
	font-weight: 900;
	font-size: 14px;
	flex: none;
}
.apply-page .platform-mark svg { width: 58%; height: 58%; }
.apply-page .platform-mark[data-id=instagram] {
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.apply-page .platform-name { font-weight: 800; font-size: 14px; }

/* Channel detail rows */
.apply-page .channel {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 12px;
	align-items: center;
	margin-bottom: 10px;
	padding: 12px;
	border: 2px solid color-mix(in srgb, var(--brand) 40%, #fff);
	border-radius: 16px;
	background: color-mix(in srgb, var(--brand) 5%, #fff);
	animation: ap-pop .3s ease-out both;
}
.apply-page .channel-fields {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 8px;
}
.apply-page .channel-fields input,
.apply-page .channel-fields select { margin: 0 !important; }
.apply-page .channel-name,
.apply-page .nametag-toggle { display: none; }
.apply-page .channel-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	margin: 0;
	font-size: 12px;
	cursor: pointer;
}
.apply-page .channel-main input { width: 20px; height: 20px; accent-color: var(--sun); }

/* Chips and segmented control */
.apply-page .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.apply-page .chip,
.apply-page .segmented label { margin: 0; cursor: pointer; }
.apply-page .chip input,
.apply-page .segmented input { position: absolute; opacity: 0; }
.apply-page .chip span,
.apply-page .segmented span {
	display: inline-block;
	padding: 8px 14px;
	border: 2px solid #d8e8ed;
	border-radius: 30px;
	background: #fff;
	font-weight: 800;
	font-size: 14px;
	transition: background .15s, border-color .15s;
}
.apply-page .chip input:checked + span {
	background: #fff6cf;
	border-color: #f2c94c;
	color: #7a5a00;
}
.apply-page .segmented { display: flex; gap: 8px; }
.apply-page .segmented input:checked + span {
	background: #dff6ff;
	border-color: #28b8ef;
	color: #0a6f8f;
}
.apply-page .chip input:focus-visible + span,
.apply-page .segmented input:focus-visible + span { outline: 3px solid #28b8ef; outline-offset: 2px; }

/* Review */
.apply-page .review { margin: 0 0 22px; }
.apply-page .review > div {
	display: grid;
	grid-template-columns: 110px 1fr auto;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 2px dashed #e2eef2;
}
.apply-page .review dt { color: var(--sky); font-weight: 900; }
.apply-page .review dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.apply-page .review dd em { color: #8a9aa5; font-style: normal; }
/* The Edit button sits in its own dd so the list stays valid; it lines up as a bare button would */
.apply-page .review dd:last-child { display: flex; align-self: start; }
.apply-page .review button {
	align-self: start;
	border: 0;
	background: none;
	color: #176079;
	font: inherit;
	font-weight: 900;
	cursor: pointer;
	text-decoration: underline;
}
.apply-page .turnstile-box {
	min-height: 65px;
	margin-top: 16px;
}
.apply-page .ap-alert {
	margin: 16px 0 0;
	padding: 12px 16px;
	border: 2px solid #f5b5cf;
	border-radius: 14px;
	background: #fff0f6;
	color: #8d1f4a;
	font-weight: 800;
	font-size: 15px;
}
/* The alert takes focus when the form ends, for keyboard and screen reader users; no ring, like the step headings */
.apply-page .ap-alert:focus { outline: none; }
.apply-page .handle-status {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 800;
}
.apply-page .handle-status:empty { display: none; }
.apply-page .handle-status.is-free { color: var(--mint-dark); }
.apply-page .handle-status.is-taken { color: var(--error); }
/* Spam trap: off-screen field that people never see or fill in */
.apply-page .ap-trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Navigation */
.apply-page .ap-nav {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 26px;
	padding-top: 22px;
	border-top: 2px dashed #d8e8ed;
}
.apply-page .ap-saved {
	flex: 1;
	margin: 0;
	color: #8a9aa5;
	font-size: 13px;
}
.apply-page .ap-prev {
	padding: 12px 18px;
	border: 2px solid #cfe1e7;
	border-radius: 13px;
	background: #fff;
	color: #223744;
	font: inherit;
	font-weight: 900;
	cursor: pointer;
}
.apply-page .ap-next {
	white-space: nowrap;
	padding: 16px 30px;
	font-size: 17px;
	cursor: pointer;
	font-family: inherit;
}
.apply-page .ap-next:disabled { opacity: .7; cursor: progress; }

/* Sent */
.apply-page .ap-done h2 {
	margin: 0 0 10px;
	color: var(--sky);
	font-size: 38px;
	overflow-wrap: anywhere;
}
.apply-page .ap-done > p { color: #4b6170; font-size: 17px; }
.apply-page .ap-done > p strong { overflow-wrap: anywhere; }
.apply-page .ap-done:focus { outline: none; }
.apply-page .done-steps {
	margin: 22px 0 28px;
	padding: 0;
	list-style: none;
	counter-reset: done;
}
.apply-page .done-steps li {
	position: relative;
	margin-bottom: 16px;
	padding-left: 52px;
	color: #4b6170;
	counter-increment: done;
}
.apply-page .done-steps li strong { display: block; color: #223744; }
.apply-page .done-steps li::before {
	content: counter(done);
	position: absolute;
	left: 0;
	top: 0;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--sun);
	border: 2px solid #e6b923;
	color: #7a5a00;
	font-weight: 900;
}
.apply-page .done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }


@media (prefers-reduced-motion: reduce) {
	.apply-page *,
	.apply-page *::before,
	.apply-page *::after { animation: none !important; transition: none !important; }
}
