/* FX glue styles — one shared stylesheet for every page.
   (Canvas, blur text, spotlight, scroll reveal, view-switch flash.) */
.fx-grid {
  position: fixed;
  inset: 0;
  /* canvas is a replaced element: without an explicit explicit CSS size it sticks to
     its 300x150 intrinsic buffer (left/right/top/bottom never stretch it).
     100% of the fixed inset box avoids 100vw's scrollbar overflow. */
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.fx-blur-word {
  display: inline-block;
  /* Words stay VISIBLE by default — the blur-in is decoration, not a gate.
     The old opacity: 0 base state hid the hero name if fx.js/CSS went stale
     or the animation never fired. The `from` frame below provides the
     invisible start while the animation runs. */
  opacity: 1;
  filter: none;
}
@keyframes fxBlurIn {
  from { opacity: 0; filter: blur(10px); }
  to { opacity: 1; filter: blur(0); }
}
.fx-spotlight {
  position: relative;
}
.fx-spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
  background: radial-gradient(220px circle at var(--fx-sx, 50%) var(--fx-sy, 50%),
    rgba(var(--card-accent-rgb, var(--fx-rgb, 88, 214, 238)), 0.12), transparent 70%);
}
.fx-spotlight.fx-spot-active::after { opacity: 1; }

/* Quiz content hosts: keep their children above the page background. */
#content-area { position: relative; }
#content-area > * { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .fx-blur-word { opacity: 1; filter: none; animation: none !important; }
}

/* ==========================================================================
   Staggered reveal (fx.js: SCROLL REVEAL) + view-switch flash
   Base state is visible; JS adds .fx-reveal (hidden) only when it will also
   manage un-hiding, and a sweep timer guarantees nothing stays invisible.
   ========================================================================== */
.fx-reveal { opacity: 0; transform: translateY(14px); }
.fx-reveal.fx-in {
  opacity: 1;
  transform: none;
  animation: fxRiseIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--fx-d, 0ms);
}
@keyframes fxRiseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.fx-flash { animation: fxFlashIn 0.45s ease both; }
@keyframes fxFlashIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fx-reveal, .fx-reveal.fx-in, .fx-flash { opacity: 1; transform: none; animation: none !important; }
}

/* ==========================================================================
   Enhanced card interaction styles — whole-card clickable, accessible
   ========================================================================== */
.card[role="button"] {
  /* Ensure consistent focus rendering across browsers */
  -webkit-tap-highlight-color: transparent;
}

.card[role="button"]:focus-visible {
  box-shadow: 0 0 0 3px var(--card-accent);
  background: var(--panel-hover);
}

//* Touch press feedback for keyboard and mouse */
.card:active { transform: translateY(-1px) scale(0.99); transition: transform 80ms ease; }

/* Samsung Watch (Watch 8 Classic etc. — Wear OS browser): tiny width AND
   tiny height AND coarse pointer. Phones are tall, so they never match. */
@media (max-width: 480px) and (max-height: 480px) and (pointer: coarse) {
  body { padding: 14px 10px; gap: 14px; }
  h1 { font-size: 1.25rem; }
  .sub { font-size: 0.8rem; }
  .badge { font-size: 0.56rem; padding: 5px 10px; }
  .card { padding: 14px 12px 12px; border-radius: 10px; }
  .card h2 { font-size: 1.05rem; }
  .cta { font-size: 0.8rem; }
}