/* ── Flashcards ── */
.fc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 12px; color: var(--ink-muted); }
.fc-header .fh-count { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.fh-dot { display: inline-block; width: 7px; height: 7px; border-radius: 999px; margin-right: 4px; vertical-align: middle; }
.fh-dot.g { background: var(--r-green); }
.fh-dot.r { background: var(--r-red); }

.fc-card {
  width: 100%; background: var(--bg-2); border: 1px solid var(--rule-soft);
  border-radius: var(--r-lg); padding: 52px 48px;
  min-height: 360px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  cursor: pointer; text-align: center; box-sizing: border-box;
  transition: transform 200ms var(--spring-soft), background 200ms var(--ease);
}
button.fc-card { font: inherit; }
.fc-card:hover { transform: translateY(-2px); }
.fc-card.is-got { background: color-mix(in srgb, var(--r-green) 13%, var(--bg-2)); border-color: color-mix(in srgb, var(--r-green) 38%, var(--rule-soft)); }
.fc-card.is-review { background: color-mix(in srgb, var(--r-red) 13%, var(--bg-2)); border-color: color-mix(in srgb, var(--r-red) 38%, var(--rule-soft)); }
.fc-card.flipped .fc-front { display: none; }
.fc-card.flipped .fc-back { display: flex; }
/* Answer side looks different at a glance: deeper ground, an ink rule
   across the top and a filled ANSWER pill. Got / review tints still win. */
.fc-card.flipped { box-shadow: inset 0 4px 0 var(--ink); }
.fc-card.flipped:not(.is-got):not(.is-review) { background: var(--bg-3); border-color: color-mix(in srgb, var(--ink) 30%, var(--rule-soft)); }
/* The turn: edge-on by halfway (the side swaps there), then springs back. */
@keyframes fc-turn-out { from { transform: perspective(1400px) rotateY(0deg); } to { transform: perspective(1400px) rotateY(90deg); } }
@keyframes fc-turn-in { from { transform: perspective(1400px) rotateY(-90deg); } to { transform: perspective(1400px) rotateY(0deg); } }
.fc-card.fc-turn-out { animation: fc-turn-out 170ms var(--ease-sharp) forwards; }
.fc-card.fc-turn-in { animation: fc-turn-in var(--m-base) var(--spring-soft) both; }
@media (prefers-reduced-motion: reduce) { .fc-card.fc-turn-out, .fc-card.fc-turn-in { animation: none; } }
.fc-front { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.fc-back { display: none; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.fc-label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--ink-muted); padding: 5px 12px; border: 1px solid var(--rule); border-radius: var(--r-pill); }
.fc-back .fc-label { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fc-text { font-size: 22px; font-weight: 500; line-height: 1.45; letter-spacing: -0.015em; max-width: 46ch; }
.fc-hint { font-size: 11px; color: var(--ink-faint); }

.fc-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.fc-nav-btn { padding: 8px 18px; background: var(--bg-2); border: 1px solid var(--rule-soft); border-radius: var(--r-pill); font-size: 12px; font-weight: 500; color: var(--ink-muted); cursor: pointer; transition: background 140ms var(--ease), color 140ms var(--ease); }
.fc-nav-btn:hover { background: var(--bg-3); color: var(--ink); }
.fc-act-group { display: flex; gap: 8px; }
.fc-act-btn { padding: 8px 18px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid; transition: filter 140ms; }
.fc-act-btn.review { background: color-mix(in srgb, var(--r-red) 14%, var(--bg-2)); border-color: color-mix(in srgb, var(--r-red) 28%, var(--rule-soft)); color: var(--r-red); }
.fc-act-btn.got { background: color-mix(in srgb, var(--r-green) 14%, var(--bg-2)); border-color: color-mix(in srgb, var(--r-green) 28%, var(--rule-soft)); color: var(--r-green); }
.fc-act-btn:hover { filter: brightness(0.94); }
