/* Flappy-only styles on top of theme.css (shared with the quiz): the ranking
   and admin pages. Colors, type, cards, buttons and fields come from
   theme.css; the page sets data-phase on <body> to pick the accent. */

body { place-items: start center; padding: 24px 16px 40px; }
.page { width: 100%; max-width: 440px; }
.page .card { max-width: none; }
.page h1 { margin-bottom: 0.3em; }
.sub { text-align: center; color: var(--ink-soft); margin: 0 0 18px; }
.actions { display: grid; gap: 10px; margin-top: 16px; }
.links { margin-top: 18px; text-align: center; font-size: var(--fs-sm); color: var(--ink-soft); }
.links a { color: var(--accent); font-weight: 600; }
.btn {
	display: block; padding: 12px 22px; text-align: center; text-decoration: none;
	font-weight: 600; color: var(--on-accent); background: var(--accent);
	border-radius: var(--r-pill);
}
.btn.secondary { color: var(--accent); background: var(--cream-50); border: 2px solid var(--accent); }
label { display: block; margin: 14px 0 6px; font-size: var(--fs-sm); font-weight: 600; }

/* ranking */
.empty { padding: 18px 8px; text-align: center; font-size: var(--fs-md); line-height: 1.5; }
.empty .big { display: block; margin-bottom: 8px; font-family: var(--font-display); font-style: italic; font-size: 2.6rem; color: var(--accent); }
.leaderboard .gap { justify-content: center; min-height: 0; padding: 0; border: 0; background: none; color: var(--ink-soft); }

/* admin */
.stats { display: flex; justify-content: center; gap: 36px; margin: 4px 0 8px; text-align: center; }
.stats b { display: block; font-size: 1.9rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.stats span { font-size: var(--fs-xs); color: var(--ink-soft); }
.group { margin-top: 22px; }
.group h3 { padding-bottom: 8px; border-bottom: 1px solid var(--cream-200); }
.setting {
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	padding: 10px 0; border-bottom: 1px solid var(--cream-200);
}
.setting:last-child { border-bottom: 0; }
.setting .desc { display: block; margin-top: 2px; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-soft); }
.setting label { margin: 0; }

/* the on/off switch */
.switch { position: relative; flex: none; width: 54px; height: 32px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; background: var(--line); border-radius: var(--r-pill); transition: background 0.2s; }
.switch .track::after {
	content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px;
	background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

/* pick-one cards (character, difficulty) */
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.choice { position: relative; margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 100%; height: 100%; min-height: 0; margin: 0; cursor: pointer; }
.choice .box {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	min-height: 5.5rem; padding: 10px; text-align: center;
	background: #fff; border: 2px solid var(--line); border-radius: var(--r-md);
}
.choice .box strong { font-size: var(--fs-sm); }
.choice .box small { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-soft); }
.choice .box img, .choice .box svg { width: 44px; height: 56px; object-fit: contain; }
.choice input:checked + .box { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 2px var(--accent); }
.choice input:focus-visible + .box { box-shadow: var(--ring); }
.tag { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); }

/* the custom values */
.tuning { margin-top: 12px; padding: 12px 14px; background: var(--cream-100); border-radius: var(--r-md); }
.tuning .row { display: grid; grid-template-columns: 7.5rem 1fr 3.6rem; align-items: center; gap: 10px; padding: 4px 0; }
.tuning .row span:first-child { font-size: var(--fs-sm); font-weight: 600; }
.tuning .row output { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.tuning input[type="range"] { width: 100%; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); }
.tuning[data-locked="true"] { opacity: 0.6; }
.hint-note { margin: 10px 0 0; font-size: var(--fs-xs); color: var(--ink-soft); }
.saved { color: var(--ok); font-weight: 700; }
