/* Foramind practice runtime (web/practice-runtime.js): the studio's practice tab and the learner page.
   Everything is scoped under .fmp so the studio's own styles and these never meet. The colours follow the
   live competition: the purple night #4B2A8F → #251A5C → #120D2E, gold #F5C542, violet #7B3FE4, pink #E0409C.
   The map canvas basics are repeated here because the learner page does not load app.css. */
@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; }

.fmp { --gold: #F5C542; --violet: #7B3FE4; --pink: #E0409C; --night: #251A5C; --night-0: #120D2E; --night-2: #4B2A8F;
  --ok: #2BB673; --bad: #E5484D; --ink: #1d1d1f; --disp: 'Outfit', 'Figtree', system-ui, sans-serif;
  --lv-new: #9AA2B8; --lv-developing: #F5A524; --lv-strong: #4CC38A; --lv-mastered: #18A058;
  position: relative; display: flex; flex-direction: column; height: 100%; min-height: 520px; overflow: hidden; isolation: isolate;
  color: #fff; font: 15px/1.45 'Figtree', 'Segoe UI', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse at 25% 15%, var(--night-2) 0%, var(--night) 48%, var(--night-0) 100%); -webkit-tap-highlight-color: transparent; }
.fmp *, .fmp *::before, .fmp *::after { box-sizing: border-box; }
.fmp [hidden] { display: none !important; }
.fmp button { font: inherit; color: inherit; cursor: pointer; }
.fmp h2, .fmp h3, .fmp h4 { font-family: var(--disp); margin: 0; letter-spacing: -.02em; color: inherit; }
.fmp svg { display: block; }
/* scrollbars in the practice theme (the mode menu, the statistics, the side panel, the card bank): thin,
   rounded and translucent on the purple night instead of the grey browser bar; scrolling stays as it is.
   Blink / WebKit draw ::-webkit-scrollbar; only Firefox (no such selector) takes scrollbar-width / -color, which
   in Chromium would replace the rounded bar with the plain thin one */
@supports not selector(::-webkit-scrollbar) {
  .fmp, .fmp * { scrollbar-width: thin; scrollbar-color: var(--sb-thumb, rgba(255, 255, 255, .28)) transparent; }
}
.fmp ::-webkit-scrollbar { width: 10px; height: 10px; }
.fmp ::-webkit-scrollbar-track, .fmp ::-webkit-scrollbar-corner { background: transparent; }
.fmp ::-webkit-scrollbar-thumb { background: var(--sb-thumb, rgba(255, 255, 255, .25)); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; min-height: 40px; }
.fmp ::-webkit-scrollbar-thumb:hover { background-color: var(--sb-thumb-hover, rgba(255, 255, 255, .45)); }
.fmp ::-webkit-scrollbar-thumb:active { background-color: rgba(245, 197, 66, .7); }
.fmp ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

/* ── the learner page's bar ── */
.fmp-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); flex: none; }
.fmp-top img { width: 30px; height: 30px; }
.fmp-top-t { flex: 1; min-width: 0; font-family: var(--disp); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmp-top-u { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: .9; }

/* ── layout: the map, the side panel (below the map on narrow screens) ── */
.fmp-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 31vw, 480px); gap: 10px; padding: 10px;
  padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.fmp-stage { position: relative; min-width: 0; min-height: 0; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 18px 50px rgba(8, 4, 30, .45), inset 0 0 0 1px rgba(255, 255, 255, .5); }
.fmp-canvas { position: absolute; inset: 0; }
/* the side panel does not scroll as a whole: its body does, and the card bank inside it (the Check button stays) */
.fmp-side { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.fmp-side.is-dragscroll, .fmp-side.is-dragscroll * { cursor: grabbing !important; user-select: none; }
.fmp[data-kind="menu"] .fmp-side, .fmp[data-kind="menu"] .fmp-hud > :not(.fmp-snd), .fmp[data-kind="gate"] .fmp-hud, .fmp[data-kind="gate"] .fmp-side { visibility: hidden; }

/* the map canvas (the same as the studio's, for the learner page) */
.fmp .canvas { position: absolute; inset: 0; overflow: hidden; background: #fff radial-gradient(circle at 1px 1px, #e9e9ef 1px, transparent 0) 0 0 / 24px 24px; cursor: grab; touch-action: none; }
.fmp .canvas.panning { cursor: grabbing; }
.fmp .canvas .world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.fmp .canvas svg.edges { position: absolute; overflow: visible; pointer-events: none; }
.fmp .canvas .node { position: absolute; user-select: none; -webkit-user-drag: none; transition: filter .15s; }
.fmp .canvas .node > img { width: 100%; height: 100%; display: block; pointer-events: none; }
.fmp .canvas .node.sel { outline: none; }
.fmp .canvas .node .badge, .fmp .canvas .node .sub-door { display: none; }

/* ── question marks on the map ── */
.fmp .canvas .node.fq { cursor: pointer; }
.fmp .canvas .node.fq > img { visibility: hidden; }
.fmp .fq-slot { position: absolute; inset: 4%; display: grid; place-items: center; container-type: size; border: 3px dashed #B6A3E6; border-radius: 18%;
  background: rgba(247, 244, 255, .94); transition: border-color .15s, background .15s, box-shadow .2s, transform .2s; }
.fmp .fq-slot b { font-family: var(--disp); font-size: 52cqmin; font-weight: 800; color: var(--violet); line-height: 1; }
.fmp .fq-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.fmp .canvas .node.fq:hover .fq-slot { border-color: var(--violet); }
.fmp .canvas .node.fq-over .fq-slot { border: 4px solid var(--gold); background: #FFF7DB; box-shadow: 0 0 0 8px rgba(245, 197, 66, .35); transform: scale(1.05); }
.fmp .canvas .node.fq-ok .fq-slot { border: 5px solid var(--ok); background: #fff; }
.fmp .canvas .node.fq-bad .fq-slot { border: 5px solid var(--bad); background: #fff; }
.fmp .canvas .node.fq-bad .fq-slot img { opacity: .55; filter: grayscale(.4); }
.fmp .canvas .node.fq-rec .fq-slot { border: 5px solid var(--gold); background: #fff; box-shadow: 0 0 0 6px rgba(245, 197, 66, .3); }
.fmp .canvas .node.fq-ok::after, .fmp .canvas .node.fq-bad::after, .fmp .canvas .node.fq-rec::after { position: absolute; right: -4%; top: -4%; width: 22%; aspect-ratio: 1; min-width: 22px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: max(13px, 1em); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); z-index: 2; }
.fmp .canvas .node.fq-ok::after { content: '✓'; background: var(--ok); }
.fmp .canvas .node.fq-bad::after { content: '✕'; background: var(--bad); }
.fmp .canvas .node.fq-rec::after { content: '★'; background: var(--gold); color: #5b3b00; }
/* the one question of a duel / rush round */
.fmp .canvas .node.fq-target { z-index: 3; }
.fmp .canvas .node.fq-target .fq-slot { inset: 2%; border: 6px solid #fff; border-radius: 20%; background: linear-gradient(135deg, #7B3FE4 0%, #B43FD8 55%, #E0409C 100%);
  box-shadow: 0 0 0 6px var(--gold), 0 0 60px 16px rgba(245, 197, 66, .45), 0 18px 40px rgba(60, 20, 120, .4); animation: fmpQ 1.6s ease-in-out infinite; }
.fmp .canvas .node.fq-target .fq-slot b { color: #fff; font-size: 64cqmin; text-shadow: 0 .04em .12em rgba(40, 0, 80, .45); }
.fmp .canvas .node.fq-target::before { content: ''; position: absolute; inset: -9%; border-radius: 26%; border: 7px dashed var(--gold); animation: fmpRing 9s linear infinite; pointer-events: none; }
.fmp .canvas .node.fq-target.fq-ok .fq-slot, .fmp .canvas .node.fq-target.fq-bad .fq-slot { background: #fff; animation: none; }
.fmp .canvas .node.fq-target.fq-ok .fq-slot { border-color: var(--ok); box-shadow: 0 0 0 6px rgba(43, 182, 115, .35), 0 0 50px 10px rgba(43, 182, 115, .35); }
.fmp .canvas .node.fq-target.fq-bad .fq-slot { border-color: var(--bad); box-shadow: 0 0 0 6px rgba(229, 72, 77, .3); }
.fmp .canvas .node.fq-hit { z-index: 4; animation: fmpHit 1s cubic-bezier(.3, 1.6, .5, 1); }
.fmp .canvas .node.fq-hit::before { content: ''; position: absolute; inset: -10px; border-radius: 22%; border: 5px solid var(--gold); box-shadow: 0 0 0 5px #fff, 0 0 40px 10px rgba(255, 170, 0, .6); animation: fmpHalo 1s ease-out forwards; pointer-events: none; }
.fmp .canvas .node.fq-drop .fq-slot { animation: fmpDrop .35s ease-out; }
/* "Haritada göster": the level of each node. --fq-k grows the marks as the map is zoomed out (--fq-z, set by the
   runtime) so they stay readable; the ring's line and the badge's symbol differ per level, not only the colour */
.fmp .canvas { --fq-k: clamp(1, calc(1.1 / var(--fq-z, 1)), 4.5); }
.fmp .fq-lvring { position: absolute; inset: calc(-5px * var(--fq-k)); border-radius: 18%; pointer-events: none; z-index: 1;
  border: calc(3px * var(--fq-k)) solid var(--lvc); box-shadow: 0 0 calc(12px * var(--fq-k)) rgba(var(--lvg), .55); }
.fmp .fq-lvring.fq-r-new { --lvc: #c6cbe0; --lvg: 198, 203, 224; border-style: dashed; box-shadow: none; }
.fmp .fq-lvring.fq-r-developing { --lvc: var(--lv-developing); --lvg: 245, 165, 36; }
.fmp .fq-lvring.fq-r-strong { --lvc: var(--lv-strong); --lvg: 76, 195, 138; border-width: calc(5px * var(--fq-k)); }
.fmp .fq-lvring.fq-r-mastered { --lvc: #F5C542; --lvg: 245, 197, 66; border-style: double; border-width: calc(7px * var(--fq-k)); box-shadow: 0 0 calc(18px * var(--fq-k)) rgba(245, 197, 66, .8), inset 0 0 calc(10px * var(--fq-k)) rgba(245, 197, 66, .45); }
.fmp .fq-lvbadge { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 3px 9px 3px 4px; border-radius: 999px; font: 800 13px/1.1 var(--disp); color: #fff; background: var(--lvc); border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(10, 4, 40, .35); transform: translate(-30%, -55%) scale(var(--fq-k)); transform-origin: 0 0; }
.fmp .fq-lvbadge .fq-lvic { width: 17px; height: 17px; flex: none; }
.fmp .fq-lvbadge.fq-b-new { --lvc: #6b7390; } .fmp .fq-lvbadge.fq-b-developing { --lvc: #d98a00; } .fmp .fq-lvbadge.fq-b-strong { --lvc: #1f9a62; }
.fmp .fq-lvbadge.fq-b-mastered { color: #3b2a00; background: linear-gradient(135deg, #FFD95C, #E8A200); }
/* the legends: the same symbols, in the level's colour */
.fmp .fq-lvic { width: 14px; height: 14px; flex: none; }
.fmp .lvt-new { color: #b6bdd4; } .fmp .lvt-developing { color: var(--lv-developing); } .fmp .lvt-strong { color: var(--lv-strong); } .fmp .lvt-mastered { color: #F5C542; }
.fmp .fmp-legend .lvt-new, .fmp .fmp-legend .lvt-developing, .fmp .fmp-legend .lvt-strong, .fmp .fmp-legend .lvt-mastered { color: inherit; }
.fmp .fmp-legend .lvt-new .fq-lvic { color: #b6bdd4; } .fmp .fmp-legend .lvt-developing .fq-lvic { color: var(--lv-developing); }
.fmp .fmp-legend .lvt-strong .fq-lvic { color: var(--lv-strong); } .fmp .fmp-legend .lvt-mastered .fq-lvic { color: #F5C542; }
.fmp .lv-new { background: var(--lv-new); } .fmp .lv-developing { background: var(--lv-developing); } .fmp .lv-strong { background: var(--lv-strong); }
.fmp .lv-mastered { background: var(--lv-mastered); box-shadow: 0 0 0 0 rgba(24, 160, 88, .6), 0 0 10px rgba(24, 160, 88, .7); }

/* ── the bar on the map ── */
.fmp-hud { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 5; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.fmp-hud > * { pointer-events: auto; }
.fmp-hud-mode { font-family: var(--disp); font-weight: 700; font-size: 15px; color: var(--night); background: rgba(255, 255, 255, .9); padding: 6px 12px; border-radius: 999px; box-shadow: 0 2px 10px rgba(30, 10, 80, .12); }
.fmp-hud-mode:empty { display: none; }
.fmp-hud-stats { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.fmp-hbtn { display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(37, 26, 92, .92); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(20, 8, 60, .3); }
.fmp-hbtn svg { width: 20px; height: 20px; }
.fmp-hbtn:hover { background: var(--violet); }
.fmp-snd, .fmp-sq { padding: 0; justify-content: center; flex: none; }
.fmp-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; background: rgba(37, 26, 92, .92); color: #fff; font-size: 14px; box-shadow: 0 4px 14px rgba(20, 8, 60, .25); }
.fmp-chip svg { width: 16px; height: 16px; opacity: .8; }
.fmp-chip b { font-family: var(--disp); font-size: 16px; font-variant-numeric: tabular-nums; }
.fmp-chip em { font-style: normal; font-size: 12px; opacity: .75; }
.fmp-chip.big { height: 44px; padding: 0 16px; } .fmp-chip.big b { font-size: 22px; }
.fmp-chip.mult b { color: var(--gold); font-size: 20px; }
.fmp-chip.mult.m2 { background: #7B3FE4; } .fmp-chip.mult.m3 { background: #B43FD8; } .fmp-chip.mult.m4 { background: linear-gradient(100deg, #E0409C, #F59E0B); animation: fmpGlow 1s ease-in-out infinite; }
.fmp-timer { position: relative; width: 56px; height: 56px; flex: none; display: grid; place-items: center; }
.fmp-timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.fmp-timer .tr { fill: rgba(29, 22, 70, .92); stroke: rgba(255, 255, 255, .18); stroke-width: 4; }
.fmp-timer .tf { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 119.4; transition: stroke-dashoffset .12s linear; }
.fmp-timer b { position: relative; font-family: var(--disp); font-size: 20px; }
.fmp-timer.warn .tf { stroke: var(--bad); } .fmp-timer.warn b { color: #ffb4b4; animation: fmpBeat 1s ease-in-out infinite; }
.fmp-vs { display: flex; align-items: center; gap: 8px; }
.fmp-vs > span:not(.fmp-timer) { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 6px; border-radius: 999px; background: rgba(37, 26, 92, .92); font-weight: 700; box-shadow: 0 4px 14px rgba(20, 8, 60, .25); }
.fmp-vs .foe { padding: 0 6px 0 12px; }
.fmp-vs b { font-family: var(--disp); font-size: 22px; color: var(--gold); min-width: 1ch; text-align: center; }
.fmp-vs .av { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; color: var(--pink); font-style: normal; }
.fmp-vs .av svg { width: 30px; height: 30px; } .fmp-vs .foe .av svg { width: 22px; height: 22px; }
/* the round's clock: counting down when the tier has a limit, red in the last ten seconds */
.fmp-clock.is-timed { background: rgba(75, 42, 143, .95); box-shadow: inset 0 0 0 2px rgba(245, 197, 66, .55), 0 4px 14px rgba(20, 8, 60, .25); }
.fmp-clock.warn { background: var(--bad); animation: fmpBeat 1s ease-in-out infinite; }
.fmp-spinclock svg { animation: fmpClockSpin .9s cubic-bezier(.3, 1.2, .5, 1); }
.fmp-timer.fmp-spinclock { animation: fmpClockSpin .9s cubic-bezier(.3, 1.2, .5, 1); }
/* the lifelines in the game bar: round buttons with a badge of what is left */
.fmp-jokers { display: inline-flex; align-items: center; gap: 6px; padding: 3px; border-radius: 999px; background: rgba(37, 26, 92, .55); pointer-events: auto; }
.fmp-jk { position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--j1, #7B3FE4), var(--j2, #4B2A8F)); box-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 6px 14px rgba(20, 8, 60, .3); transition: transform .12s, filter .15s; }
.fmp-jk svg { width: 21px; height: 21px; }
.fmp-jk:hover:not(.is-off) { transform: translateY(-2px) scale(1.06); filter: brightness(1.1); }
.fmp-jk:active:not(.is-off) { transform: translateY(1px); }
.fmp-jk.is-off { filter: grayscale(.8) brightness(.75); opacity: .6; cursor: not-allowed; }
.fmp-jk:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fmp-jk-n { position: absolute; right: -4px; top: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--gold); color: #2d1d00;
  font: 800 11px/18px var(--disp); font-style: normal; text-align: center; border: 2px solid #fff; }
.fmp-jk.jk-place { --j1: #9B6BFF; --j2: #E0409C; } .fmp-jk.jk-hint { --j1: #F5C542; --j2: #F08A24; color: #3b2a00; }
.fmp-jk.jk-fifty { --j1: #12B8C8; --j2: #0A6CF0; } .fmp-jk.jk-time { --j1: #2BB673; --j2: #12806E; }
/* the "?" after the lifelines (all of them explained): mainly for touch screens, small on a desktop */
.fmp-jkq { width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; font: 800 13px/24px var(--disp); padding: 0; cursor: help; }
.fmp-jkq:hover, .fmp-jkq:focus-visible { background: rgba(255, 255, 255, .32); outline: none; }
@media (hover: none) { .fmp-jkq { width: 30px; height: 30px; font-size: 15px; line-height: 30px; } }
/* the lifelines' explanation card: under the bar, an arrow pointing at its button (--ax), inside the map */
.fmp-jktip { position: absolute; z-index: 9; padding: 12px; border-radius: 16px; background: #fff; color: var(--ink, #1f1a3d); overflow-y: auto;
  box-shadow: 0 0 0 2px rgba(123, 63, 228, .35), 0 18px 44px rgba(20, 8, 60, .38); animation: fmpPop .18s ease-out; pointer-events: auto; }
.fmp-jktip[hidden] { display: none; }
.fmp-jktip::before { content: ''; position: absolute; top: -7px; left: var(--ax, 50%); width: 14px; height: 14px; margin-left: -7px; background: #fff; transform: rotate(45deg); border-radius: 3px 0 0 0; box-shadow: -2px -2px 0 0 rgba(123, 63, 228, .35); }
.fmp-jktip h4 { margin: 0 0 8px; font-family: var(--disp); font-size: 16px; color: var(--night); }
.fmp-jktip-c { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; }
.fmp-jktip-c + .fmp-jktip-c { margin-top: 10px; padding-top: 10px; border-top: 1px solid #ece8f6; }
.fmp-jktip-art { height: 60px; border-radius: 12px; background: linear-gradient(135deg, var(--j1, #7B3FE4), var(--j2, #4B2A8F)); display: grid; place-items: center; overflow: hidden; }
.fmp-jktip-c.jk-place { --j1: #9B6BFF; --j2: #E0409C; } .fmp-jktip-c.jk-hint { --j1: #F5C542; --j2: #F08A24; }
.fmp-jktip-c.jk-fifty { --j1: #12B8C8; --j2: #0A6CF0; } .fmp-jktip-c.jk-time { --j1: #2BB673; --j2: #12806E; }
.fmp-jktip-c.is-off .fmp-jktip-art { filter: grayscale(.7); opacity: .7; }
.fmp-jktip-art svg { width: 100%; height: 100%; }
.fmp-jktip-b b { font-family: var(--disp); font-size: 15.5px; color: var(--night); }
.fmp-jktip-b p { margin: 3px 0 6px; font-size: 13px; line-height: 1.4; color: #4a4566; }
.fmp-jktip-f { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; font-weight: 700; }
.fmp-jktip-left { padding: 1px 8px; border-radius: 99px; background: #fff4d1; color: #8a5f00; }
.fmp-jktip-why { padding: 1px 8px; border-radius: 99px; background: #ffe3e4; color: #b3262b; }
.fmp-jktip-cost { display: block; margin-top: 10px; font-size: 11.5px; color: #7a7593; }
/* the small animations: a card flying to its place, a card glowing, half the cards fading, the clock gaining time */
.jka-fly { animation: jkaFly 2.2s cubic-bezier(.3, .8, .3, 1) infinite; }
.jka-spark { animation: jkaSpark 2.2s ease-out infinite; transform-origin: 100px 30px; }
.jka-glow { animation: jkaGlow 1.4s ease-in-out infinite; transform-origin: 60px 32px; }
.jka-ray { animation: jkaSpark 1.4s ease-out infinite; }
.jka-fade { animation: jkaFade 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.jka-fade.jka-d2 { animation-delay: .25s; }
.jka-hand { animation: jkaSpin 1.6s cubic-bezier(.3, 1.4, .5, 1) infinite; transform-origin: 46px 34px; }
.jka-plus { animation: jkaUp 1.6s ease-out infinite; }
@keyframes jkaFly { 0%, 12% { transform: translate(0, 0) rotate(0); } 55% { transform: translate(40px, -14px) rotate(200deg); } 72%, 100% { transform: translate(70px, -2px) rotate(360deg); } }
@keyframes jkaSpark { 0%, 60% { opacity: 0; transform: scale(.4); } 75% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes jkaGlow { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(245, 197, 66, 0)); } 50% { transform: scale(1.08) rotate(-3deg); filter: drop-shadow(0 0 8px rgba(255, 220, 90, .95)); } }
@keyframes jkaFade { 0%, 25% { opacity: 1; transform: scale(1); } 55%, 85% { opacity: .08; transform: scale(.7); } 100% { opacity: 1; transform: scale(1); } }
@keyframes jkaSpin { 0% { transform: rotate(0); } 60%, 100% { transform: rotate(360deg); } }
@keyframes jkaUp { 0% { opacity: 0; transform: translateY(10px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) {
  .fmp-jktip { animation: none; }
  .jka-fly { animation: none; transform: translate(70px, -2px); } .jka-spark, .jka-ray, .jka-plus { animation: none; opacity: 1; }
  .jka-glow, .jka-hand { animation: none; } .jka-fade { animation: none; opacity: .15; }
}
.fmp-float.gold { color: var(--gold); }
.fmp-jkused { margin: 0; color: #FFC2E4; font-weight: 700; font-size: 13px; }
.fmp-review-t .fmp-jkused { font-size: inherit; }
.fmp-tierwon { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 10px; border-radius: 99px; background: var(--gold); color: #3b2a00; font-weight: 800; font-size: 12.5px; animation: fmpPop .4s cubic-bezier(.2, 1.5, .4, 1); align-self: center; }
.fmp-tierwon svg { width: 14px; height: 14px; fill: currentColor; } .fmp-tierwon em { font-style: normal; margin-left: 2px; }
.fmp-tools { position: absolute; right: 12px; bottom: 12px; z-index: 5; display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .95); box-shadow: 0 6px 20px rgba(30, 10, 80, .18); }
/* walking the question marks: ‹ Soruya git 3 / 8 › */
.fmp-nav { position: absolute; left: 50%; bottom: 12px; z-index: 5; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(37, 26, 92, .94); box-shadow: 0 8px 24px rgba(20, 8, 60, .35); max-width: calc(100% - 24px); }
.fmp-nav button { height: 44px; min-width: 44px; border: 0; border-radius: 999px; background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; font-weight: 800; white-space: nowrap; }
.fmp-nav button:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.fmp-nav button:disabled { opacity: .35; cursor: default; }
.fmp-nav button svg { width: 20px; height: 20px; flex: none; }
/* "Soruya git" is a toggle: off (the default) a quiet button, on gold with ✕ Kapat and the position */
.fmp-nav .fmp-nav-go { padding: 0 16px 0 12px; box-shadow: inset 0 0 0 2px rgba(245, 197, 66, .55); }
.fmp-nav .fmp-nav-go i { display: inline-flex; font-style: normal; color: var(--gold); }
.fmp-nav.is-on .fmp-nav-go { background: var(--gold); color: #2d1d00; box-shadow: 0 3px 0 #C99A16; }
.fmp-nav.is-on .fmp-nav-go i { color: inherit; }
.fmp-nav.is-on .fmp-nav-go:hover:not(:disabled) { background: #FFD45E; }
.fmp-nav .fmp-nav-go b { font-family: var(--disp); font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 99px; background: rgba(45, 29, 0, .14); }
.fmp-nav .fmp-nav-go b:empty { display: none; }
.fmp-nav button:focus-visible, .fmp-tools button:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
/* the question the camera walked to */
.fmp .canvas .node.fq-cur .fq-slot { border: 4px solid var(--gold); box-shadow: 0 0 0 6px rgba(245, 197, 66, .35), 0 0 34px rgba(245, 197, 66, .5); animation: fmpCur 1.8s ease-in-out infinite; }
.fmp .canvas .node.fq-cur { z-index: 3; }
/* the check: a wrong card is marked red and shakes, then it is lifted off (.fmp-fly-out) and the place is an
   empty question mark again (fq-pending), like a place left empty - the answer of a missed place never shows */
.fmp .canvas .node.fq-reject { z-index: 4; animation: fmpReject .6s ease-in-out; }
.fmp .canvas .node.fq-reject .fq-slot { box-shadow: 0 0 0 6px rgba(229, 72, 77, .35), 0 0 30px rgba(229, 72, 77, .5); }
.fmp .canvas .node.fq-pending .fq-slot { border: 4px dashed var(--bad); background: #FFF3F3; }
.fmp .canvas .node.fq-pending .fq-slot b { color: var(--bad); }
.fmp .canvas .node.fq-pop { z-index: 4; animation: fmpPopIn .65s cubic-bezier(.3, 1.7, .5, 1); }
/* a card the game placed with a lifeline: violet frame and a ✦ badge (helped, not a right answer) */
.fmp .canvas .node.fq-helped .fq-slot { border: 5px solid #9B6BFF; background: #fff; box-shadow: 0 0 0 5px rgba(155, 107, 255, .25), 0 0 26px rgba(155, 107, 255, .35); }
.fmp .canvas .node.fq-helped::after { position: absolute; right: -4%; top: -4%; width: 22%; aspect-ratio: 1; min-width: 22px; border-radius: 50%; display: grid; place-items: center;
  content: '✦'; background: linear-gradient(135deg, #9B6BFF, #E0409C); color: #fff; font-weight: 900; font-size: max(13px, 1em); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); z-index: 2; }
.fmp .canvas .node.fq-magic { z-index: 4; animation: fmpPopIn .7s cubic-bezier(.3, 1.7, .5, 1); }
.fmp .canvas .node.fq-magic::before { content: ''; position: absolute; inset: -14px; border-radius: 26%; pointer-events: none;
  background: conic-gradient(from 0deg, #F5C542, #E0409C, #9B6BFF, #12B8C8, #F5C542); filter: blur(10px); opacity: .85; animation: fmpMagicHalo 1.3s ease-out forwards; z-index: -1; }
/* the hint lifeline: the chosen place pulses gold, its card wiggles and glows in the deck */
.fmp .canvas .node.fq-hintspot { z-index: 4; }
.fmp .canvas .node.fq-hintspot .fq-slot { border: 4px solid var(--gold); animation: fmpHintSpot .5s ease-in-out infinite alternate; }
.fmp-card-btn.fmp-hint { z-index: 2; box-shadow: 0 0 0 4px var(--gold), 0 0 28px 6px rgba(245, 197, 66, .75); animation: fmpWiggle .32s ease-in-out infinite; }
.fmp-card-btn.fmp-card-magic { box-shadow: 0 0 0 4px #9B6BFF, 0 0 30px 8px rgba(155, 107, 255, .7); animation: fmpDissolve .7s ease-in forwards; }
.fmp-fly.fmp-magic { box-shadow: 0 0 0 4px #fff, 0 0 0 8px #9B6BFF, 0 0 46px 14px rgba(245, 197, 66, .8); }
.fmp-sparkle { position: absolute; z-index: 4; width: 12px; height: 12px; margin: -6px 0 0 -6px; pointer-events: none !important; background: var(--c, #F5C542);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: fmpSparkle .75s ease-out forwards; }
/* 50:50: a card taken away dissolves */
.fmp-opt.is-gone { pointer-events: none; animation: fmpDissolve .6s ease-in forwards; }
.fmp-fly { position: absolute; z-index: 3; padding: 4%; border-radius: 18%; background: #fff; pointer-events: none !important; will-change: transform;
  box-shadow: 0 0 0 4px var(--gold), 0 18px 40px rgba(20, 8, 60, .45); }
.fmp-fly.fmp-fly-out { box-shadow: 0 0 0 4px var(--bad), 0 18px 40px rgba(20, 8, 60, .45); }
.fmp-fly img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* the end of the reveal: stars, score and the one "Devam" button; the map stays visible above it */
.fmp-fx > .fmp-review { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 24px);
  padding: 10px 10px 10px 16px; border-radius: 22px; background: rgba(37, 26, 92, .95); box-shadow: 0 16px 44px rgba(20, 8, 60, .45); animation: fmpRise .35s cubic-bezier(.2, 1.3, .4, 1); }
.fmp-review .fmp-stars span { width: 30px; height: 30px; } .fmp-review .fmp-stars span:nth-child(2) { width: 36px; height: 36px; }
.fmp-review-t { display: flex; flex-direction: column; min-width: 0; }
.fmp-review-t b { font-family: var(--disp); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmp-review-t small { font-size: 12.5px; opacity: .75; }
.fmp-review .fmp-btn { flex: none; padding: 0 18px 0 22px; }
.fmp-revealnote { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); }
.fmp-revealnote p { margin: 0; font-size: 14px; opacity: .88; }
.fmp-revealnote > svg { width: 26px; height: 26px; flex: none; color: var(--ok); }
.fmp-revealnote .fmp-spin { width: 22px; height: 22px; flex: none; border-width: 3px; }
/* the magnet drag: while a card is held the open places breathe and glow; the nearest one pulls */
.fmp.is-carding .canvas .node.fq:not(.fq-rec) .fq-slot { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(123, 63, 228, .22), 0 0 24px rgba(123, 63, 228, .4);
  animation: fmpBreathe 1.6s ease-in-out infinite; animation-delay: var(--wd, 0s); }
.fmp.is-carding .canvas .node.fq-magnet { z-index: 4; }
.fmp.is-carding .canvas .node.fq-magnet .fq-slot { border: 4px solid var(--gold); background: #FFF7DB; animation: none;
  transform: scale(calc(1.04 + var(--mg, 0) * .1)); box-shadow: 0 0 0 calc(6px + var(--mg, 0) * 8px) rgba(245, 197, 66, .4), 0 0 calc(24px + var(--mg, 0) * 30px) rgba(245, 197, 66, .7); }
.fmp.is-carding .fmp-card-btn:not(.dragging) { pointer-events: none; }
.fmp .canvas .node.fq-settle { z-index: 4; }
.fmp .canvas .node.fq-settle .fq-slot { animation: fmpSettle .55s cubic-bezier(.3, 1.6, .5, 1); }
.fmp-fx > .fmp-skip { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; min-height: 46px; padding: 0 16px 0 20px; }
.fmp-fx > .fmp-skip:hover { transform: translateX(-50%) translateY(-1px); } .fmp-fx > .fmp-skip:active { transform: translateX(-50%) translateY(2px); }
.fmp-skip svg { width: 18px; height: 18px; }
.fmp-tools button { width: 36px; height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--night); display: grid; place-items: center; }
.fmp-tools button:hover { background: #F0EAFD; }
.fmp-tools svg { width: 18px; height: 18px; }
.fmp-banner { position: absolute; left: 50%; top: 64px; z-index: 6; transform: translate(-50%, -8px); max-width: 86%; padding: 9px 18px; border-radius: 999px; background: var(--night); color: #fff; font-weight: 700; font-size: 14px; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 8px 24px rgba(20, 8, 60, .3); }
.fmp-banner.on { opacity: .96; transform: translate(-50%, 0); }
.fmp-banner.ok { background: var(--ok); } .fmp-banner.bad { background: var(--bad); } .fmp-banner.gold { background: var(--gold); color: #3b2a00; }
.fmp-fx { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.fmp-fx > * { pointer-events: auto; }
.fmp-fx > .fmp-burst, .fmp-fx > .fmp-float, .fmp-fx > .fmp-confetti { pointer-events: none; }
.fmp-stage.fmp-shake { animation: fmpShake .42s; }

/* ── buttons, switches ── */
.fmp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--gold); color: #2d1d00 !important; font-weight: 800; letter-spacing: .01em;
  box-shadow: 0 4px 0 #C99A16, 0 8px 18px rgba(245, 197, 66, .25); transition: transform .12s, box-shadow .12s, filter .15s; }
.fmp-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.fmp-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #C99A16; }
.fmp-btn:disabled { opacity: .45; cursor: default; transform: none; filter: grayscale(.4); }
.fmp-btn.big { min-height: 52px; font-size: 16px; }
.fmp-btn.soft { background: rgba(255, 255, 255, .14); color: #fff !important; box-shadow: none; }
.fmp-btn.ghost { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28); }
.fmp-btn svg { width: 19px; height: 19px; }
.fmp-btn em { font-style: normal; display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: rgba(45, 29, 0, .15); font-size: 13px; }
.fmp-btn:focus-visible, .fmp-hbtn:focus-visible, .fmp-card-btn:focus-visible, .fmp-start:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fmp-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.fmp-acts.col { flex-direction: column; } .fmp-acts.col .fmp-btn { width: 100%; }
.fmp-linkbtn { border: 0; background: none; padding: 2px 0; color: #fff; opacity: .8; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.fmp-linkbtn:hover { opacity: 1; } .fmp-linkbtn.danger { color: #ffb4b4; opacity: 1; }
.fmp-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; user-select: none; }
.fmp-switch input { position: absolute; opacity: 0; pointer-events: none; }
.fmp-switch i { position: relative; width: 34px; height: 20px; border-radius: 99px; background: rgba(255, 255, 255, .25); transition: background .2s; flex: none; }
.fmp-switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.fmp-switch input:checked + i { background: var(--violet); } .fmp-switch input:checked + i::after { transform: translateX(14px); }
.fmp-switch input:focus-visible + i { outline: 2px solid #fff; outline-offset: 2px; }

/* ── the side panel ── */
.fmp-side-head { display: flex; flex-direction: column; gap: 8px; }
.fmp-kicker { font-family: var(--disp); font-size: 22px; font-weight: 700; }
.fmp-learn { display: flex; align-items: center; gap: 10px; }
.fmp-learn-bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.fmp-learn-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--pink), var(--gold)); transition: width .8s cubic-bezier(.16, 1, .3, 1); }
.fmp-learn b { font-family: var(--disp); color: var(--gold); }
.fmp-side-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; }
/* with the card bank, the bank scrolls on its own and gives way first, so "Kontrol et" (with its 3D shadow)
   always shows whole above the status block; a panel too short even for that scrolls instead of cutting it */
.fmp-side-body.has-bank { overflow-x: hidden; overflow-y: auto; padding-bottom: 8px; }
.fmp-side-body.has-bank > .fmp-acts { padding-bottom: 2px; }
.fmp-side > .fmp-status { flex: none; }
.fmp-side-body > * { flex: none; }
.fmp-note { margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(245, 197, 66, .14); color: #ffe7a3; font-size: 13px; }
.fmp-hint { margin: 0; font-size: 13.5px; opacity: .8; }
.fmp-stagebar { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.fmp-stagebar span { font-size: 13px; opacity: .8; }
.fmp-steps { display: flex; gap: 4px; margin-top: 4px; }
.fmp-steps i { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .16); }
.fmp-steps i.done { background: var(--ok); } .fmp-steps i.on { background: var(--gold); }
.fmp-recall { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 14px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px dashed rgba(255, 255, 255, .25); }
.fmp-recall h4 { font-size: 19px; } .fmp-recall p { margin: 0; font-size: 13.5px; opacity: .82; }
.fmp-recall-deck { position: relative; width: 92px; height: 104px; margin: 4px 0 6px; }
.fmp-recall-deck i { position: absolute; inset: 0; border-radius: 14px; border: 3px solid #fff; background: repeating-linear-gradient(45deg, #7B3FE4 0 8px, #6A34CC 8px 16px);
  transform: rotate(calc((var(--i) - 2) * 5deg)) translateY(calc(var(--i) * -2px)); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); }
.fmp-recall-deck b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--disp); font-size: 34px; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.fmp-recall-n { font-weight: 700; color: var(--gold); }
.fmp-recall .fmp-btn { width: 100%; }
.fmp-bank-h { display: flex; justify-content: space-between; align-items: baseline; }
.fmp-bank-h em { font-style: normal; font-size: 13px; opacity: .75; }
/* the card bank: two big cards per row, scrolling on its own (mouse: drag its empty space, the wheel) */
.fmp-bank { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 14px; padding: 6px 6px 12px; margin: 0 -6px;
  overflow-y: auto; overscroll-behavior: contain; cursor: grab; }
.fmp-side-body.has-bank > .fmp-bank { flex: 1 1 0; min-height: 72px; }
.fmp-empty { margin: 0; font-size: 13.5px; opacity: .8; grid-column: 1 / -1; }
.fmp-card-btn { position: relative; display: flex; flex-direction: column; width: 100%; padding: 8px; border: 0; border-radius: 16px; background: #fff; cursor: grab; box-shadow: 0 4px 0 rgba(0, 0, 0, .18), 0 8px 18px rgba(10, 4, 40, .25);
  transition: transform .15s, box-shadow .15s; -webkit-touch-callout: none; user-select: none; touch-action: manipulation; }
.fmp-card-pic { display: block; width: 100%; aspect-ratio: 1; }
.fmp-card-btn img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.fmp-card-btn:hover { transform: translateY(-3px) rotate(-1deg); }
.fmp-card-btn.sel { box-shadow: 0 0 0 4px var(--gold), 0 10px 24px rgba(245, 197, 66, .35); transform: translateY(-3px); }
.fmp-card-btn.dragging { opacity: .35; }
.fmp-card-btn.deal { animation: fmpDeal .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.fmp-card-btn kbd { position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; border-radius: 7px; background: var(--night); color: #fff; font: 700 12px/22px var(--disp); text-align: center; }
/* the card held while dragging: placed by the runtime with a transform every frame (the magnet pulls it) */
.fmp-ghost { position: fixed; left: 0; top: 0; z-index: 1000; width: 84px; height: 84px; padding: 5px; border-radius: 16px; background: #fff; pointer-events: none; will-change: transform;
  box-shadow: 0 0 0 3px #F5C542, 0 16px 34px rgba(10, 4, 40, .4); }
.fmp-ghost img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.fmp-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fmp-opt { transition: opacity .25s, transform .25s; }
.fmp-opt.is-right .fmp-card-btn { box-shadow: 0 0 0 5px var(--ok), 0 10px 26px rgba(43, 182, 115, .4); transform: scale(1.04); }
.fmp-opt.is-dim { opacity: .35; transform: scale(.96); }
.fmp-opt.is-wrong .fmp-card-btn { box-shadow: 0 0 0 5px var(--bad); opacity: .8; }
.fmp-result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 14px; border-radius: 18px; background: rgba(255, 255, 255, .08); }
.fmp-result.s3 { background: linear-gradient(160deg, rgba(245, 197, 66, .25), rgba(123, 63, 228, .2)); }
.fmp-result-t { font-family: var(--disp); font-size: 22px; }
.fmp-result-n { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; width: 100%; }
.fmp-result-n span { flex: 1; min-width: 74px; display: flex; flex-direction: column; padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, .18); }
.fmp-result-n em { font-style: normal; font-size: 11.5px; opacity: .7; }
.fmp-result-n b { font-family: var(--disp); font-size: 19px; }
.fmp-stars { display: flex; justify-content: center; gap: 6px; }
.fmp-stars span { width: 40px; height: 40px; color: rgba(255, 255, 255, .18); }
.fmp-stars span svg { width: 100%; height: 100%; fill: currentColor; }
.fmp-stars span.on { color: var(--gold); filter: drop-shadow(0 2px 8px rgba(245, 197, 66, .6)); animation: fmpStar .5s cubic-bezier(.3, 1.8, .5, 1) both; animation-delay: calc(.25s + var(--i) * .16s); }
.fmp-stars span:nth-child(2) { transform: translateY(-6px); width: 48px; height: 48px; }
.fmp-record { display: inline-block; padding: 4px 12px; border-radius: 99px; background: var(--pink); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; animation: fmpGlow 1.2s ease-in-out infinite; }
.fmp-status { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }
.fmp-status-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.fmp-lvbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .12); }
.fmp-lvbar i { display: block; height: 100%; transition: width .6s; }
.fmp-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; opacity: .92; font-size: 13px; }
.fmp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fmp-legend i { width: 10px; height: 10px; border-radius: 50%; }
.fmp-legend b { color: #fff; }
.fmp-due { color: var(--gold); font-weight: 700; }

/* ── typing what was there ── */
.fmp-ask { position: absolute; z-index: 8; width: 290px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: #fff; color: var(--ink);
  box-shadow: 0 0 0 3px var(--violet), 0 20px 50px rgba(20, 8, 60, .35); animation: fmpPop .25s cubic-bezier(.2, 1.4, .4, 1); }
.fmp-ask label { font-family: var(--disp); font-weight: 700; font-size: 17px; color: var(--night); }
.fmp-ask input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid #E1D8F7; font: inherit; font-size: 17px; color: var(--ink); outline: none; }
.fmp-ask input:focus { border-color: var(--violet); }
.fmp-ask-row { display: flex; gap: 8px; } .fmp-ask-row .fmp-btn { flex: 1; min-height: 40px; }
.fmp-ask .fmp-btn.ghost { color: var(--night) !important; box-shadow: inset 0 0 0 2px #E1D8F7; }
.fmp-ask small { min-height: 1.2em; color: var(--bad); font-weight: 600; }
.fmp-ask.shake { animation: fmpShake .4s; }

/* ── stage moments: burst, floating points, intro, end card, confetti ── */
.fmp-burst { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 28px; border-radius: 24px;
  background: rgba(37, 26, 92, .92); box-shadow: 0 20px 60px rgba(20, 8, 60, .45); animation: fmpBurst 2.2s ease forwards; }
.fmp-burst b { font-family: var(--disp); font-size: 26px; }
.fmp-burst .fmp-stars span { width: 54px; height: 54px; } .fmp-burst .fmp-stars span:nth-child(2) { width: 64px; height: 64px; }
.fmp-float { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); font-family: var(--disp); font-weight: 800; font-size: 30px; text-shadow: 0 2px 10px rgba(0, 0, 0, .3); animation: fmpFloat 1s ease-out forwards; }
.fmp-float.ok { color: var(--ok); } .fmp-float.bad { color: var(--bad); }
.fmp-intro { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; background: rgba(18, 13, 46, .78); backdrop-filter: blur(4px); animation: fmpFade .3s; }
.fmp-intro-art { width: min(320px, 70vw); filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .4)); }
.fmp-intro-t { font-family: var(--disp); font-size: clamp(42px, 7vw, 72px); font-weight: 800; color: var(--gold); text-shadow: 0 4px 0 #8a5d00, 0 10px 30px rgba(0, 0, 0, .4); letter-spacing: .02em; animation: fmpSlam .6s cubic-bezier(.2, 1.6, .4, 1); }
.fmp-intro-n { min-height: 1.2em; font-family: var(--disp); font-size: clamp(36px, 6vw, 60px); font-weight: 800; color: #fff; }
.fmp-intro-n.pop { animation: fmpCount .6s ease-out; }
.fmp-end { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(18, 13, 46, .6); animation: fmpFade .3s; }
.fmp-end-card { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px; border-radius: 26px; text-align: center;
  background: radial-gradient(ellipse at 30% 0%, #5B33A8 0%, #2C1D6A 60%, #1A1240 100%); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 30px 80px rgba(8, 4, 30, .6); animation: fmpPop .4s cubic-bezier(.2, 1.4, .4, 1); }
.fmp-end-card .fmp-card-art { width: 160px; height: 96px; border-radius: 18px; }
.fmp-end-card h3 { font-size: 28px; }
.fmp-big { display: flex; flex-direction: column; font-family: var(--disp); font-size: 52px; font-weight: 800; line-height: 1; color: var(--gold); }
.fmp-big em { font-style: normal; font-size: 13px; font-weight: 600; color: #fff; opacity: .7; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.fmp-end-card .fmp-acts { width: 100%; } .fmp-end-card .fmp-acts .fmp-btn { flex: 1; }
.fmp-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 9; }
.fmp-confetti i { position: absolute; left: var(--x); top: -20px; width: 9px; height: 14px; background: var(--c); border-radius: 2px; animation: fmpConf 2.2s cubic-bezier(.3, .6, .6, 1) var(--d) forwards; }

/* ── the mode menu ── */
/* opaque: the map window behind must never show through the menu. Soft coloured lights drift slowly behind
   the cards (background layers, so they stay put while the menu scrolls); still for reduced motion. */
.fmp-menu { position: absolute; inset: 0; z-index: 20; overflow: auto; padding: 24px; background-color: #120d2e;
  background-image: radial-gradient(circle at 50% 50%, rgba(255, 90, 160, .20), transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(46, 139, 255, .20), transparent 32%),
    radial-gradient(circle at 50% 50%, rgba(34, 199, 184, .14), transparent 30%),
    radial-gradient(ellipse at 20% 0%, #5b33a8 0%, #251a5c 50%, #120d2e 100%);
  background-size: 160% 160%, 170% 170%, 180% 180%, 100% 100%; background-repeat: no-repeat;
  background-position: 0% 0%, 100% 20%, 40% 100%, 0 0;
  animation: fmpFade .3s, fmpDrift 26s ease-in-out infinite alternate; }
@keyframes fmpDrift {
  0% { background-position: 0% 0%, 100% 20%, 40% 100%, 0 0; }
  50% { background-position: 70% 30%, 20% 70%, 90% 40%, 0 0; }
  100% { background-position: 30% 90%, 60% 0%, 10% 20%, 0 0; } }
@media (prefers-reduced-motion: reduce) { .fmp-menu { animation: fmpFade .3s; } }
/* while the menu is open the map underneath is not drawn at all */
.fmp:has(> .fmp-menu:not([hidden])) > .fmp-main { visibility: hidden; }
.fmp-top ~ .fmp-menu { top: 50px; }
.fmp-menu-in { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.fmp-menu-head { display: flex; align-items: flex-start; gap: 16px; }
.fmp-menu-head > div { flex: 1; }
.fmp-menu-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; }
/* the practice badge ("PRATİK" / "PRACTICE") above the title */
.fmp-menu-logo { display: block; width: 64px; height: 64px; object-fit: contain; margin: 0 0 6px -4px; filter: drop-shadow(0 6px 14px rgba(10, 4, 40, .35)); }
.fmp-menu-head p { margin: 4px 0 0; opacity: .78; max-width: 640px; }
.fmp-snd2 { padding: 0; justify-content: center; flex: none; }
.fmp-menu-head > .fmp-menu-btns { display: flex; gap: 8px; flex: none; }
.fmp-statsbtn { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); padding: 0 16px 0 12px; }
.fmp-statsbtn svg { color: var(--gold); }

/* ── the learner's statistics ── */
.fmp-stats { position: absolute; inset: 0; z-index: 35; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom));
  background: #120d2e radial-gradient(ellipse at 80% 0%, #5b33a8 0%, #251a5c 50%, #120d2e 100%); animation: fmpFade .25s; }
.fmp-stats-in { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; animation: fmpRise .35s cubic-bezier(.2, 1, .3, 1); }
.fmp-stats-head { display: flex; align-items: flex-start; gap: 12px; }
.fmp-stats-head > div { flex: 1; min-width: 0; }
.fmp-stats-head h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(24px, 3.2vw, 34px); }
.fmp-stats-head h2 svg { width: 30px; height: 30px; color: var(--gold); }
.fmp-stats-head p { margin: 4px 0 0; opacity: .78; }
.fmp-st-tiles { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 12px; }
.fmp-st-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); }
.fmp-st-tile em { font-style: normal; font-size: 12px; opacity: .72; letter-spacing: .04em; text-transform: uppercase; }
.fmp-st-tile b { font-family: var(--disp); font-size: 26px; line-height: 1.15; color: #fff; }
.fmp-st-tile small { font-size: 12.5px; opacity: .7; }
.fmp-st-tile.big b { font-size: 34px; color: var(--gold); }
.fmp-st-tile .fmp-learn-bar { flex: none; height: 10px; margin-top: 4px; }
.fmp-st-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; }
.fmp-st-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.fmp-st-card h3 { font-size: 18px; } .fmp-st-card h3 small { font: 600 13px var(--disp); opacity: .6; margin-left: 4px; }
.fmp-st-card .fmp-lvbar { height: 14px; gap: 2px; background: transparent; }
.fmp-st-card .fmp-lvbar i:first-child { border-radius: 99px 0 0 99px; } .fmp-st-card .fmp-lvbar i:last-child { border-radius: 0 99px 99px 0; }
.fmp-st-card .fmp-due { margin: 0; }
.fmp-st-empty { margin: 0; opacity: .75; font-size: 14px; }
/* activity: one bar per day, answers given (hover / focus a bar for the day's rounds, right answers and time) */
.fmp-chart { position: relative; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; height: 150px; padding-top: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .2); background: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px) 0 18px / 100% calc((100% - 18px - 20px) / 2); }
.fmp-chart-top { position: absolute; left: 0; top: 0; font-size: 11px; opacity: .6; font-variant-numeric: tabular-nums; }
.fmp-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; outline: none; border-radius: 6px; cursor: default; }
.fmp-bar-col { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.fmp-bar-col i { display: block; width: min(70%, 22px); border-radius: 4px 4px 0 0; background: var(--gold); transition: filter .15s; }
.fmp-bar-col i.zero { height: 2px; background: rgba(255, 255, 255, .22); border-radius: 2px; }
.fmp-bar em { font-style: normal; font-size: 11px; opacity: .6; font-variant-numeric: tabular-nums; height: 16px; }
.fmp-bar.is-today em { opacity: 1; color: var(--gold); font-weight: 800; }
.fmp-bar:hover i:not(.zero), .fmp-bar:focus-visible i:not(.zero) { filter: brightness(1.18) drop-shadow(0 0 8px rgba(245, 197, 66, .6)); }
.fmp-bar:focus-visible { box-shadow: 0 0 0 2px #fff; }
.fmp-st-modes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.fmp-st-modes li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 12px 8px 8px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.fmp-st-mart { flex: none; width: 54px; height: 40px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--g1, #7B3FE4), var(--g2, #4B2A8F)); }
.fmp-st-mart svg { width: 100%; height: 100%; }
.fmp-st-modes li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fmp-st-modes small { font-size: 12px; opacity: .7; }
.fmp-st-modes strong { display: inline-flex; align-items: center; gap: 4px; font-family: var(--disp); color: var(--gold); white-space: nowrap; }
.fmp-st-modes strong svg { width: 14px; height: 14px; fill: currentColor; }
.fmp-st-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.fmp-seg { display: inline-flex; padding: 3px; border-radius: 99px; background: rgba(0, 0, 0, .22); }
.fmp-seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 99px; background: transparent; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .8) !important; }
.fmp-seg button[aria-pressed="true"] { background: #fff; color: var(--night) !important; }
.fmp-st-nodes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fmp-st-nodes li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto minmax(150px, auto); align-items: center; gap: 12px; padding: 6px 12px 6px 6px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.fmp-st-thumb { width: 56px; height: 56px; padding: 4px; border-radius: 12px; background: #fff; }
.fmp-st-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fmp-st-thumb b { display: grid; place-items: center; height: 100%; font: 800 26px var(--disp); color: var(--violet); }
.fmp-st-nodes li.is-secret { opacity: .75; }
.fmp-st-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.fmp-st-name b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmp-lvchip { padding: 1px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; color: #10301f; }
.fmp-lvchip.lv-new { color: #1f2433; } .fmp-lvchip.lv-developing { color: #3a2400; } .fmp-lvchip.lv-mastered { color: #fff; box-shadow: none; }
.fmp-st-nums { display: flex; gap: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fmp-st-nums .ok { color: #7EE2A8; } .fmp-st-nums .bad { color: #FF9EA1; }
.fmp-st-when { display: flex; gap: 14px; font-size: 13px; }
.fmp-st-when span { display: flex; flex-direction: column; min-width: 0; }
.fmp-st-when em { font-style: normal; font-size: 11px; opacity: .6; text-transform: uppercase; letter-spacing: .04em; }
.fmp-st-when .due { color: var(--gold); font-weight: 800; }
.fmp-meter { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.fmp-meter-bar { position: relative; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.fmp-meter-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--pink), var(--gold)); box-shadow: 0 0 16px rgba(245, 197, 66, .4); transition: width 1s cubic-bezier(.16, 1, .3, 1); }
.fmp-meter-bar s { position: absolute; top: -4px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: #fff; opacity: .55; }
.fmp-meter-items { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.fmp-meter-items span { display: flex; flex-direction: column; }
.fmp-meter-items em { font-style: normal; font-size: 12px; opacity: .7; letter-spacing: .04em; text-transform: uppercase; }
.fmp-meter-items b { font-family: var(--disp); font-size: 20px; color: var(--gold); }
.fmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 18px; perspective: 1200px; }
.fmp-card { position: relative; display: flex; flex-direction: column; border-radius: 22px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); overflow: hidden;
  transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transform-style: preserve-3d; transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .3s, border-color .3s; box-shadow: 0 10px 30px rgba(8, 4, 30, .3); }
.fmp-card.is-tilt { transition: transform .08s linear, box-shadow .3s; box-shadow: 0 24px 50px rgba(8, 4, 30, .5); border-color: rgba(255, 255, 255, .3); }
.fmp-card-art { position: relative; height: 136px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--g1, #7B3FE4), var(--g2, #4B2A8F)); }
.fmp-card-art svg { width: 86%; height: 92%; overflow: visible; }
.fmp-card-art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .25), transparent 50%); pointer-events: none; }
.m-random { --g1: #E0409C; --g2: #7B3FE4; } .m-main { --g1: #8D55F0; --g2: #3F2890; } .m-staged { --g1: #0A6CF0; --g2: #7B3FE4; }
.m-all { --g1: #12B8C8; --g2: #0A6CF0; } .m-duel { --g1: #E0409C; --g2: #3A1F7A; } .m-rush { --g1: #F59E0B; --g2: #E0409C; }
.fmp-shine { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .25s; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 46%); mix-blend-mode: soft-light; }
.fmp-card.is-tilt .fmp-shine { opacity: 1; }
.fmp-card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; transform: translateZ(20px); }
.fmp-card-body h3 { font-size: 20px; font-weight: 700; }
.fmp-card-body p { margin: 0; font-size: 13.5px; opacity: .78; flex: 1; }
.fmp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fmp-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, .12); font-size: 12px; font-weight: 700; }
.fmp-chips svg { width: 13px; height: 13px; }
.fmp-card-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; opacity: .8; min-height: 18px; }
.fmp-card-stats .b { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 700; opacity: 1; }
.fmp-card-stats svg { width: 13px; height: 13px; fill: currentColor; }
.fmp-start { margin-top: 6px; min-height: 44px; border: 0; border-radius: 14px; background: var(--gold); color: #2d1d00; font-weight: 800; font-size: 15px; box-shadow: 0 4px 0 #C99A16; transition: transform .12s, filter .15s; }
.fmp-start:hover { filter: brightness(1.06); } .fmp-start:active { transform: translateY(2px); box-shadow: 0 2px 0 #C99A16; }
.fmp-start:disabled { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .6); box-shadow: none; cursor: default; }
.fmp-card.is-locked .fmp-card-art > svg { filter: grayscale(.85) brightness(.7); opacity: .6; }
.fmp-lock { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: rgba(18, 13, 46, .45); }
.fmp-lock svg { width: 30px; height: 30px; color: #fff; }
.fmp-lock em { font-style: normal; font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 99px; background: rgba(18, 13, 46, .75); }
.fmp-card.is-new { border-color: var(--gold); animation: fmpNew 1.6s ease-in-out infinite; }
/* the tier picker on a mode card: Kolay ★ / Orta ★★ / Zor ★★★, the stars of a won tier lit gold */
.fmp-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 3px; margin-top: 4px; border-radius: 12px; background: rgba(0, 0, 0, .22); }
.fmp-tiers button { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 40px; padding: 3px 2px; border: 0; border-radius: 9px; background: transparent; color: rgba(255, 255, 255, .82); font-size: 12px; font-weight: 800; }
.fmp-tiers button i { display: flex; gap: 1px; } .fmp-tiers button svg { width: 11px; height: 11px; fill: rgba(255, 255, 255, .28); }
.fmp-tiers button.won svg { fill: var(--gold); filter: drop-shadow(0 0 3px rgba(245, 197, 66, .7)); }
.fmp-tiers button[aria-pressed="true"] { background: #fff; color: var(--night); }
.fmp-tiers button[aria-pressed="true"]:not(.won) svg { fill: rgba(37, 26, 92, .25); }
.fmp-tiers button:disabled { opacity: .5; cursor: default; }
.fmp-tiers button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.fmp-tier-help { display: block; font-size: 12px; line-height: 1.35; opacity: .8; }
/* all three tiers won: the gold card - a gold frame, a light sweeping over it, sparkles and a ribbon */
.fmp-card.is-gold { border: 2px solid var(--gold); background: linear-gradient(160deg, rgba(245, 197, 66, .3), rgba(201, 154, 22, .12) 45%, rgba(255, 255, 255, .06));
  box-shadow: 0 0 0 1px rgba(255, 230, 150, .5), 0 0 34px rgba(245, 197, 66, .45), 0 10px 30px rgba(8, 4, 30, .3); animation: fmpGoldGlow 2.6s ease-in-out infinite; }
.fmp-card.is-gold .fmp-card-art, .fmp-goldpop-card .fmp-card-art { background: linear-gradient(135deg, #FFE08A, #F5C542 40%, #C99A16); }
.fmp-card.is-gold .fmp-card-art::before, .fmp-goldpop-card .fmp-card-art::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .75) 48%, transparent 62%); background-size: 260% 100%; animation: fmpShimmer 2.8s ease-in-out infinite; }
.fmp-card.is-gold h3 { color: #FFE08A; }
.fmp-ribbon { position: absolute; z-index: 4; top: 16px; right: -38px; width: 150px; padding: 4px 0; transform: rotate(35deg); text-align: center; pointer-events: none;
  background: linear-gradient(90deg, #E0409C, #B43FD8); color: #fff; font: 800 11.5px var(--disp); letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.fmp-sparks { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.fmp-sparks i { position: absolute; width: 12px; height: 12px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: fmpTwinkle 1.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.37s); }
/* the moment the third tier is won: "Ustalaştın!" */
.fmp-goldpop { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; padding: 16px; background: rgba(18, 13, 46, .72); animation: fmpFade .3s; overflow: hidden; }
.fmp-goldpop-card { position: relative; width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; border-radius: 26px; text-align: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #6B4A00, #2A1B4F 70%); border: 3px solid var(--gold); box-shadow: 0 0 80px rgba(245, 197, 66, .55); animation: fmpPop .5s cubic-bezier(.2, 1.5, .4, 1); }
.fmp-goldpop-card .fmp-card-art { width: 220px; height: 130px; border-radius: 20px; }
.fmp-goldpop-card h3 { font-size: 32px; color: var(--gold); text-shadow: 0 3px 0 #8a5d00; }
.fmp-goldpop-card p { margin: 0; opacity: .85; }
.fmp-goldpop-card .fmp-unlock-rays { top: 90px; }
/* the illustrations come alive on hover, in the intro and in the unlock moment */
.fmp svg [class^="fa-"] { transform-box: fill-box; transform-origin: center; }
.fmp-card:hover .fa-float, .fmp-unlock .fa-float { animation: faFloat 2.4s ease-in-out infinite; }
.fmp-card:hover .fa-float2, .fmp-unlock .fa-float2 { animation: faFloat 2.4s ease-in-out .6s infinite; }
.fmp-card:hover .fa-spin, .fmp-unlock .fa-spin { animation: faSpin 2.8s ease-in-out infinite; }
.fmp-card:hover .fa-pop, .fmp-unlock .fa-pop, .fmp-intro .fa-pop { animation: faPop 1.4s ease-in-out infinite; }
.fmp-card:hover .fa-dash, .fmp-unlock .fa-dash { animation: faDash 1.2s linear infinite; }
.fmp-card:hover .fa-swing-l, .fmp-intro .fa-swing-l, .fmp-unlock .fa-swing-l { transform-origin: 20% 80%; animation: faSwingL 1.2s ease-in-out infinite; }
.fmp-card:hover .fa-swing-r, .fmp-intro .fa-swing-r, .fmp-unlock .fa-swing-r { transform-origin: 80% 80%; animation: faSwingR 1.2s ease-in-out infinite; }
.fmp-card:hover .fa-ring, .fmp-intro .fa-ring, .fmp-unlock .fa-ring { animation: faSpinFull 3s linear infinite; }
.fmp-card:hover .fa-hand, .fmp-intro .fa-hand { transform-origin: 0 100%; animation: faSpinFull 2s linear infinite; }
.fmp-card:hover .fa-bolt, .fmp-intro .fa-bolt, .fmp-unlock .fa-bolt { animation: faBolt .9s ease-in-out infinite; }
.fmp-intro .fa-swing-l { animation: faClashL .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.fmp-intro .fa-swing-r { animation: faClashR .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.fmp-menu-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 4px 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
.fmp-menu-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 13px; }
.fmp-reset em { font-style: normal; opacity: .85; }
.fmp-unlock { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(18, 13, 46, .72); animation: fmpFade .3s; overflow: hidden; }
.fmp-unlock-card { position: relative; width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; border-radius: 26px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #5B33A8, #251A5C); border: 2px solid var(--gold); box-shadow: 0 0 60px rgba(245, 197, 66, .35); animation: fmpPop .5s cubic-bezier(.2, 1.5, .4, 1); }
.fmp-unlock-rays { position: absolute; left: 50%; top: 80px; width: 520px; height: 520px; margin: -260px 0 0 -260px; z-index: -1; border-radius: 50%;
  background: repeating-conic-gradient(rgba(245, 197, 66, .18) 0 10deg, transparent 10deg 24deg); animation: faSpinFull 14s linear infinite; pointer-events: none; }
.fmp-unlock-card .fmp-card-art { width: 220px; height: 130px; border-radius: 20px; }
.fmp-unlock-card em { font-style: normal; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-size: 14px; }
.fmp-unlock-card h3 { font-size: 30px; } .fmp-unlock-card p { margin: 0; opacity: .8; }

/* ── signing in, loading ── */
.fmp-gate { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; padding: 16px; background: rgba(18, 13, 46, .45);
  overflow-y: auto; overscroll-behavior: contain; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.fmp-gate-card .fml-card { width: 100%; padding: 4px 0 0; box-shadow: none; }
.fmp-gate-card .fml-mark { display: none; }          /* the gate card shows the mark once, above */
.fmp.is-gated .fmp-main { filter: blur(8px) saturate(.8); pointer-events: none; }
.fmp-gate-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 24px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(8, 4, 30, .5); text-align: center; }
.fmp-gate-card h2 { font-size: 24px; color: var(--night); }
.fmp-gate-card p { margin: 0; color: #4a4a55; }
.fmp-gate-card p b { color: var(--ink); }
.fmp-gate-mark { width: 52px; height: 52px; margin: 0 auto; }
.fmp-gate-box { text-align: left; }
.fmp-err { color: var(--bad); }
.fmp-loading { position: absolute; inset: 0; z-index: 40; display: none; place-content: center; justify-items: center; gap: 12px; background: inherit; }
.fmp.is-loading .fmp-loading { display: grid; }
.fmp-loading em { font-style: normal; opacity: .85; }
/* a learner's link that is off: a friendly card instead of an error */
.fmp-gone { max-width: 420px; margin: 0 20px; padding: 28px 26px; border-radius: 22px; text-align: center; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); display: grid; justify-items: center; gap: 10px; }
.fmp-gone h2 { margin: 4px 0 0; font-size: 21px; }
.fmp-gone p { margin: 0; opacity: .82; line-height: 1.5; }
.fmp-spin { width: 40px; height: 40px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .2); border-top-color: var(--gold); animation: faSpinFull .9s linear infinite; }

/* ── the studio's practice tab: the runtime, then the learners' report (another branch) ── */
.prac2 { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 16px; padding: 12px; }
.prac2-host { flex: none; height: calc(100vh - 150px); min-height: 560px; border-radius: 24px; overflow: hidden; }
.prac2-host > .fmp { border-radius: 24px; }

/* ── phones and tablets: the map on top, the cards below in a bank that scrolls; big touch targets ── */
@media (max-width: 860px) {
  .fmp { min-height: 0; font-size: 15px; }
  .fmp-top { padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .fmp-top img { width: 26px; height: 26px; } .fmp-top-t { font-size: 16px; } .fmp-top-u > span { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fmp-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; padding: 8px;
    padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .fmp[data-kind="menu"] .fmp-main, .fmp[data-kind="gate"] .fmp-main { grid-template-rows: minmax(0, 1fr) 0; }
  .fmp-stage { border-radius: 16px; min-height: 200px; }
  .fmp-side { padding: 10px 12px 12px; gap: 8px; border-radius: 16px; }
  .fmp-side-head { flex-direction: row; align-items: center; gap: 12px; }
  .fmp-kicker { font-size: 17px; white-space: nowrap; }
  .fmp-learn { flex: 1; }
  .fmp-side-body { gap: 8px; }
  .fmp-bank { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; -webkit-overflow-scrolling: touch; cursor: auto; }
  .fmp-card-btn { padding: 6px; border-radius: 14px; }
  .fmp-card-btn:hover { transform: none; }
  .fmp-btn.big { min-height: 50px; }
  .fmp-acts .fmp-btn { flex: 1; }
  .fmp-options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .fmp-status { display: none; }
  .fmp-result { padding: 12px; gap: 6px; } .fmp-result .fmp-stars span { width: 32px; height: 32px; } .fmp-result .fmp-stars span:nth-child(2) { width: 38px; height: 38px; }
  .fmp-recall { padding: 12px; gap: 6px; } .fmp-recall-deck { width: 64px; height: 72px; } .fmp-recall p { font-size: 13px; }
  .fmp-hud-mode, .fmp-hbtn span { display: none; }
  .fmp-hud { left: 8px; right: 8px; top: 8px; gap: 6px; } .fmp-hbtn { height: 44px; min-width: 44px; }
  .fmp-chip { height: 34px; padding: 0 10px; font-size: 13px; }
  .fmp-jokers { gap: 4px; padding: 2px; } .fmp-jk { width: 38px; height: 38px; } .fmp-jk svg { width: 19px; height: 19px; }
  .fmp-tiers button { min-height: 44px; }
  .fmp-vs > span:not(.fmp-timer) { height: 38px; } .fmp-vs .av { width: 26px; height: 26px; }
  .fmp-tools { display: none; }
  .fmp-nav { bottom: 8px; } .fmp-nav .fmp-nav-go span { display: none; }
  .fmp-banner { top: 58px; font-size: 13px; }
  .fmp-fx > .fmp-skip { bottom: 10px; }
  .fmp-fx > .fmp-review { bottom: 8px; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 18px; }
  .fmp-review-t b { font-size: 16px; } .fmp-review .fmp-btn { padding: 0 14px 0 16px; }
  .fmp-menu { padding: 14px; padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(14px, env(safe-area-inset-bottom)); overflow-x: hidden; }
  .fmp-menu-in { gap: 14px; }
  .fmp-menu-head { gap: 10px; } .fmp-menu-head p { font-size: 14px; }
  .fmp-statsbtn span { display: none; } .fmp-statsbtn { padding: 0; width: 44px; justify-content: center; }
  .fmp-meter { padding: 12px; } .fmp-meter-items { gap: 6px 18px; } .fmp-meter-items b { font-size: 17px; }
  .fmp-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
  .fmp-card-art { height: 96px; }
  .fmp-card-body p { display: none; }
  .fmp-start { min-height: 46px; }
  .fmp-ask { left: 50% !important; top: 58px !important; width: min(340px, calc(100% - 16px)); }
  .fmp-ask input { font-size: 16px; }             /* 16px: phones do not zoom into the field */
  .fmp-end, .fmp-unlock { overflow-y: auto; align-items: start; padding: 12px; }
  .fmp-end-card, .fmp-unlock-card { margin: auto; padding: 18px; }
  .fmp-end-card .fmp-card-art { width: 120px; height: 72px; } .fmp-big { font-size: 42px; } .fmp-end-card h3 { font-size: 24px; }
  .fmp-stats { padding: 14px; padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .fmp-st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fmp-st-tile { padding: 10px 12px; } .fmp-st-tile b { font-size: 21px; }
  .fmp-st-tile.big { grid-column: 1 / -1; } .fmp-st-tile.big b { font-size: 28px; }
  .fmp-st-cols { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fmp-st-card { padding: 12px; }
  .fmp-st-nodes li { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 4px 10px; }
  .fmp-st-thumb { width: 48px; height: 48px; grid-row: span 2; }
  .fmp-st-when { grid-column: 2 / -1; gap: 12px; font-size: 12.5px; }
  .fmp-chart { height: 130px; gap: 2px; }
  .fmp-gate-card { padding: 18px 16px; gap: 8px; } .fmp-gate-card h2 { font-size: 20px; } .fmp-gate-mark { width: 40px; height: 40px; }
  .prac2 { padding: 6px; } .prac2-host { height: calc(100vh - 120px); height: calc(100dvh - 120px); min-height: 520px; border-radius: 18px; }
}
@media (max-width: 420px) {
  .fmp-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .fmp-card-body { padding: 10px; } .fmp-card-body h3 { font-size: 16px; }
  .fmp-chips span:nth-child(2) { display: none; } .fmp-card-art { height: 84px; }
  .fmp-bank { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .fmp-menu-head h2 { font-size: 24px; } .fmp-menu-logo { width: 52px; height: 52px; }
  .fmp-review .fmp-stars { display: none; }
}
/* a phone held sideways: too short for map-over-cards - the cards go beside the map again, narrow */
@media (max-height: 520px) and (orientation: landscape) {
  .fmp-top { padding-top: 4px; padding-bottom: 4px; }
  .fmp-main { grid-template-columns: minmax(0, 1fr) clamp(220px, 36vw, 340px); grid-template-rows: minmax(0, 1fr); gap: 8px; padding-top: 6px; }
  .fmp[data-kind="menu"] .fmp-main, .fmp[data-kind="gate"] .fmp-main { grid-template-rows: minmax(0, 1fr); }
  .fmp-stage { min-height: 0; }
  .fmp-side { padding: 8px 10px; gap: 6px; }
  .fmp-side-head .fmp-kicker { font-size: 15px; }
  .fmp-bank { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fmp-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fmp-tools { display: none; }
  .fmp-hud { top: 6px; } .fmp-hbtn { height: 40px; min-width: 40px; } .fmp-nav { bottom: 6px; } .fmp-nav button { height: 40px; min-width: 40px; }
  .fmp-btn.big { min-height: 44px; }
  .fmp-menu-head p { display: none; } .fmp-menu-logo { width: 44px; height: 44px; margin-bottom: 2px; }
  .fmp-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .fmp-card-art { height: 76px; }
  .fmp-ask { top: 8px !important; }
}

@keyframes fmpRise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fmpMagicHalo { 0% { opacity: 0; transform: scale(.6) rotate(0); } 30% { opacity: .9; } 100% { opacity: 0; transform: scale(1.35) rotate(180deg); } }
@keyframes fmpHintSpot { from { box-shadow: 0 0 0 4px rgba(245, 197, 66, .3); transform: scale(1); } to { box-shadow: 0 0 0 14px rgba(245, 197, 66, .15), 0 0 40px rgba(245, 197, 66, .7); transform: scale(1.06); } }
@keyframes fmpWiggle { 0%, 100% { transform: rotate(0) scale(1.04); } 25% { transform: rotate(-5deg) scale(1.08); } 75% { transform: rotate(5deg) scale(1.08); } }
@keyframes fmpDissolve { to { opacity: 0; transform: scale(.7) rotate(-6deg); filter: blur(6px) saturate(0); } }
@keyframes fmpSparkle { 0% { opacity: 1; transform: translate(0, 0) scale(.4) rotate(0); } 40% { opacity: 1; transform: translate(calc(var(--dx) * .5), calc(var(--dy) * .5)) scale(1.2) rotate(90deg); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2) rotate(200deg); } }
@keyframes fmpClockSpin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(540deg) scale(1.25); } 100% { transform: rotate(720deg) scale(1); } }
@keyframes fmpGoldGlow { 50% { box-shadow: 0 0 0 1px rgba(255, 230, 150, .7), 0 0 52px rgba(245, 197, 66, .7), 0 10px 30px rgba(8, 4, 30, .3); } }
@keyframes fmpShimmer { 0% { background-position: 160% 0; } 60%, 100% { background-position: -60% 0; } }
@keyframes fmpTwinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }
@keyframes fmpReject { 0%, 100% { transform: none; } 15%, 55% { transform: translateX(-6%) rotate(-3deg); } 35%, 75% { transform: translateX(6%) rotate(3deg); } }
@keyframes fmpBreathe { 0%, 100% { transform: rotate(-1.6deg) scale(1); } 50% { transform: rotate(1.6deg) scale(1.045); } }
@keyframes fmpSettle { 0% { transform: scale(.78); } 45% { transform: scale(1.12) rotate(1.5deg); } 70% { transform: scale(.96) rotate(-1deg); } 100% { transform: scale(1); } }
@keyframes fmpCur { 50% { box-shadow: 0 0 0 10px rgba(245, 197, 66, .2), 0 0 48px rgba(245, 197, 66, .65); } }
@keyframes fmpPopIn { 0% { transform: scale(.82); } 55% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes fmpQ { 50% { transform: scale(1.05); box-shadow: 0 0 0 10px var(--gold), 0 0 90px 30px rgba(245, 197, 66, .55), 0 18px 40px rgba(60, 20, 120, .4); } }
@keyframes fmpRing { to { transform: rotate(360deg); } }
@keyframes fmpHit { 40% { transform: scale(1.16); } }
@keyframes fmpHalo { from { opacity: 1; } to { opacity: 0; transform: scale(1.25); } }
@keyframes fmpDrop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } }
@keyframes fmpGlow { 50% { box-shadow: 0 0 18px rgba(224, 64, 156, .7); } }
@keyframes fmpBeat { 50% { transform: scale(1.15); } }
@keyframes fmpShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes fmpDeal { from { opacity: 0; transform: translateY(-30px) rotate(-12deg) scale(.7); } }
@keyframes fmpStar { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
@keyframes fmpPop { from { transform: scale(.8); opacity: 0; } }
@keyframes fmpFade { from { opacity: 0; } }
@keyframes fmpBurst { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.8); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(.96); } }
@keyframes fmpFloat { from { opacity: 1; transform: translate(-50%, 10px) scale(.9); } to { opacity: 0; transform: translate(-50%, -40px) scale(1.15); } }
@keyframes fmpSlam { from { transform: scale(2.4); opacity: 0; } }
@keyframes fmpCount { from { transform: scale(1.8); opacity: 0; } }
@keyframes fmpConf { to { transform: translateY(110vh) rotate(var(--r)); opacity: .9; } }
@keyframes fmpNew { 50% { box-shadow: 0 0 0 4px rgba(245, 197, 66, .5), 0 0 40px rgba(245, 197, 66, .5); } }
@keyframes faFloat { 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes faSpin { 50% { transform: rotate(18deg) scale(1.06); } }
@keyframes faSpinFull { to { transform: rotate(360deg); } }
@keyframes faPop { 50% { transform: scale(1.18); } }
@keyframes faDash { to { stroke-dashoffset: -26; } }
@keyframes faSwingL { 50% { transform: rotate(-8deg); } }
@keyframes faSwingR { 50% { transform: rotate(8deg); } }
@keyframes faClashL { from { transform: translate(-60px, 20px) rotate(-40deg); opacity: 0; } }
@keyframes faClashR { from { transform: translate(60px, 20px) rotate(40deg); opacity: 0; } }
@keyframes faBolt { 50% { transform: scale(1.1) rotate(-4deg); filter: drop-shadow(0 0 10px #F5C542); } }

@media (prefers-reduced-motion: reduce) {
  .fmp *, .fmp *::before, .fmp *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .fmp-card { transform: none !important; }
}

/* the learner page opened from the Foramind map (web/fm-embed.js): the embed's "back to map" pill sits top right,
   over the page; the top bar (name, sign out) ends before it and is at least as tall (--fm-back-w: the room the
   pill takes from the right edge, --fm-back-b: its bottom edge; a guess until the embed tells them), so the
   statistics and sound buttons below stay free */
html.fm-embed .fmp-top { padding-right: calc(var(--fm-back-w, 176px) + 12px); min-height: calc(var(--fm-back-b, 48px) + 4px); }
html.fm-embed .fmp-top ~ .fmp-menu { top: max(50px, calc(var(--fm-back-b, 48px) + 4px)); }
/* the statistics sheet starts below the pill too (its close button sits top right) */
html.fm-embed .fmp-stats { top: calc(var(--fm-back-b, 48px) + 4px); }
