/* Flashcard study runtime (web/flashcards.js): the learners' page /cards/{pid}?k=…, the studio's preview and the
   SCORM package. The studio's own language: the paper-white canvas with the map's dot grid, Outfit headings over
   Figtree, white cards with soft shadows and round corners, pill buttons; the Flashcard colour (coral to amber,
   the studio's Flashcard tab) as the accent; the ratings in the Pratik levels' red / orange / green, which are
   also the colours of the progress map's placeholders. */
@font-face { font-family: 'Outfit'; src: url('/static/fonts/Outfit-VF.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/static/fonts/Figtree-VF.ttf') format('truetype'); font-weight: 300 900; font-display: swap; }

.fc-body { margin: 0; min-height: 100%; background: #f4f4f8; }
html:has(.fc-body) { height: 100%; background: #f4f4f8; }
/* scrollbars like the studio's (thin, rounded, a soft ink thumb on the paper-white page). The studio loads app.css,
   whose --sb-* tokens win there; the learners' page and the SCORM package have no app.css and take the fallbacks */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sb-thumb, rgba(20, 22, 58, .2)); border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--sb-thumb-hover, rgba(20, 22, 58, .38)); }
::-webkit-scrollbar-thumb:active { background-color: var(--sb-thumb-active, rgba(242, 96, 60, .7)); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--sb-thumb, rgba(20, 22, 58, .2)) transparent; } }
.fc-page { min-height: 100vh; min-height: 100dvh; display: flex; }
.fc-load { margin: auto; }
.fc-load img { width: 56px; height: 56px; animation: fcPulse 1.4s ease-in-out infinite; }
@keyframes fcPulse { 50% { opacity: .45; transform: scale(.94); } }

.fc {
	/* the Flashcard module colour ("Foramind canlı": white text keeps 4.5:1 on both stops); inside the studio it comes
	   from app.css (--m-cards…), on its own pages (cards.html, SCORM) from the fallbacks */
	--fc-a: var(--m-cards, #c63c0c); --fc-b: var(--m-cards-2, #cc4a12); --fc-glow: var(--m-cards-glow, #ffa238); --fc-ink: #1d1d1f; --fc-ink2: #3a3a44; --fc-mute: #6e6e7a; --fc-line: #e3e3ea; --fc-soft: #f5f5f7;
	--fc-r1: #e5484d; --fc-r2: #f5a524; --fc-r3: #2bb673; --fc-disp: 'Outfit', 'Figtree', system-ui, sans-serif;
	--fc-shadow: 0 1px 2px rgba(20, 22, 58, .05), 0 14px 38px rgba(20, 22, 58, .08);
	--fc-cta: linear-gradient(100deg, var(--fc-a) 0%, var(--fc-b) 100%);
	/* the bright tone (no text on it): progress, the card's top stripe, the ring */
	--fc-tone: linear-gradient(100deg, #f2603c 0%, #ff7e3b 55%, var(--fc-glow) 100%);
	position: relative; flex: 1; width: 100%; min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column;
	color: var(--fc-ink); font: 500 16px/1.5 'Figtree', 'Helvetica Neue', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
	background: #f4f4f8 radial-gradient(circle at 1px 1px, #dedee8 1px, transparent 0) 0 0 / 24px 24px;
	--fc-pt: max(16px, env(safe-area-inset-top)); --fc-pb: max(16px, env(safe-area-inset-bottom));
	padding: var(--fc-pt) max(16px, env(safe-area-inset-right)) var(--fc-pb) max(16px, env(safe-area-inset-left));
	overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
.fc *, .fc *::before, .fc *::after { box-sizing: border-box; }
.fc [hidden] { display: none !important; }
.fc button { font-family: inherit; }
/* inside Foramind's frame the "Haritaya dön" pill takes the top-right corner (web/fm-embed.js) */
html.fm-embed .fc { --fc-pt: max(16px, calc(var(--fm-back-b, 56px) + 8px)); }

/* ---- the start screen and the summary: the deck on the left, the progress map on the right.
   With the map the screen is exactly the window's (or the embed frame's, or the host box's) height, whatever the deck
   column holds: the row is minmax(0, 1fr) and the deck column scrolls inside. (A row of minmax(560px, 1fr) in a box of
   min-height only took the deck column's whole content as its height: the map box grew past the frame.) The learners'
   page (.fc-page) gives the height from the viewport; the studio's preview and the SCORM package give it by their box. */
.fc-home { flex: 1; width: min(1320px, 100%); margin: 0 auto; display: grid; gap: 16px; min-height: 0; }
.fc-home.has-map { grid-template-columns: minmax(330px, 410px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); flex: 1 1 0; min-height: 440px; }
.fc-page .fc-home.has-map { flex: none; height: calc(100vh - var(--fc-pt) - var(--fc-pb)); height: calc(100dvh - var(--fc-pt) - var(--fc-pb)); }
.fc-home.has-map > * { min-height: 0; }
.fc-home.no-map { place-items: center; }
.fc-info { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 28px; background: #fff; box-shadow: var(--fc-shadow); min-height: 0; overflow: auto; animation: fcIn .45s cubic-bezier(.16, 1, .3, 1) both; }
.fc-home.no-map .fc-info { width: min(560px, 100%); }
.fc-info.center { align-items: center; text-align: center; }
.fc-brand { display: flex; align-items: center; gap: 14px; }
.fc-badge { width: 76px; height: 76px; flex: none; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(242, 96, 60, .22)); }
.fc-badge.big { width: 132px; height: 132px; }
.fc-kick { margin: 0 0 2px; font: 800 12px/1.2 var(--fc-disp); letter-spacing: .16em; text-transform: uppercase; color: var(--fc-a); }
.fc .fc-title { margin: 0; font: 700 clamp(23px, 3.2vw, 30px)/1.15 var(--fc-disp); letter-spacing: -.025em; color: var(--fc-ink); overflow-wrap: anywhere; }
.fc-lead { margin: 0; color: var(--fc-mute); font-size: 16px; }
.fc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fc-stats.three { grid-template-columns: repeat(3, 1fr); }
.fc-stats > div { padding: 12px 6px 10px; border-radius: 18px; background: var(--fc-soft); text-align: center; }
.fc-stats b { display: block; font: 700 24px/1.05 var(--fc-disp); letter-spacing: -.02em; color: var(--fc-ink); }
.fc-stats span { display: block; margin-top: 3px; font-size: 13px; color: var(--fc-mute); }
.fc-stats .due b { color: var(--fc-a); } .fc-stats .ok b, .fc-stats .r3 b { color: var(--fc-r3); }
.fc-stats .r2 b { color: #d08400; } .fc-stats .r1 b { color: var(--fc-r1); }
.fc-stats .r3 { background: #e7f7ef; } .fc-stats .r2 { background: #fff4dc; } .fc-stats .r1 { background: #fdecec; }
.fc-boxes-wrap { display: flex; flex-direction: column; gap: 6px; }
.fc-boxes { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #ececf2; }
.fc-boxes i { flex: 0 1 0; min-width: 0; }
.fc-boxes .b0 { background: #cfd3df; } .fc-boxes .b1 { background: var(--fc-r1); } .fc-boxes .b2 { background: #f28a3c; }
.fc-boxes .b3 { background: #f5c542; } .fc-boxes .b4 { background: #8bd36a; } .fc-boxes .b5 { background: var(--fc-r3); }
.fc-boxlab { display: flex; justify-content: space-between; font-size: 12px; color: var(--fc-mute); }
.fc-go { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.fc-done-note, .fc-next { margin: 0; color: var(--fc-mute); font-size: 14px; }
.fc-up { margin: 0; color: #178a52; font-weight: 700; font-size: 14px; }
.fc-opened { color: #178a52; font-weight: 700; }
.fc-keys { margin: 0; font-size: 13px; color: var(--fc-mute); }
.fc-keys kbd, .fc-btn kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: 8px; font: 700 12px/1.5 'Figtree', system-ui, sans-serif; text-align: center; }
.fc-keys kbd { background: #fff; box-shadow: inset 0 0 0 1px var(--fc-line), 0 1px 0 var(--fc-line); color: var(--fc-ink2); }
.fc-device { margin: auto 0 0; padding-top: 6px; font-size: 13px; color: var(--fc-mute); }
.fc-link { border: 0; background: none; color: var(--fc-a); font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; }

/* the summary's head: the score ring beside the title */
.fc-sumhead { display: flex; align-items: center; gap: 16px; }
.fc-ring { --p: 0; width: 96px; height: 96px; flex: none; border-radius: 50%; display: grid; place-items: center; position: relative;
	background: conic-gradient(#f2603c, var(--fc-glow) calc(var(--p) * 1%), #ececf2 0); }
.fc-ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.fc-ring b { position: relative; font: 700 24px/1 var(--fc-disp); letter-spacing: -.02em; }

/* ---- the progress map */
.fc-mappanel { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 16px; border-radius: 28px; background: #fff; box-shadow: var(--fc-shadow); animation: fcIn .5s .06s cubic-bezier(.16, 1, .3, 1) both; }
.fc-maphead { display: flex; align-items: center; gap: 14px; padding: 4px 6px 0; }
.fc-maph-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fc-maph-t b { font: 700 20px/1.2 var(--fc-disp); letter-spacing: -.02em; }
.fc-maph-t span { font-size: 14px; color: var(--fc-mute); }
.fc-pct { display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #e7f7ef; color: #146b48; flex: none; }
.fc-pct i { --p: 0; width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(var(--fc-r3) calc(var(--p) * 1%), #c9ecd9 0); position: relative; }
.fc-pct i::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #e7f7ef; }
.fc-pct b { font: 700 18px/1 var(--fc-disp); }
.fc-pct span { font-size: 13px; font-weight: 600; }
.fc-mapwrap { position: relative; flex: 1 1 0; min-height: 220px; border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--fc-line); overscroll-behavior: contain; }
.fc-map { position: absolute; inset: 0; }
.fc .canvas { overflow: hidden; background: #fff radial-gradient(circle at 1px 1px, #e9e9ef 1px, transparent 0) 0 0 / 24px 24px; cursor: grab; touch-action: none; }
.fc .canvas.panning { cursor: grabbing; }
.fc .canvas .world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.fc .canvas svg.edges { position: absolute; overflow: visible; pointer-events: none; }
.fc .canvas .node { position: absolute; user-select: none; -webkit-user-drag: none; }
/* the picture at its real proportions inside the node's box (as on the map), never stretched */
.fc .canvas .node > img { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
.fc .canvas .node.sel { outline: none; }
.fc .canvas .node .badge, .fc .canvas .node .sub-door { display: none; }
.fc .canvas .fm-box { overflow: hidden; }
/* a placeholder: the node's place, never what it is. It is exactly the node's box (inset 0, the node's own corner
   radius --ph-r from web/map-view.js), scaled with the map; the border is drawn inside the box and its glow inset, so
   nothing reaches past the node. --fc-k keeps the border readable when the map is zoomed out (capped at 6% of the box). */
/* (the studio also loads app.css, whose editor placeholder - a dashed striped node with a small spinning ring - must
   not reach these: the node stays bare, the ring is the whole box and still) */
.fc .canvas .node.ph { container-type: size; border: 0; background: none; }
.fc .canvas .node.ph:not(.fcm-pop) .ph-ring { animation: none; }
.fc .canvas .node.ph .ph-ring { position: absolute; inset: 0; width: auto; height: auto; display: grid; place-items: center; container-type: size; border-radius: var(--ph-r, 18px);
	border: min(calc(3px * var(--fc-k, 1)), 6cqmin) dashed #b9bfd3; background: #f1f2f7; }
.fc .canvas .node.ph .ph-ring::after { content: '?'; font: 800 50cqmin/1 var(--fc-disp); color: #a3aac0; }
.fc .canvas .node.fcm-hard .ph-ring { border: min(calc(4px * var(--fc-k, 1)), 6cqmin) solid var(--fc-r2); background: #fff1d6; box-shadow: inset 0 0 0 min(calc(5px * var(--fc-k, 1)), 7cqmin) rgba(245, 165, 36, .18); }
.fc .canvas .node.fcm-hard .ph-ring::after { color: #c27a00; }
.fc .canvas .node.fcm-miss .ph-ring { border: min(calc(4px * var(--fc-k, 1)), 6cqmin) solid var(--fc-r1); background: #ffe5e6; box-shadow: inset 0 0 0 min(calc(5px * var(--fc-k, 1)), 7cqmin) rgba(229, 72, 77, .18); }
.fc .canvas .node.fcm-miss .ph-ring::after { color: #c42b31; }
/* a node the learner knows: in its place, with a small green tick (readable when zoomed out, never over a third of the node) */
.fc .canvas .node.fcm-known::after { content: ''; position: absolute; right: calc(-6px * var(--fc-k, 1)); top: calc(-6px * var(--fc-k, 1));
	width: min(calc(30px * var(--fc-k, 1)), 34%); height: auto; aspect-ratio: 1; border-radius: 50%;
	background: var(--fc-r3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 62% no-repeat;
	box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(20, 22, 58, .2); }
/* what changed in the round pops in, one after the other */
.fc .canvas .node.fcm-pop > *, .fc .canvas .node.ph.fcm-pop .ph-ring { animation: fcmPop .75s cubic-bezier(.3, 1.5, .5, 1) both; }
.fc .canvas .node.fcm-pop.fcm-known::after { animation: fcmTick .5s 1.2s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes fcmPop { 0% { opacity: 0; transform: scale(.35) rotate(-6deg); } 70% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes fcmTick { from { transform: scale(0); } }
.fc-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.fc-zoom button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 12px; background: #fff; color: var(--fc-ink2); cursor: pointer;
	box-shadow: 0 1px 2px rgba(20, 22, 58, .08), 0 4px 12px rgba(20, 22, 58, .1); }
.fc-zoom button:hover { color: var(--fc-a); }
.fc-zoom button:focus-visible { outline: 3px solid var(--fc-a); outline-offset: 2px; }
.fc-zoom svg { width: 18px; height: 18px; }
/* "Büyüt": a pill over the map's top-right corner (the +/−/fit stack keeps the bottom-right one) */
.fc-bigbtn { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 11px; border: 0; border-radius: 999px;
	background: #fff; color: var(--fc-ink2); font: 700 14px/1 'Figtree', system-ui, sans-serif; cursor: pointer;
	box-shadow: 0 1px 2px rgba(20, 22, 58, .08), 0 4px 12px rgba(20, 22, 58, .1); }
.fc-bigbtn svg { width: 16px; height: 16px; flex: none; }
.fc-bigbtn:hover { color: var(--fc-a); }
.fc-bigbtn:focus-visible { outline: 3px solid var(--fc-a); outline-offset: 2px; }
/* the large overlay: its own .fc on <body> (the map's styles apply), the same panel near full screen */
html.fc-big-open { overflow: hidden; }
.fc.fc-bigwrap { position: fixed; inset: 0; z-index: 1200; min-height: 0; display: grid; place-items: center; padding: 24px; overflow: hidden;
	background: rgba(14, 16, 40, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fcBigFade .18s ease; }
@keyframes fcBigFade { from { opacity: 0; } }
.fc-big { width: 100%; height: 100%; max-width: 1800px; min-height: 0; display: flex; flex-direction: column; }
.fc-big > .fc-mappanel { flex: 1; min-height: 0; box-shadow: 0 30px 80px rgba(10, 10, 40, .35); animation: none; }
.fc-big .fc-mapwrap { flex: 1 1 0; min-height: 0; }
.fc-big .fc-maphead .fc-x { box-shadow: inset 0 0 0 1px var(--fc-line); }
.fc-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0 2px; list-style: none; }
.fc-legend li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 999px; background: var(--fc-soft); font-size: 13px; color: var(--fc-ink2); }
.fc-legend i { width: 14px; height: 14px; border-radius: 5px; }
.fc-legend b { font: 700 14px/1 var(--fc-disp); }
.fc-legend .lg-known i { background: var(--fc-r3); } .fc-legend .lg-hard i { background: var(--fc-r2); }
.fc-legend .lg-miss i { background: var(--fc-r1); } .fc-legend .lg-new i { background: #f1f2f7; box-shadow: inset 0 0 0 2px #b9bfd3; }

/* ---- buttons */
.fc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px; border: 0; border-radius: 999px;
	font: 700 16px/1.2 'Figtree', system-ui, sans-serif; color: var(--fc-ink); cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1.5px #d2d2d7;
	transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s, filter .2s; }
.fc-btn:hover { transform: translateY(-1px); }
.fc-btn:active { transform: translateY(1px); }
.fc-btn:focus-visible { outline: 3px solid var(--fc-a); outline-offset: 3px; }
.fc-btn.primary { color: #fff; background: var(--fc-cta); box-shadow: 0 10px 24px rgba(255, 162, 56, .38); }
.fc-btn.primary:hover { box-shadow: 0 14px 30px rgba(242, 96, 60, .36); }
.fc-btn.ghost:hover { box-shadow: inset 0 0 0 1.5px #4a4a55; }
.fc-btn svg { width: 20px; height: 20px; flex: none; }
.fc-btn.big { width: 100%; min-height: 58px; font-size: 18px; }
.fc-btn.primary kbd { background: rgba(255, 255, 255, .24); color: #fff; }

/* ---- a round: the card large, the picture taking most of its front */
.fc-play { width: min(860px, 100%); margin: 0 auto; flex: 1; display: flex; flex-direction: column; gap: 14px; min-height: min(780px, calc(100dvh - 32px)); }
.fc-top { display: flex; align-items: center; gap: 12px; }
html.fm-embed .fc-top { padding-right: var(--fm-back-w, 0px); }
.fc-x { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fff; color: var(--fc-ink2); cursor: pointer; box-shadow: var(--fc-shadow); }
.fc-x svg { width: 18px; height: 18px; }
.fc-x:hover { color: var(--fc-r1); }
.fc-x:focus-visible { outline: 3px solid var(--fc-a); outline-offset: 2px; }
.fc-bar { flex: 1; height: 10px; border-radius: 999px; background: #e6e6ee; overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--fc-tone); transition: width .45s cubic-bezier(.16, 1, .3, 1); }
.fc-count { font: 700 14px/1 var(--fc-disp); color: var(--fc-ink2); font-variant-numeric: tabular-nums; }
.fc-card { flex: 1; min-height: 420px; perspective: 1800px; cursor: pointer; outline: none; border-radius: 28px; animation: fcIn .4s cubic-bezier(.16, 1, .3, 1) both; }
.fc-card:focus-visible .fc-face { box-shadow: 0 0 0 4px var(--fc-glow), var(--fc-shadow); }
.fc-inner { position: relative; width: 100%; height: 100%; min-height: inherit; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.3, 1.2, .45, 1); }
@keyframes fcIn { from { opacity: 0; transform: translateY(14px); } }
.fc-card.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 28px; background: #fff; overflow: hidden;
	-webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 1px 2px rgba(20, 22, 58, .06), 0 22px 54px rgba(20, 22, 58, .12); }
.fc-front::before, .fc-back::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--fc-tone); }
.fc-back::before { background: var(--fc-r3); }
.fc-hint { position: relative; z-index: 1; align-self: flex-start; margin: 4px 0 0; padding: 5px 12px; border-radius: 999px; background: #fff1ea; color: #b4441f; font-size: 13px; font-weight: 700; letter-spacing: .02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the node's picture: most of the front, on the map's dotted paper */
.fc-pic { position: relative; flex: 1 1 62%; min-height: 160px; border-radius: 18px;
	background: #f6f6fa radial-gradient(circle at 1px 1px, #e3e3ec 1px, transparent 0) 0 0 / 20px 20px; }
.fc-pic img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; display: block; filter: drop-shadow(0 10px 20px rgba(20, 22, 58, .14)); }
.fc-pic.gone { display: none; }
.fc-qbox { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 8px 6px; text-align: center; }
.fc-card.no-pic .fc-front { justify-content: center; }
.fc-card.no-pic .fc-front::after { content: '?'; position: absolute; right: 6%; bottom: -6%; font: 800 46vmin/1 var(--fc-disp); color: #fff3ec; z-index: 0; pointer-events: none; }
.fc-card.no-pic .fc-qbox { position: relative; z-index: 1; flex: 1; justify-content: center; }
.fc-q { margin: 0; font: 700 clamp(21px, 3.4vw, 30px)/1.25 var(--fc-disp); letter-spacing: -.02em; color: var(--fc-ink); overflow-wrap: anywhere; }
.fc-card.no-pic .fc-q { font-size: clamp(24px, 4.4vw, 38px); }
.fc-q.small { font-size: 16px; font-weight: 600; color: var(--fc-mute); text-align: left; }
.fc-think { margin: 0; font-size: 14px; color: var(--fc-mute); }
.fc-back { transform: rotateY(180deg); padding: 22px 26px; }
.fc-backhead { display: flex; align-items: center; gap: 14px; padding-top: 4px; }
.fc-thumb { width: 72px; height: 72px; flex: none; object-fit: contain; border-radius: 12px; background: var(--fc-soft); padding: 4px; }
.fc-alab { text-align: center; margin: 6px 0 0; font: 800 12px/1 var(--fc-disp); letter-spacing: .14em; text-transform: uppercase; color: #178a52; }
.fc-a { margin: 0; flex: 1; overflow: auto; display: flex; align-items: safe center; justify-content: center; text-align: center; padding: 8px 4% 18px;
	font: 600 clamp(21px, 3.2vw, 31px)/1.42 'Figtree', system-ui, sans-serif; color: var(--fc-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
/* the card turns both ways: a small chip in the corner says which side the next click shows (on the front only
   once the answer has been seen) */
.fc-turn { position: absolute; top: 16px; right: 16px; z-index: 2; display: none; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 999px;
	background: rgba(255, 255, 255, .92); box-shadow: inset 0 0 0 1px var(--fc-line), 0 2px 8px rgba(20, 22, 58, .06); color: var(--fc-ink2); font-size: 13px; font-weight: 700; pointer-events: none; }
.fc-turn svg { width: 14px; height: 14px; color: var(--fc-a); }
.fc-back .fc-turn, .fc-card.seen .fc-front .fc-turn { display: inline-flex; }
.fc-card.seen .fc-front .fc-hint { max-width: calc(100% - 150px); }
.fc-back .fc-backhead { padding-right: 150px; }
.fc-act { display: flex; flex-direction: column; gap: 10px; padding-bottom: 2px; }
.fc-act .fc-btn.big { min-height: 54px; border-radius: 18px; }
/* the ratings: one compact row of three; the key on the left in the rating's colour, a large label beside it */
.fc-rate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; animation: fcIn .3s ease both; }
.fc-rb { --c: var(--fc-r3); --tint: #e7f7ef; --ink: #146b48;
	display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 0; height: 54px; padding: 0 16px 0 10px; border: 0; border-radius: 18px;
	background: #fff; color: var(--ink); cursor: pointer; font: 700 16px/1.15 'Figtree', system-ui, sans-serif; letter-spacing: -.01em;
	box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 34%, transparent), 0 1px 2px rgba(20, 22, 58, .05), 0 6px 16px rgba(20, 22, 58, .06);
	transition: background .18s, box-shadow .18s, transform .18s cubic-bezier(.16, 1, .3, 1); }
.fc-rb.r1 { --c: var(--fc-r1); --tint: #fdecec; --ink: #b4232a; }
.fc-rb.r2 { --c: var(--fc-r2); --tint: #fff4dc; --ink: #9a5b00; }
.fc-rb kbd { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--c); color: #fff;
	font: 800 18px/1 var(--fc-disp); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14); }
.fc-rb.r2 kbd { color: #3a2400; }
.fc-rb span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-rb:hover { background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--c), 0 8px 20px rgba(20, 22, 58, .08); transform: translateY(-1px); }
.fc-rb:active { transform: translateY(1px); }
.fc-rb:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; background: var(--tint); }

/* ---- a phone: one column; the map comes right after the title, the buttons stay big */
@media (max-width: 860px) {
	.fc-home.has-map, .fc-page .fc-home.has-map { display: flex; flex-direction: column; gap: 14px; height: auto; min-height: 0; flex: 1 0 auto; }
	.fc-home.has-map > .fc-info { display: contents; }
	.fc-home.has-map .fc-brand, .fc-home.has-map .fc-sumhead { order: 1; }
	.fc-home.has-map .fc-lead { order: 2; }
	/* the title, the numbers and the start buttons come first (on a 360x640 phone too), then the map */
	.fc-home.has-map .fc-info > * { order: 6; }
	.fc-home.has-map .fc-info > .fc-brand, .fc-home.has-map .fc-info > .fc-sumhead { order: 1; }
	.fc-home.has-map .fc-info > .fc-lead { order: 2; }
	.fc-home.has-map .fc-info > .fc-stats { order: 3; }
	.fc-home.has-map .fc-info > .fc-go { order: 4; }
	.fc-home.has-map .fc-mappanel { order: 5; }
	/* a phone: the map box a fixed height (the small viewport, so the browser's bars coming and going never resize it) */
	.fc-home.has-map .fc-mapwrap { flex: none; height: clamp(280px, 46vh, 560px); height: clamp(280px, 46svh, 560px); min-height: 0; }
	.fc-home.has-map .fc-device { margin: 0; }
	.fc-mappanel { padding: 12px; border-radius: 28px; }
	.fc-maphead { flex-wrap: wrap; }
	/* the overlay takes the whole screen; the close button stays on the title's row */
	.fc.fc-bigwrap { padding: 0; }
	.fc-big > .fc-mappanel { border-radius: 0; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
	.fc-big .fc-maphead { flex-wrap: nowrap; }
	.fc-big .fc-maph-t span, .fc-big .fc-pct span { display: none; }
}
@media (max-width: 560px) {
	.fc-info { padding: 20px; border-radius: 28px; }
	.fc-badge { width: 60px; height: 60px; }
	.fc-stats { grid-template-columns: repeat(4, 1fr); gap: 6px; }
	.fc-stats b { font-size: 24px; }
	.fc-stats span { font-size: 12px; }
	.fc-card { min-height: 64vh; }
	.fc-face { padding: 12px; border-radius: 28px; }
	.fc-back { padding: 18px; }
	.fc-pic { flex-basis: 68%; padding: 8px; border-radius: 18px; }
	.fc-ring { width: 78px; height: 78px; }
	.fc-ring b { font-size: 20px; }
	.fc-btn kbd, .fc-keys { display: none; }
	.fc-legend li { padding: 5px 10px 5px 8px; font-size: 12px; }
	.fc-rate { gap: 8px; }
	.fc-rb { height: 50px; gap: 8px; padding: 0 10px 0 8px; border-radius: 18px; font-size: 16px; }
	.fc-rb kbd { width: 26px; height: 26px; border-radius: 8px; font-size: 14px; }
	.fc-act .fc-btn.big { min-height: 50px; border-radius: 18px; }
	/* a phone: the turn chip is a round icon, so it never covers the question */
	.fc-turn { top: 10px; right: 10px; width: 34px; height: 34px; padding: 0; justify-content: center; }
	.fc-turn > span { display: none; }
	.fc-turn svg { width: 16px; height: 16px; }
	.fc-card.seen .fc-front .fc-hint { max-width: calc(100% - 48px); }
	.fc-back .fc-backhead { padding-right: 40px; }
}
/* a narrow phone: the label alone, in the rating's colour, a coloured bar over it instead of the key */
@media (max-width: 440px) {
	.fc-rb { padding: 0 6px; position: relative; overflow: hidden; }
	.fc-rb kbd { display: none; }
	.fc-rb::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c); }
}
@media (hover: none) { .fc-btn kbd, .fc-keys { display: none; } }
@media (prefers-reduced-motion: reduce) {
	.fc-inner { transition: none; }
	.fc-card, .fc-info, .fc-mappanel, .fc-rate { animation: none; }
	.fc-card.flipped .fc-front, .fc-card:not(.flipped) .fc-back { visibility: hidden; }
	.fc-load img { animation: none; }
}
