/* Fitdle – game + question page styles */
.fitdle-wrap, .fitdle-single {
	--fd-bg: #0E1322;
	--fd-card: #181F33;
	--fd-line: #2A3350;
	--fd-text: #F4F1E8;
	--fd-muted: #A3AAC2;
	--fd-lime: #C8F25A;
	--fd-orange: #FF8A3D;
	--fd-blue: #7FA8FF;
	--fd-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--fd-body: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.fitdle-wrap { max-width: 480px; margin: 0 auto; }
.fitdle-app, .fitdle-single {
	background: var(--fd-bg); color: var(--fd-text); font-family: var(--fd-body);
	border-radius: 24px; padding: 16px 18px 20px; box-sizing: border-box; position: relative;
	-webkit-font-smoothing: antialiased; line-height: 1.4;
}
.fitdle-app *, .fitdle-single * { box-sizing: border-box; }
.fitdle-app { min-height: 560px; }
.fd-screen { display: flex; flex-direction: column; gap: 14px; }
.fd-loading { padding: 80px 12px; text-align: center; color: var(--fd-muted); }
.fd-center { align-items: center; justify-content: center; text-align: center; padding: 60px 8px; min-height: 520px; }
.fd-h { margin: 0; font-family: var(--fd-display); font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; color: var(--fd-text); }
.fd-center .fd-btn { max-width: 320px; }
.fd-center-text { text-align: center; margin: 0; }
.fd-muted, .fd-small { color: var(--fd-muted); }
.fd-small { font-size: 13px; }
.fd-strong { font-weight: 700; font-size: 18px; }
.fd-orange { color: var(--fd-orange); }
.fd-accent { color: var(--fd-lime); }
.fd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.fd-head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 8px; }
.fd-brand { font-family: var(--fd-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.fd-head-score { font-weight: 700; min-width: 44px; text-align: right; }
.fd-pills { display: flex; gap: 6px; }
.fd-pill { width: 26px; height: 6px; border-radius: 3px; background: var(--fd-line); }
.fd-pill-done { background: var(--fd-lime); }
.fd-pill-now { background: var(--fd-text); }
.fd-icon-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--fd-text); display: grid; place-items: center; border-radius: 12px; cursor: pointer; padding: 0; }
.fd-icon-btn:hover { background: var(--fd-card); }
.fd-units { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--fd-line); background: var(--fd-card); color: var(--fd-text); font: 600 13px var(--fd-body); cursor: pointer; }

/* cards */
.fd-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fd-stat-card { background: var(--fd-card); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.fd-card { background: var(--fd-card); border: 1px solid var(--fd-line); border-radius: 22px; padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.fd-card-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--fd-muted); }
.fd-hero { margin: 0; font-family: var(--fd-display); font-weight: 800; font-size: 30px; line-height: 1.06; letter-spacing: -0.025em; color: var(--fd-text); }
.fd-links { display: flex; flex-direction: column; gap: 8px; }

/* buttons */
.fd-btn { min-height: 52px; border-radius: 16px; border: 0; font: 700 17px var(--fd-body); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 0 18px; text-decoration: none; width: 100%; }
.fd-btn:disabled { opacity: .6; cursor: default; }
.fd-btn-primary { background: var(--fd-lime); color: var(--fd-bg); }
.fd-btn-primary:hover { background: #D6FA78; }
.fd-btn-light { background: var(--fd-text); color: var(--fd-bg); }
.fd-btn-ghost { background: var(--fd-card); color: var(--fd-text); border: 1px solid var(--fd-line); font-size: 15px; font-weight: 600; min-height: 46px; }
.fd-btn-ghost:hover { border-color: var(--fd-muted); }
.fd-link { background: none; border: 0; color: var(--fd-lime); text-decoration: underline; cursor: pointer; font: inherit; }
.fitdle-app button:focus-visible, .fitdle-single button:focus-visible, .fd-range:focus-visible { outline: 3px solid var(--fd-blue); outline-offset: 2px; }

/* round */
.fd-kicker { font-size: 13px; color: var(--fd-muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.fd-nomargin { margin: 0; }
.fd-question { margin: -6px 0 0; font-family: var(--fd-display); font-weight: 800; font-size: 27px; line-height: 1.1; letter-spacing: -0.02em; color: var(--fd-text); }
.fd-hl-item { color: var(--fd-orange); }
.fd-hl-cont { color: var(--fd-blue); }
.fd-panel { background: var(--fd-card); border-radius: 20px; padding: 18px 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fd-scene { display: flex; align-items: flex-end; justify-content: center; gap: 12px; max-width: 100%; }
.fd-box { position: relative; border: 2.5px solid var(--fd-blue); border-radius: 12px 18px 8px 8px; flex: none; overflow: hidden; }
.fd-box-round { border-radius: 50%; }
.fd-box-round .fd-fill { inset: 4px; border-radius: 50%; }
.fd-box-icon { border: 0; border-radius: 0; overflow: visible; }
.fd-c-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; filter: invert(1) sepia(1) saturate(4) hue-rotate(185deg) brightness(1.1); opacity: .45; }
.fd-fill { position: absolute; inset: 6px; display: flex; flex-wrap: wrap-reverse; align-content: flex-start; overflow: hidden; }
.fd-box-icon .fd-fill { inset: 14% 8% 22%; }
.fd-item { flex: none; display: flex; align-items: flex-end; }
.fd-shape, .fd-dot { display: block; background: var(--fd-orange); }
.fd-shape-ball, .fd-dot-ball { border-radius: 50%; }
.fd-shape-box, .fd-dot-box { border-radius: 2px; }
.fd-shape-cylinder, .fd-dot-cylinder { border-radius: 40% / 18%; }
.fd-shape-person, .fd-dot-person { border-radius: 50% 50% 20% 20%; }
.fd-item-img { object-fit: contain; filter: invert(58%) sepia(80%) saturate(1500%) hue-rotate(345deg) brightness(102%); }
.fd-dot { margin: .5px; animation: fd-pop .28s ease-out both; }
.fd-dot-img { background: none; object-fit: contain; filter: invert(58%) sepia(80%) saturate(1500%) hue-rotate(345deg) brightness(102%); }
@keyframes fd-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fd-caption { margin: 0; font-size: 12px; color: var(--fd-muted); text-align: center; }

.fd-guess { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fd-big { font-family: var(--fd-display); font-weight: 800; font-size: 54px; line-height: 1; letter-spacing: -0.03em; color: var(--fd-lime); }
.fd-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.fd-range::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--fd-line), var(--fd-blue)); }
.fd-range::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%; background: var(--fd-lime); border: 4px solid var(--fd-bg); margin-top: -11px; box-shadow: 0 0 0 2px var(--fd-lime); }
.fd-range::-moz-range-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--fd-line), var(--fd-blue)); }
.fd-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--fd-lime); border: 4px solid var(--fd-bg); }
.fd-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--fd-muted); margin-top: -10px; padding: 0 2px; }
.fd-nudge { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* reveal */
.fd-tile { background: var(--fd-card); border-radius: 16px; padding: 12px 14px; }
.fd-tile-answer { background: var(--fd-lime); color: var(--fd-bg); }
.fd-tile-answer .fd-small { color: var(--fd-bg); font-weight: 600; }
.fd-num { font-family: var(--fd-display); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; word-break: break-word; }
.fd-verdict { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.fd-points { font-family: var(--fd-display); font-weight: 800; font-size: 28px; }
.fd-t-great { color: var(--fd-lime); }
.fd-t-good { color: var(--fd-blue); }
.fd-t-ok { color: var(--fd-orange); }
.fd-t-low { color: #FF7A7A; }
.fd-how { background: var(--fd-card); border-radius: 16px; padding: 12px 14px; font-size: 14px; }
.fd-how summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; min-height: 28px; }
.fd-how ol { margin: 8px 0 0; padding-left: 20px; }
.fd-how a { color: var(--fd-lime); }

/* results */
.fd-score { font-family: var(--fd-display); font-weight: 800; font-size: 72px; line-height: 1; letter-spacing: -0.04em; color: var(--fd-lime); }
.fd-score span { font-size: 28px; color: var(--fd-muted); }
.fd-rtiles { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.fd-rtile { width: 52px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.fd-rtile .fd-small { font-size: 11px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; max-width: 52px; white-space: nowrap; }
.fd-rscore { width: 50px; height: 50px; border-radius: 12px; background: var(--fd-card); display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.fd-share-preview { margin: 0; background: var(--fd-card); color: var(--fd-muted); border-radius: 14px; padding: 12px 14px; font: 13px/1.5 var(--fd-body); white-space: pre-wrap; user-select: all; }
.fd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.fd-stats div { background: var(--fd-card); border-radius: 12px; padding: 10px 4px; }
.fd-stats b { display: block; font-size: 20px; }
.fd-stats span { font-size: 11px; color: var(--fd-muted); }
.fd-toast { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--fd-text); color: var(--fd-bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 5; }

/* archive */
.fd-arch { display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow-y: auto; }
.fd-arch-row { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--fd-line); background: var(--fd-card); color: var(--fd-text); font: 600 15px var(--fd-body); cursor: pointer; text-align: left; }
.fd-arch-row:hover { border-color: var(--fd-muted); }

/* ads + about (outside the game area) */
.fd-ad { margin: 16px auto; text-align: center; min-height: 50px; }
.fd-about { margin-top: 24px; }

/* ---------- question pages ---------- */
.fd-q { max-width: 720px; }
.fd-answer-box { border: 2px solid currentColor; border-radius: 16px; padding: 16px 18px; margin: 0 0 20px; }
.fd-answer-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin: 0 0 4px; }
.fd-answer-num { font-family: var(--fd-display); font-weight: 800; font-size: 34px; line-height: 1.1; margin: 0 0 6px; }
.fd-answer-box p:last-child { margin-bottom: 0; }
.fitdle-single { margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; }
.fd-single-stage { display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.fd-single-count { text-align: center; }
.fd-single-count .fd-num { color: var(--fd-lime); }
.fd-single-bar { display: flex; gap: 8px; }
.fd-single-bar .fd-btn { min-height: 44px; font-size: 15px; }
.fd-q table.fd-sizes { width: 100%; border-collapse: collapse; margin: 0 0 20px; }
.fd-q table.fd-sizes th, .fd-q table.fd-sizes td { border-bottom: 1px solid rgba(127,127,127,.3); padding: 8px 6px; text-align: left; vertical-align: top; }
.fd-whatif { display: grid; gap: 10px; margin: 0 0 20px; }
.fd-whatif div { border: 1px solid rgba(127,127,127,.35); border-radius: 12px; padding: 12px 14px; }
.fd-whatif strong { display: block; }
.fd-faq details { border-bottom: 1px solid rgba(127,127,127,.3); padding: 10px 0; }
.fd-faq summary { cursor: pointer; font-weight: 600; }
.fd-cta { display: flex; align-items: center; gap: 12px; background: #0E1322; color: #F4F1E8; border-radius: 16px; padding: 16px; margin: 24px 0; text-decoration: none; }
.fd-cta:hover { color: #F4F1E8; }
.fd-cta span:first-child { flex: 1; }
.fd-cta small { display: block; color: #A3AAC2; }
.fd-cta b.fd-cta-btn { background: #C8F25A; color: #0E1322; border-radius: 10px; padding: 10px 16px; }
.fd-related { list-style: none; padding: 0; margin: 0 0 20px; }
.fd-related li { border-bottom: 1px solid rgba(127,127,127,.3); }
.fd-related a { display: block; padding: 10px 0; }
.fd-checked { font-size: 13px; opacity: .7; }

@media (max-width: 380px) {
	.fd-hero { font-size: 26px; }
	.fd-question { font-size: 23px; }
	.fd-big { font-size: 46px; }
	.fd-score { font-size: 60px; }
}
@media (prefers-reduced-motion: reduce) {
	.fd-dot { animation: none; }
}
