:root {
	--blue: #3a78bd;
	--blue-soft: #6fa6dc;
	--blue-pale: #bcd9f2;
	--cream: #fbf8f0;
	--gold: #e9c46a;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
	min-height: 100dvh;
	display: grid;
	place-items: center;
	padding: 28px 16px;
	font-family: "Lora", Georgia, serif;
	color: var(--blue);
	background: linear-gradient(180deg, #a9cdf0, #e8f3fd) fixed;
}
.card {
	width: 100%;
	max-width: 400px;
	padding: 10px;
	background: var(--cream);
	border: 3px solid var(--blue-soft);
	border-radius: 28px;
	box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.85), 0 14px 40px rgba(58, 120, 189, 0.25);
}
.inner {
	padding: 24px 22px 20px;
	border: 2px dashed var(--blue-pale);
	border-radius: 20px;
	text-align: center;
}
h1 {
	margin: 0 0 14px;
	font-family: "Dancing Script", cursive;
	font-size: 2.8rem;
	line-height: 1.1;
	color: var(--blue-soft);
	text-shadow: 0 1px 0 #fff, 0 2px 0 rgba(58, 120, 189, 0.3);
}
p { margin: 0 0 12px; }
label { display: block; margin: 10px 0 4px; text-align: left; font-size: 0.95rem; }
input {
	width: 100%;
	padding: 11px 14px;
	font: inherit;
	color: #2d5f96;
	background: #fff;
	border: 2px solid var(--blue-pale);
	border-radius: 14px;
	outline: none;
}
input:focus { border-color: var(--blue-soft); box-shadow: 0 0 0 4px rgba(111, 166, 220, 0.25); }
button, .btn {
	display: inline-block;
	margin-top: 14px;
	padding: 11px 24px;
	font: 600 1rem "Lora", Georgia, serif;
	color: #fff;
	text-decoration: none;
	background: linear-gradient(180deg, #7db3e6, var(--blue));
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}
.error {
	margin: 0 0 8px;
	padding: 9px 12px;
	font-size: 0.92rem;
	color: #a23c56;
	background: #fdf0f3;
	border: 1px dashed #e7a9b8;
	border-radius: 12px;
}
.muted { opacity: 0.8; font-size: 0.9rem; }
.links { margin-top: 16px; font-size: 0.9rem; }
.links a { color: var(--blue); }
/* ranking */
.rank { list-style: none; margin: 0; padding: 0; text-align: left; }
.rank li {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 12px; margin-bottom: 6px;
	background: #fff; border: 2px solid var(--blue-pale); border-radius: 14px;
}
.rank li.top1 { border-color: var(--gold); }
.rank li.me { border-color: var(--blue-soft); background: #eef6fd; }
.rank .pos { width: 2rem; text-align: center; font-weight: 600; }
.rank .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .pts { font-weight: 600; }
.rank .gap { text-align: center; border: 0; background: none; padding: 0; margin: 0 0 6px; color: var(--blue-pale); }
.empty { padding: 18px 8px; font-size: 1.05rem; line-height: 1.5; }
.empty .big { display: block; font-size: 2.4rem; margin-bottom: 6px; }
/* admin */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; text-align: left; }
.switch-row .desc { font-size: 0.85rem; opacity: 0.8; display: block; }
.switch { position: relative; flex: none; width: 52px; height: 30px; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.switch .slider { position: absolute; inset: 0; background: var(--blue-pale); border-radius: 999px; transition: background 0.2s; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .slider { background: var(--blue); }
.switch input:checked + .slider::after { transform: translateX(22px); }
.stats { display: flex; justify-content: center; gap: 28px; margin: 6px 0 4px; }
.stats b { display: block; font-size: 1.8rem; }
