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

[hidden] {
	display: none !important;
}

.pt-reg {
	--accent: #f5c518;
	--accent-ink: #1a1200;
	--glow: rgba(245, 197, 24, 0.22);
	--bg: #0b1220;
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	background:
		radial-gradient(1100px 520px at 50% -10%, var(--glow), transparent 70%),
		var(--bg);
	color: #f8fafc;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.pt-reg.pt-theme-midnight {
	--accent: #38bdf8;
	--accent-ink: #04121c;
	--glow: rgba(56, 189, 248, 0.22);
	--bg: #050b18;
}

.pt-reg.pt-theme-emerald {
	--accent: #22c55e;
	--accent-ink: #03150a;
	--glow: rgba(34, 197, 94, 0.22);
	--bg: #04130c;
}

.pt-reg.pt-theme-royal {
	--accent: #c084fc;
	--accent-ink: #160624;
	--glow: rgba(192, 132, 252, 0.24);
	--bg: #0f0720;
}

.pt-reg-shell {
	width: min(560px, 100%);
	margin: 0 auto;
	padding: max(28px, env(safe-area-inset-top)) 18px max(32px, env(safe-area-inset-bottom));
}

/* Back to the tournaments list. A pill rather than a bare circle so the
   destination is named on a page a player may reach from a shared link. */
.pt-reg-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 4px;
	padding: 9px 14px 9px 10px;
	border: 2px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: #e2e8f0;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
}

.pt-reg-back svg {
	width: 18px;
	height: 18px;
}

.pt-reg-back:hover,
.pt-reg-back:focus-visible {
	border-color: var(--accent);
	color: var(--accent);
}

.pt-reg-head {
	margin: 12px 0 22px;
	text-align: center;
}

.pt-reg-kicker {
	display: inline-block;
	margin: 0 0 10px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.pt-reg-head h1 {
	margin: 0;
	font-size: clamp(28px, 7vw, 40px);
	line-height: 1.1;
	font-weight: 900;
	overflow-wrap: anywhere;
}

.pt-reg-date {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 10px 0 0;
	color: #cbd5e1;
	font-size: 16px;
	font-weight: 700;
}

.pt-reg-date svg {
	width: 18px;
	height: 18px;
}

.pt-reg-card {
	margin: 0 0 16px;
	padding: 22px 20px;
	border: 2px solid rgba(255, 255, 255, 0.14);
	border-top: 5px solid var(--accent);
	border-radius: 18px;
	background: #111a2e;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.pt-reg-card:focus {
	outline: none;
}

.pt-reg-card h2 {
	margin: 0 0 16px;
	font-size: 22px;
	line-height: 1.2;
	font-weight: 900;
}

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

.pt-reg-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.pt-reg-field span {
	color: #e2e8f0;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.pt-reg-field input {
	width: 100%;
	min-height: 52px;
	padding: 10px 14px;
	border: 2px solid #475569;
	border-radius: 12px;
	background: #0b1220;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
}

.pt-reg-field input:focus {
	border-color: var(--accent);
	outline: none;
	box-shadow: 0 0 0 4px var(--glow);
}

.pt-reg-field input.is-invalid {
	border-color: #f87171;
}

.pt-reg-trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.pt-reg-error {
	margin: 14px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #7f1d1d;
	color: #fff;
	font-weight: 800;
}

.pt-reg-submit,
.pt-reg-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 56px;
	margin-top: 18px;
	padding: 0 18px;
	border: 0;
	border-radius: 14px;
	background: var(--accent);
	color: var(--accent-ink);
	font: inherit;
	font-size: 18px;
	font-weight: 900;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.08s, filter 0.12s;
}

.pt-reg-submit:hover:not(:disabled),
.pt-reg-action:hover {
	filter: brightness(1.08);
}

.pt-reg-submit:active:not(:disabled) {
	transform: scale(0.98);
}

.pt-reg-submit:disabled {
	opacity: 0.75;
	cursor: default;
}

.pt-reg-action.is-danger {
	background: #b91c1c;
	color: #fff;
}

.pt-reg-back:focus-visible,
.pt-reg-submit:focus-visible,
.pt-reg-action:focus-visible,
.pt-reg-link:focus-visible,
.pt-reg-board:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.pt-reg-spinner {
	width: 20px;
	height: 20px;
	border: 3px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: pt-reg-spin 0.6s linear infinite;
}

@keyframes pt-reg-spin {
	to { transform: rotate(360deg); }
}

.pt-reg-state {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.pt-reg-state > svg {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
}

.pt-reg-state h2 {
	margin: 2px 0 6px;
	overflow-wrap: anywhere;
}

.pt-reg-state p {
	margin: 0;
	color: #cbd5e1;
	font-size: 16px;
	line-height: 1.5;
}

.pt-reg-state.is-pending > svg {
	color: var(--accent);
}

.pt-reg-state.is-approved > svg {
	color: #4ade80;
}

.pt-reg-state.is-rejected > svg {
	color: #f87171;
}

.pt-reg-state.is-waitlist > svg {
	color: var(--accent);
}

.pt-reg-state.is-removed > svg {
	color: #4ade80;
}

.pt-reg-status:has(.is-approved) {
	border-top-color: #22c55e;
}

.pt-reg-status:has(.is-rejected) {
	border-top-color: #ef4444;
}

.pt-reg-status:has(.is-waitlist) {
	border-top-color: var(--accent);
}

.pt-reg-status:has(.is-removed) {
	border-top-color: #22c55e;
}

.pt-reg-note {
	margin: 0 0 14px;
	padding: 10px 12px;
	border: 1px solid rgba(245, 197, 24, 0.45);
	border-radius: 10px;
	background: rgba(245, 197, 24, 0.12);
	color: #fde68a;
	font-weight: 700;
}

.pt-reg-wait {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 18px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.06);
	font-weight: 800;
}

.pt-reg-pulse {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--accent);
	animation: pt-reg-pulse 1.4s ease-out infinite;
}

@keyframes pt-reg-pulse {
	0% { box-shadow: 0 0 0 0 var(--glow); opacity: 1; }
	100% { box-shadow: 0 0 0 10px transparent; opacity: 0.5; }
}

.pt-reg-link {
	display: block;
	margin: 14px auto 0;
	padding: 6px;
	border: 0;
	background: none;
	color: #e2e8f0;
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	text-decoration: underline;
	cursor: pointer;
}

.pt-reg-link.is-danger {
	color: #fca5a5;
}

.pt-reg-confirm {
	margin: 18px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(239, 68, 68, 0.12);
	color: #fecaca;
	font-weight: 700;
}

.pt-reg-closed {
	border-top-color: #64748b;
	text-align: center;
}

.pt-reg-closed h2 {
	margin-bottom: 8px;
}

.pt-reg-closed p {
	margin: 0;
	color: #cbd5e1;
	font-size: 16px;
	line-height: 1.5;
}

.pt-reg-board {
	display: block;
	margin: 6px auto 0;
	padding: 10px;
	color: var(--accent);
	font-size: 16px;
	font-weight: 800;
	text-align: center;
}

@media (max-width: 420px) {
	.pt-reg-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pt-reg-pulse,
	.pt-reg-spinner {
		animation-duration: 2s;
	}
}

/* Tournament details: when and where on one line, then what it costs and the
   starting stack as a borderless table, the label above its value, one column
   each and the columns spread evenly across the card. Centred, so the card
   reads as one block on a page a player opens on a phone. */
.pt-reg-info {
	text-align: center;
}

.pt-reg-info-line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 6px 12px;
	margin: 0;
	color: #f8fafc;
	font-size: 17px;
	font-weight: 800;
}

.pt-reg-info-part {
	overflow-wrap: anywhere;
}

/* A scheduled close is a footnote to the details, not another headline. */
.pt-reg-closes {
	color: #94a3b8;
	font-size: 14px;
	font-weight: 700;
}

.pt-reg-sep {
	color: #475569;
	font-weight: 900;
}

/* Borderless, but edge to edge: no column widths are set, so a fixed layout
   shares the card's width evenly however many details there are — two when
   nothing is priced, three without blinds, four in the usual case. */
.pt-reg-fees {
	width: 100%;
	margin: 12px 0 0;
	border-collapse: collapse;
	table-layout: fixed;
}

.pt-reg-fees th,
.pt-reg-fees td {
	border: 0;
	text-align: center;
	vertical-align: baseline;
	overflow-wrap: anywhere;
}

.pt-reg-fees th {
	padding: 0 0 2px;
	color: #94a3b8;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.pt-reg-fees td {
	padding: 2px 0 0;
	color: #f8fafc;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.25;
}

/* Four columns of "£300 + £5" on a small phone need the smaller step, or the
   values of neighbouring columns sit against each other. */
@media (max-width: 420px) {
	.pt-reg-fees th {
		font-size: 11px;
		letter-spacing: 0.03em;
	}

	.pt-reg-fees td {
		font-size: 14px;
	}
}

/* The registered list, and the waitlist queue below it. */
.pt-reg-registered h2,
.pt-reg-waitlist h2 {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pt-reg-waitlist {
	border-top-color: #64748b;
}

.pt-reg-count.is-wait {
	background: rgba(255, 255, 255, 0.16);
	color: #e2e8f0;
}

.pt-reg-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 15px;
	font-weight: 900;
}

.pt-reg-cap {
	margin-left: 6px;
	color: #94a3b8;
	font-size: 16px;
	font-weight: 800;
}

.pt-reg-names {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 18px;
	max-height: 340px;
	margin: 0;
	padding: 0;
	overflow: auto;
	list-style: none;
}

.pt-reg-names li {
	padding: 6px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	color: #e2e8f0;
	font-weight: 700;
	overflow-wrap: anywhere;
}

/* Administrator tools on the sign-up page: the three lists, one name per row,
   with the controls that name allows. Public rows keep their plain look. */
.pt-reg-admin-note {
	margin: 0 0 14px;
	padding: 10px 12px;
	border: 1px solid rgba(245, 197, 24, 0.4);
	border-radius: 10px;
	background: rgba(245, 197, 24, 0.12);
	color: #fde68a;
	font-weight: 700;
}

.pt-reg-pending {
	border-top-color: var(--accent);
}

.pt-reg-approve-all {
	margin: 0 0 0 auto;
	padding: 6px 4px;
	font-size: 14px;
}

.pt-reg-names.is-admin {
	grid-template-columns: minmax(0, 1fr);
}

.pt-reg-names.is-admin li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
}

.pt-reg-names.is-admin .pt-reg-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pt-reg-admin-empty {
	color: #94a3b8;
	font-weight: 600;
}

.pt-reg-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.06);
	color: #e2e8f0;
	cursor: pointer;
	transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.pt-reg-icon svg {
	width: 18px;
	height: 18px;
}

.pt-reg-icon:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.14);
}

.pt-reg-icon:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.pt-reg-icon:disabled {
	opacity: 0.55;
	cursor: default;
}

.pt-reg-icon.is-ok {
	border-color: rgba(74, 222, 128, 0.45);
	color: #4ade80;
}

.pt-reg-icon.is-danger {
	border-color: rgba(248, 113, 113, 0.5);
	color: #fca5a5;
}

/* Promote is the one action that moves a name into the event. It stays an
   outline like its neighbours, in a green a shade stronger than the approve
   check so the two are not mistaken for each other. */
.pt-reg-icon.is-promote {
	border-color: rgba(34, 197, 94, 0.65);
	color: #22c55e;
}

.pt-reg-icon.is-promote:hover:not(:disabled) {
	border-color: #22c55e;
	background: rgba(34, 197, 94, 0.16);
	color: #4ade80;
}

.pt-reg-edit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	width: 100%;
}

.pt-reg-edit input {
	flex: 1 1 120px;
	min-width: 0;
	min-height: 38px;
	padding: 0 10px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 9px;
	background: rgba(0, 0, 0, 0.25);
	color: #fff;
	font: inherit;
}

.pt-reg-edit input:focus {
	border-color: var(--accent);
	outline: none;
}

.pt-reg-confirm-inline {
	color: #fca5a5;
	font-size: 14px;
	font-weight: 800;
	text-align: center;
}

@media (max-width: 640px) {
	/* A confirmation on a phone gets the whole row, with the question and its
	   two answers centred, so the green check is not crowded by the name. */
	.pt-reg-names.is-admin li.is-confirm {
		justify-content: center;
		text-align: center;
	}

	.pt-reg-names.is-admin li.is-confirm .pt-reg-name,
	.pt-reg-names.is-admin li.is-confirm .pt-reg-row-actions {
		flex: 1 1 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.pt-reg-names {
		grid-template-columns: minmax(0, 1fr);
	}
}
