/* Flitsen — bovenop klastools.css. Drie schermen: instellen, flitsen en klaar. */
body[data-screen="setup"] .fl-play, body[data-screen="setup"] .fl-end,
body[data-screen="play"] .fl-setup, body[data-screen="play"] .fl-end,
body[data-screen="end"] .fl-setup, body[data-screen="end"] .fl-play { display: none; }
body[data-screen="setup"] #btnNext, body[data-screen="setup"] #btnStop, body[data-screen="setup"] #btnReview,
body[data-screen="play"] #btnReview, body[data-screen="end"] #btnNext { display: none; }
body[data-screen="setup"] .stage, body[data-screen="end"] .stage { align-items: flex-start; }

/* ---------- instellen ---------- */
.fl-setup { width: min(1000px, 100%); display: grid; gap: 16px; }
.fl-h { margin: 0; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--muted); }
.fl-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; }
.fl-topics button {
  display: flex; align-items: center; gap: 10px; text-align: left; border: 0; border-radius: 16px; padding: 10px 12px;
  background: var(--panel); box-shadow: inset 0 0 0 2px rgba(255,255,255,.06);
}
.fl-topics button:hover { background: var(--panel-hi); }
.fl-topics i {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-style: normal;
  font-family: var(--font-display); font-weight: 800; font-size: 21px; background: rgba(255,255,255,.12);
}
.fl-topics span { display: flex; flex-direction: column; min-width: 0; }
.fl-topics b { font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.1; }
.fl-topics small { font-size: 13px; font-weight: 700; color: var(--muted); }
.fl-topics button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.fl-topics button[aria-pressed="true"] i { background: var(--gold); color: var(--gold-ink); }
.fl-topics button[aria-pressed="true"] small { color: #5a5590; }

.fl-opts { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 12px 22px; }
.fl-opts:empty { display: none; }
.fl-common { padding-top: 14px; border-top: 2px solid rgba(255,255,255,.08); }
.fl-field { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.fl-wide { width: min(620px, 100%); align-items: stretch; }
.fl-label { font-weight: 700; font-size: 14px; color: var(--muted); text-align: center; }
.fl-label b { color: var(--ink); }
.fl-note { font-size: 13px; color: var(--muted); text-align: center; }
.fl-note b { color: var(--ink); letter-spacing: .02em; }
.fl-link { border: 0; background: none; padding: 0 4px; color: var(--gold); font-weight: 800; text-decoration: underline; }
.fl-field .seg { flex-wrap: wrap; justify-content: center; max-width: 100%; }
.fl-field textarea {
  width: 100%; resize: vertical; min-height: 150px; border-radius: 12px; border: 2px solid rgba(255,255,255,.12); background: #120f30; color: var(--ink);
  font: 700 17px/1.5 var(--font-body); padding: 10px 12px;
}
.fl-check { align-self: center; }
.fl-check span { font-size: 15px; }

/* ---------- flitsen ---------- */
.fl-play { width: min(1100px, 100%); display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.fl-card {
  position: relative; height: min(62vh, 640px); min-height: 240px; border-radius: 36px; overflow: hidden; cursor: pointer;
  background: #fff; color: #1a1640; box-shadow: 0 24px 60px rgba(0,0,0,.45); user-select: none; -webkit-user-select: none;
  display: flex; align-items: center; justify-content: center;
}
.fl-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 100%; padding: 0 4%; }
.fl-pre { font-family: var(--font-display); font-weight: 800; line-height: 1; color: #7a74b8; text-transform: uppercase; letter-spacing: .06em; }
.fl-pre:empty { display: none; }
.fl-q { font-family: var(--font-display); font-weight: 800; line-height: 1.05; white-space: nowrap; text-wrap: balance; font-variant-numeric: tabular-nums; }
.fl-a { font-family: var(--font-display); font-weight: 800; line-height: 1.05; white-space: nowrap; color: #e8590c; }
.fl-inner.with-a .fl-a { min-height: 1.05em; }
.fl-a:not(:empty) { animation: popin .3s cubic-bezier(.3,1.5,.5,1); }
.fl-inner.count .fl-q { color: #b7b2e6; }
.fl-inner.in { animation: flIn .18s ease-out; }
.fl-inner.out { opacity: 0; transform: scale(.97); transition: opacity .18s, transform .18s; }
@keyframes flIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.fl-card.paused .fl-inner { opacity: .12; }
.fl-pause { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 0 16px; }
.fl-pause b { font-family: var(--font-display); font-weight: 800; font-size: clamp(48px, 10vh, 96px); line-height: 1; }
.fl-pause span { font-weight: 800; font-size: clamp(18px, 3vh, 26px); color: #5a5590; }

.fl-bar { display: flex; align-items: center; gap: 14px; }
.fl-progress { flex: 1; height: 14px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.fl-progress i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--gold); }
.fl-num { font-family: var(--font-display); font-weight: 800; font-size: 22px; min-width: 4.2em; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- klaar ---------- */
.fl-end { width: min(1100px, 100%); display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 2vh; }
.fl-done { font-family: var(--font-display); font-weight: 800; font-size: clamp(56px, 12vh, 110px); line-height: 1; color: var(--gold); animation: popin .45s cubic-bezier(.3,1.5,.5,1); }
.fl-sub { margin: 0 0 10px; font-weight: 700; font-size: 20px; color: var(--muted); text-align: center; }
.fl-review {
  list-style: none; margin: 0; padding: 0; width: 100%; counter-reset: k;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px;
}
.fl-review.words { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.fl-review li {
  counter-increment: k; position: relative; padding: 8px 12px 8px 42px; border-radius: 14px; background: var(--panel);
  font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 3.4vh, 32px); line-height: 1.2; overflow-wrap: anywhere;
}
.fl-review li::before { content: counter(k); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--muted); }
.fl-review li small { font-size: .62em; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fl-review li span { color: var(--gold); white-space: nowrap; }

@media (max-width: 560px) {
  .fl-topics { grid-template-columns: 1fr 1fr; gap: 6px; }
  .fl-topics button { padding: 8px; gap: 8px; }
  .fl-topics i { width: 30px; height: 30px; font-size: 17px; }
  .fl-topics b { font-size: 15px; }
  .fl-topics small { font-size: 12px; }
  .fl-card { height: 52vh; border-radius: 24px; }
  .fl-field .seg button { padding: 9px 11px; font-size: 16px; }
  .controls .go { padding: 10px 22px; }
  .controls .ghost { padding: 8px 14px; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .fl-inner.in, .fl-a:not(:empty), .fl-done { animation: none; }
  .fl-inner.out { transform: none; transition: none; }
}
