/* ===================================================
   ff-clay.css — FocusFrenzy "clay on dark" game look.
   Shared by every rebuilt game (see CLAUDE.md, "Game experience standard").
   Pairs with ../js/ff-fx.js. Class names are ff-prefixed on purpose: the app's
   injected CSS (GameScreen.js) overrides generic names like .hud / .hud-value.
   =================================================== */

@font-face { font-family: 'Bebas Neue'; font-display: block;
  src: url('../fonts/BebasNeue-Regular.ttf') format('truetype'), url('../../fonts/BebasNeue-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Space Mono'; font-display: block;
  src: url('../fonts/SpaceMono-Regular.ttf') format('truetype'), url('../../fonts/SpaceMono-Regular.ttf') format('truetype'); }

:root {
  --ff-bg-1: #1f2b4a;
  --ff-bg-2: #161f38;
  --ff-bg-3: #0f1528;
  --ff-ink: #eef2ff;
  --ff-muted: #8fa3c8;
  --ff-soft: #a9b8d8;
  --ff-gold: #f0c040;
  --ff-gold-hi: #ffdc78;
  --ff-gold-edge: #ab7e0e;
  --ff-gold-deep: #8a6510;
  --ff-teal: #5af0d0;
  --ff-coral: #ff6b8a;
  --ff-orange: #ff9a3c;
  --ff-display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --ff-mono: 'Space Mono', ui-monospace, Menlo, monospace;
  --ff-raise: inset 0 -6px 0 rgba(8,12,28,.55), inset 0 2px 0 rgba(255,255,255,.13), 0 14px 24px rgba(0,0,0,.4);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body.ff { color: var(--ff-ink); font-family: var(--ff-mono); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* Full-screen ground. Painted on a wrapper, not body: the app forces body's background. */
.ff-app {
  position: fixed; inset: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 16px 16px;
  background: radial-gradient(130% 90% at 50% 18%, var(--ff-bg-1) 0%, var(--ff-bg-2) 55%, var(--ff-bg-3) 100%);
}
.ff-col { width: 100%; display: flex; flex-direction: column; align-items: stretch; }

/* ---------- raised panel (HUD) ---------- */
.ff-panel { border-radius: 20px; background: linear-gradient(180deg,#26356c,#1a2551); box-shadow: var(--ff-raise); }
.ff-hudbar { display: grid; grid-template-columns: 1.25fr 1fr 1fr; align-items: center; padding: 12px 16px; }
.ff-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ff-stat.right { align-items: flex-end; }
.ff-stat.left { align-items: flex-start; gap: 8px; }
.ff-lbl { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--ff-muted); }
.ff-val { display: inline-block; font-family: var(--ff-display); font-size: 40px; line-height: 1; color: var(--ff-gold);
  text-shadow: 0 3px 0 var(--ff-gold-deep), 0 0 18px rgba(240,192,64,.4); font-variant-numeric: tabular-nums; }
.ff-val.hot { color: #fff1b8; text-shadow: 0 3px 0 var(--ff-gold-deep), 0 0 24px rgba(240,192,64,.95); }
.ff-timer { font-family: var(--ff-display); font-size: 50px; letter-spacing: 3px; line-height: 1; color: #fff;
  text-shadow: 0 3px 0 rgba(0,0,0,.35); font-variant-numeric: tabular-nums; transition: color .2s; }
.ff-timer.paused { color: var(--ff-soft); }
.ff-timer.warn { color: var(--ff-orange); }
.ff-timer.danger { color: var(--ff-coral); }

/* ---------- buttons ---------- */
.ff-btn { -webkit-appearance: none; appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 60px; padding: 0 44px; border-radius: 18px;
  font-family: var(--ff-display); font-size: 28px; letter-spacing: 4px; text-transform: uppercase; line-height: 1;
  transition: transform .06s ease-out, box-shadow .06s ease-out; }
.ff-btn.primary { color: #1a1a2e; background: linear-gradient(180deg, var(--ff-gold-hi), var(--ff-gold));
  box-shadow: inset 0 -6px 0 var(--ff-gold-edge), inset 0 2px 0 rgba(255,255,255,.6), 0 12px 22px rgba(240,192,64,.28); }
.ff-btn.secondary, .ff-btn.small { color: var(--ff-ink); background: linear-gradient(180deg,#2c3a66,#1e294b);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.15), 0 6px 12px rgba(0,0,0,.35); }
.ff-btn.secondary { height: 54px; font-size: 22px; letter-spacing: 3px; }
.ff-btn.small { height: 28px; padding: 0 11px; border-radius: 10px; font-family: var(--ff-mono); font-size: 10px; letter-spacing: 2px; color: var(--ff-soft); gap: 6px; }
.ff-btn.small svg { width: 13px; height: 13px; }
.ff-btn.wide { align-self: stretch; padding: 0; width: 100%; }
.ff-btn:active, .ff-btn.pressed { transform: translateY(3px) scale(.98); }
.ff-btn.primary:active { box-shadow: inset 0 -3px 0 var(--ff-gold-edge), inset 0 2px 0 rgba(255,255,255,.6), 0 6px 12px rgba(240,192,64,.22); }

.ff-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 15px;
  background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.09);
  color: var(--ff-muted); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.ff-chip svg { width: 15px; height: 15px; color: var(--ff-gold); }
.ff-chip b { color: var(--ff-gold); font-family: var(--ff-display); font-size: 19px; letter-spacing: 1px; font-weight: 400; }

/* ---------- clay tile ---------- */
.ff-tile { position: relative; display: flex; align-items: center; justify-content: center; border-radius: 17px;
  background: linear-gradient(180deg,#30508a 0%,#243e72 55%,#1e3565 100%);
  box-shadow: inset 0 -6px 0 #142450, inset 0 2px 0 rgba(255,255,255,.17), 0 7px 12px rgba(0,0,0,.38);
  transition: transform .2s cubic-bezier(.3,1.6,.5,1), background .18s, box-shadow .18s; }
.ff-tile::after { content: ''; position: absolute; left: 12%; top: 10%; width: 34%; height: 17%; border-radius: 50%;
  transform: rotate(-18deg); background: rgba(255,255,255,.10); pointer-events: none; }
.ff-tile > b { position: relative; z-index: 1; font-family: var(--ff-display); font-weight: 400; line-height: 1; color: #3a2a06; }
.ff-tile.gold { background: linear-gradient(180deg,#f7da83,#ecb632);
  box-shadow: inset 0 -6px 0 #b0800f, inset 0 2px 0 rgba(255,255,255,.55), 0 6px 10px rgba(0,0,0,.35); }
.ff-tile.lit { z-index: 2; background: linear-gradient(180deg,#ffe8a0,#f5c33e);
  box-shadow: inset 0 -6px 0 #bd8b17, inset 0 2px 0 rgba(255,255,255,.75), 0 0 0 6px rgba(240,192,64,.2), 0 0 36px rgba(240,192,64,.65), 0 10px 16px rgba(0,0,0,.35); }
.ff-tile.gold::after, .ff-tile.lit::after { background: rgba(255,255,255,.5); }
.ff-tile.glow { box-shadow: inset 0 -6px 0 #b0800f, inset 0 2px 0 rgba(255,255,255,.55), 0 0 22px rgba(240,192,64,.45), 0 6px 10px rgba(0,0,0,.35); }
.ff-tile.bad { background: linear-gradient(180deg,#ff8aa3,#e5536f);
  box-shadow: inset 0 -6px 0 #a3304a, inset 0 2px 0 rgba(255,255,255,.45), 0 6px 10px rgba(0,0,0,.35); }
.ff-tile.press { transform: scale(1.08); }
.ff-tile.sunk { transform: scale(.94); }

/* ---------- overlays inside the play area ---------- */
.ff-overlay { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center; border-radius: 22px;
  background: rgba(11,16,31,.82); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ff-overlay[hidden] { display: none; }
.ff-title { font-family: var(--ff-display); font-size: 68px; letter-spacing: 5px; line-height: 1; color: var(--ff-gold); text-transform: uppercase;
  text-shadow: 0 5px 0 #a47810, 0 14px 26px rgba(0,0,0,.5); }
.ff-sub { margin: 0; font-size: 13px; letter-spacing: 2px; line-height: 1.9; text-transform: uppercase; color: var(--ff-soft); }

/* ---------- fx: ring, sparks, "+N" float ---------- */
.ff-ring { position: absolute; inset: -7px; border-radius: 24px; border: 3px solid #ffe08a; pointer-events: none;
  animation: ffRing .45s ease-out forwards; }
.ff-spark { position: absolute; pointer-events: none; fill: #ffd35c; filter: drop-shadow(0 2px 2px rgba(0,0,0,.18));
  animation: ffSpark .6s cubic-bezier(.2,.8,.3,1) forwards; }
.ff-spark.w { fill: #fff; }
.ff-spark.t { fill: var(--ff-teal); }
.ff-float { position: absolute; left: 50%; top: -10px; z-index: 30; pointer-events: none; white-space: nowrap;
  font-family: var(--ff-display); font-size: 34px; color: #ffd35c; text-shadow: 0 3px 0 #6f510a, 0 8px 16px rgba(0,0,0,.55);
  animation: ffFloat .8s cubic-bezier(.3,1.4,.5,1) forwards; }
@keyframes ffRing { 0% { transform: scale(.72); opacity: .95; } 100% { transform: scale(1.12); opacity: 0; } }
@keyframes ffSpark {
  0% { transform: translate(var(--dx), var(--dy)) scale(.2) rotate(-50deg); opacity: 0; }
  40% { opacity: 1; }
  75% { transform: none; opacity: 1; }
  100% { transform: translateY(6px) scale(.6); opacity: 0; } }
@keyframes ffFloat {
  0% { transform: translate(-50%, 14px) scale(.6); opacity: 0; }
  30% { transform: translate(-50%, -14px) scale(1.15); opacity: 1; }
  70% { transform: translate(-50%, -26px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -40px) scale(1); opacity: 0; } }

.ff-pop { animation: ffPop .32s cubic-bezier(.3,1.4,.5,1); }
@keyframes ffPop { 0% { transform: scale(.9, 1.1); } 40% { transform: scale(1.14, .9); } 70% { transform: scale(.97, 1.03); } 100% { transform: scale(1); } }
.ff-shake { animation: ffShake .3s ease; }
@keyframes ffShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.ff-bump { animation: ffBump .3s ease-out; }
@keyframes ffBump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
.ff-wave { animation: ffWave .42s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes ffWave { 0% { transform: scale(.94); } 45% { transform: scale(1.13); filter: brightness(1.3); } 100% { transform: scale(.94); } }

/* ---------- praise word ---------- */
.ff-wordfx { position: absolute; left: 50%; top: 50%; z-index: 20; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; white-space: nowrap; }
.ff-wordfx::before { content: ''; position: absolute; left: -80px; right: -80px; top: -60px; bottom: -50px; z-index: -1;
  background: radial-gradient(closest-side, rgba(10,14,30,.85), rgba(10,14,30,0)); }
.ff-word { display: block; font-family: var(--ff-display); font-weight: 400; letter-spacing: 4px; line-height: .9;
  color: var(--c); font-size: var(--s); text-shadow: 0 5px 0 var(--d), 0 0 30px var(--g);
  animation: ffWordPop .55s cubic-bezier(.3,1.4,.5,1) both; }
.ff-streak { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 15px;
  background: rgba(90,240,208,.12); box-shadow: inset 0 0 0 1px rgba(90,240,208,.35); color: var(--ff-teal);
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; animation: ffFadeUp .3s ease-out .25s both; }
.ff-pips { display: flex; gap: 4px; }
.ff-pips i { width: 7px; height: 7px; border-radius: 50%; background: var(--ff-teal); box-shadow: 0 0 6px rgba(90,240,208,.8); }
.ff-wordfx.out, .ff-banner.out { animation: ffOut .25s ease-in forwards; }
@keyframes ffWordPop { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 55% { transform: scale(1.22) rotate(2deg); opacity: 1; } 78% { transform: scale(.94) rotate(0); } 100% { transform: none; } }
@keyframes ffFadeUp { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: none; } }
@keyframes ffOut { to { opacity: 0; transform: translate(-50%, -60%) scale(.9); } }
.ff-banner.out { animation-name: ffOutBanner; }
@keyframes ffOutBanner { to { opacity: 0; transform: translate(-50%, -16px) scale(.9); } }

/* ---------- new-best banner ---------- */
.ff-banner { position: absolute; left: 50%; z-index: 20; transform: translateX(-50%); pointer-events: none; }
.ff-banner-pill { position: relative; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 25px; white-space: nowrap; color: #1a1a2e;
  background: linear-gradient(180deg, var(--ff-gold-hi), var(--ff-gold));
  box-shadow: inset 0 -6px 0 var(--ff-gold-edge), inset 0 2px 0 rgba(255,255,255,.6), 0 0 34px rgba(240,192,64,.55), 0 12px 20px rgba(0,0,0,.45);
  animation: ffDrop .6s cubic-bezier(.3,1.4,.5,1) both; }
.ff-banner-pill svg { width: 22px; height: 22px; }
.ff-banner-pill b { font-family: var(--ff-display); font-weight: 400; font-size: 32px; letter-spacing: 3px; line-height: 1; padding-top: 3px; }
.ff-banner-pill small { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; opacity: .7; }
.ff-rays { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; z-index: -1; border-radius: 50%;
  background: repeating-conic-gradient(rgba(240,192,64,.32) 0deg 7deg, rgba(240,192,64,0) 7deg 20deg);
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent 100%); mask: radial-gradient(closest-side, #000 25%, transparent 100%);
  animation: ffSpin 14s linear infinite; }
@keyframes ffDrop { 0% { transform: translateY(-40px) scale(.5); opacity: 0; } 55% { transform: translateY(4px) scale(1.12); opacity: 1; } 80% { transform: scale(.96); } 100% { transform: none; } }
@keyframes ffSpin { to { transform: rotate(360deg); } }

/* ---------- end card ---------- */
.ff-shade { position: fixed; inset: 0; z-index: 50; background: rgba(6,9,20,.68); opacity: 0; transition: opacity .25s; pointer-events: none; }
.ff-shade.show { opacity: 1; pointer-events: auto; }
.ff-card { position: fixed; z-index: 60; left: 50%; top: 50%; width: min(340px, calc(100vw - 48px));
  transform: translate(-50%, -40%) scale(.85); opacity: 0; pointer-events: none;
  padding: 58px 24px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; border-radius: 30px;
  background: linear-gradient(180deg,#28376d,#1a2451);
  box-shadow: inset 0 -8px 0 rgba(6,10,26,.55), inset 0 2px 0 rgba(255,255,255,.13), 0 30px 50px rgba(0,0,0,.55);
  transition: transform .45s cubic-bezier(.3,1.5,.5,1), opacity .2s; }
.ff-card.show { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.ff-ribbon { position: absolute; left: 50%; top: -28px; transform: translateX(-50%); width: 236px; height: 58px; display: grid; place-items: center;
  border-radius: 20px; color: #1a1a2e; font-family: var(--ff-display); font-size: 32px; letter-spacing: 4px; text-transform: uppercase;
  background: linear-gradient(180deg, var(--ff-gold-hi), var(--ff-gold));
  box-shadow: inset 0 -6px 0 var(--ff-gold-edge), inset 0 2px 0 rgba(255,255,255,.6), 0 12px 20px rgba(0,0,0,.4); }
.ff-score { font-family: var(--ff-display); font-size: 104px; line-height: .9; color: var(--ff-gold);
  text-shadow: 0 6px 0 var(--ff-gold-deep), 0 0 34px rgba(240,192,64,.4); font-variant-numeric: tabular-nums; }
.ff-score-lbl { margin-top: -4px; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--ff-muted); }
.ff-stats { display: flex; align-items: center; gap: 22px; margin: 4px 0 2px; }
.ff-stats .st { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ff-stats .st b { font-family: var(--ff-display); font-size: 36px; line-height: 1; font-weight: 400; color: var(--ff-ink); }
.ff-stats .st b.good { color: var(--ff-teal); }
.ff-stats .st b.bad { color: var(--ff-coral); }
.ff-stats .st span { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--ff-muted); }
.ff-stats .div { width: 1px; height: 34px; background: rgba(255,255,255,.12); }
.ff-best { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 18px; margin-bottom: 6px;
  color: #0f2a2a; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700;
  background: linear-gradient(180deg,#8ff6de,#4fdcbd); box-shadow: inset 0 -4px 0 #2aa98c, inset 0 1px 0 rgba(255,255,255,.6), 0 8px 14px rgba(90,240,208,.2);
  animation: ffDrop .5s cubic-bezier(.3,1.4,.5,1) .5s both; }
.ff-best svg { width: 17px; height: 17px; }
.ff-best-old { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--ff-muted); margin-bottom: 6px; }
.ff-note { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; margin: -2px 0 8px;
  font-size: 12px; line-height: 1.4; color: var(--ff-soft); text-align: center; }
.ff-note.good { color: var(--ff-teal); }
.ff-note svg { width: 14px; height: 14px; flex-shrink: 0; }
.ff-workout { margin: 0 0 8px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--ff-gold); }
.ff-btn[data-act="next"] { font-size: 22px; letter-spacing: 2px; padding: 0 12px; white-space: nowrap; }
.ff-confetti { position: fixed; z-index: 55; pointer-events: none; top: -20px; animation: ffFall linear forwards; }
@keyframes ffFall { to { transform: translate(var(--x), 110vh) rotate(var(--r)); } }

/* ---------- level row (status text + progress dots) and play stage ---------- */
.ff-lvl { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 2px 10px; min-height: 16px; }
.ff-lvl .t { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--ff-muted); transition: color .2s; white-space: nowrap; }
.ff-lvl .t.go { color: var(--ff-teal); }
.ff-dots { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.ff-dots i { width: 8px; height: 8px; border-radius: 50%; background: #2a3a66; transition: background .15s, transform .15s; }
.ff-dots i.done { background: var(--ff-gold); opacity: .5; }
.ff-dots i.on { background: var(--ff-gold); transform: scale(1.4); box-shadow: 0 0 8px rgba(240,192,64,.8); }
.ff-dots i.wrong { background: var(--ff-coral); opacity: 1; }
.ff-stage { position: relative; width: 100%; display: flex; justify-content: center; }
.ff-grid { display: grid; touch-action: manipulation; }
.ff-grid .ff-tile { border-radius: min(17px, calc(var(--ff-cell, 80px) * .2)); }
.ff-grid .ff-tile > b { font-size: calc(var(--ff-cell, 80px) * .46); }
.ff-grid.live .ff-tile { cursor: pointer; }
.ff-tile > svg { position: relative; z-index: 1; width: calc(var(--ff-cell, 80px) * .42); height: calc(var(--ff-cell, 80px) * .42); }
.ff-tile.gold > svg { color: #5a3f06; }
.ff-tile.bad > svg { color: #fff; }

/* ---------- clay keypad key (number pads, answer buttons) ---------- */
.ff-key { -webkit-appearance: none; appearance: none; border: 0; cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center; border-radius: 18px;
  font-family: var(--ff-display); font-size: calc(var(--ff-key-h, 64px) * .52); line-height: 1; color: var(--ff-ink);
  background: linear-gradient(180deg,#30508a 0%,#243e72 55%,#1e3565 100%);
  box-shadow: inset 0 -6px 0 #142450, inset 0 2px 0 rgba(255,255,255,.17), 0 7px 12px rgba(0,0,0,.38);
  transition: transform .06s ease-out, box-shadow .06s ease-out, filter .1s; touch-action: manipulation; }
.ff-key::after { content: ''; position: absolute; left: 10%; top: 12%; width: 26%; height: 16%; border-radius: 50%;
  transform: rotate(-14deg); background: rgba(255,255,255,.09); pointer-events: none; }
.ff-key svg { width: calc(var(--ff-key-h, 64px) * .4); height: calc(var(--ff-key-h, 64px) * .4); }
.ff-key.pressed, .ff-key:active { transform: translateY(4px); filter: brightness(1.15);
  box-shadow: inset 0 -2px 0 #142450, inset 0 2px 0 rgba(255,255,255,.17), 0 3px 6px rgba(0,0,0,.38); }
.ff-key.gold { color: #1a1a2e; background: linear-gradient(180deg, var(--ff-gold-hi), var(--ff-gold));
  box-shadow: inset 0 -6px 0 var(--ff-gold-edge), inset 0 2px 0 rgba(255,255,255,.6), 0 8px 14px rgba(240,192,64,.22); }
.ff-key.gold.pressed, .ff-key.gold:active { box-shadow: inset 0 -2px 0 var(--ff-gold-edge), inset 0 2px 0 rgba(255,255,255,.6), 0 3px 6px rgba(240,192,64,.2); }
.ff-key.muted { color: var(--ff-soft); background: linear-gradient(180deg,#2c3a66,#1e294b);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.15), 0 7px 12px rgba(0,0,0,.35); }
.ff-key:disabled { opacity: .45; cursor: default; }

/* A countdown bar that drains (memorise phases). Set --ms and add .run. */
.ff-bar { position: relative; width: 120px; height: 10px; border-radius: 5px; overflow: hidden;
  background: rgba(255,255,255,.08); box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.ff-bar > i { position: absolute; inset: 0; border-radius: 5px; transform-origin: left center;
  background: linear-gradient(90deg, var(--ff-coral), #ffb36b); box-shadow: 0 0 10px rgba(255,107,138,.6); }
.ff-bar.run > i { animation: ffDrain var(--ms, 2000ms) linear forwards; }
@keyframes ffDrain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (min-width: 700px) { .ff-bar { width: 180px; height: 12px; } }
.ff-label { position: absolute; left: 50%; top: 50%; z-index: 20; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap; }
.ff-label::before { content: ''; position: absolute; left: -70px; right: -70px; top: -50px; bottom: -50px; z-index: -1;
  background: radial-gradient(closest-side, rgba(10,14,30,.8), rgba(10,14,30,0)); }
.ff-label .ff-word { --c: #f0c040; --d: #8a6510; --g: rgba(240,192,64,.45); --s: 52px; }
.ff-label.bad .ff-word { --c: #ff6b8a; --d: #8e2440; --g: rgba(255,107,138,.45); }
.ff-label.teal .ff-word { --c: #5af0d0; --d: #1d8f78; --g: rgba(90,240,208,.5); }
.ff-hudbar .ff-btn.small svg { width: 13px; height: 13px; }

/* The help modal lives outside game-base.css in rebuilt games; the few resets it needs. */
body.ff #helpHeader h2 { margin: 0; }
body.ff #helpBody { font-family: var(--ff-mono); }
body.ff #helpBody p, body.ff #helpBody ul { margin: 0; }
body.ff #helpClose { color: var(--ff-soft); }

/* ---------- tablets ---------- */
@media (min-width: 700px) {
  .ff-app { padding-top: 22px; }
  .ff-hudbar { padding: 16px 24px; }
  .ff-timer { font-size: 66px; }
  .ff-val { font-size: 54px; }
  .ff-lbl { font-size: 12px; }
  .ff-lvl { margin: 20px 4px 14px; }
  .ff-lvl .t { font-size: 14px; }
  .ff-dots i { width: 11px; height: 11px; }
  .ff-title { font-size: 88px; }
  .ff-sub { font-size: 17px; }
  .ff-btn { height: 72px; font-size: 34px; padding: 0 60px; }
  .ff-btn.small { height: 34px; font-size: 12px; padding: 0 14px; }
  .ff-chip { height: 36px; font-size: 13px; }
  .ff-chip b { font-size: 23px; }
  .ff-float { font-size: 46px; }
  .ff-label .ff-word { --s: 72px; }
}

/* ---------- guided practice round ---------- */
.ff-coach { position: fixed; z-index: 45; max-width: min(320px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 16px;
  font-family: var(--ff-mono); font-size: 13px; line-height: 1.45; letter-spacing: .3px; font-weight: 700; color: #0f2a2a; text-align: center;
  background: linear-gradient(180deg,#a6f8e6,#5ee0c3);
  box-shadow: inset 0 -4px 0 #2aa98c, inset 0 1px 0 rgba(255,255,255,.7), 0 12px 22px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .18s, transform .25s cubic-bezier(.3,1.5,.5,1);
  pointer-events: none; }
.ff-coach.show { opacity: 1; transform: none; }
.ff-hint { z-index: 3; }
.ff-hint::before { content: ''; position: absolute; inset: -7px; border-radius: 22px; border: 3px solid var(--ff-teal);
  box-shadow: 0 0 16px rgba(90,240,208,.7); pointer-events: none; z-index: 4; animation: ffHint 1s ease-in-out infinite; }
@keyframes ffHint { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .55; } }
@media (min-width: 700px) { .ff-coach { font-size: 16px; max-width: 440px; padding: 16px 22px; } }
@media (prefers-reduced-motion: reduce) { .ff-hint::before { animation: none; } }

/* Penalty tint on a wrong answer: soft, never alarming. */
.ff-flash { position: fixed; inset: 0; z-index: 40; pointer-events: none; background: rgba(255,107,138,.08); opacity: 0; transition: opacity .12s; }
.ff-flash.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ff-ring, .ff-spark, .ff-float, .ff-pop, .ff-shake, .ff-bump, .ff-wave, .ff-word, .ff-streak, .ff-banner-pill, .ff-rays, .ff-best, .ff-confetti { animation: none !important; }
  .ff-spark, .ff-ring, .ff-confetti { display: none; }
  .ff-float { animation: none; opacity: 0; }
}
