/* ===== FlashCards — flat and calm; no animations or transitions ===== */
#view-flashcards, #view-flashcards * { animation:none !important; transition:none !important; }
.fc-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:18px; }
.fc-hero h2 { font-family:var(--display,inherit); font-size:clamp(24px,4vw,32px); margin:2px 0 4px; letter-spacing:-.02em; }
.fc-hero .eyebrow { color:var(--green-700); font-weight:800; letter-spacing:.14em; font-size:11px; }
.fc-hero p { color:var(--ink-3); font-weight:600; margin:0; font-size:13px; }

/* home: options + decks */
.fc-options { display:flex; flex-wrap:wrap; gap:12px 22px; padding:14px 16px; border-radius:18px; margin-bottom:16px; }
.fc-opt { display:flex; flex-direction:column; gap:6px; min-width:0; }
.fc-opt[hidden] { display:none; }
.fc-opt > span { font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); }
.fc-options .seg { background:var(--surface-2); border-color:var(--line); }
.fc-options .seg button { height:34px; padding:0 12px; font-size:13px; }
.fc-options .seg button.on { background:var(--surface); color:var(--accent); box-shadow:var(--shadow); }

.fc-decks { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:14px; }
.fc-deck { position:relative; overflow:hidden; display:flex; flex-direction:column; gap:4px; align-items:flex-start; padding:18px 18px 16px; border-radius:20px; border:1px solid var(--line-2); background:var(--surface); color:var(--ink); font:inherit; cursor:pointer; text-align:left; -webkit-tap-highlight-color:transparent; }
.fc-deck:hover:not(:disabled) { border-color:var(--accent); }
.fc-deck:disabled { cursor:default; opacity:.55; }
.fc-deck-glyph { position:absolute; right:-4px; top:-12px; font-size:88px; font-weight:800; line-height:1; opacity:.1; color:var(--green-700); font-family:var(--display,serif); pointer-events:none; }
.fc-deck-hsk .fc-deck-glyph { color:#a9432f; }
.fc-deck strong { font-size:19px; font-weight:800; z-index:1; }
.fc-deck small { color:var(--ink-3); font-weight:700; z-index:1; }
.fc-deck-bar { align-self:stretch; height:6px; margin-top:10px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.fc-deck-bar i { display:block; height:100%; background:var(--accent); border-radius:inherit; }
.fc-home-foot { margin:14px 2px 0; font-size:12px; color:var(--ink-3); font-weight:600; }
.fc-reset { margin-left:6px; padding:0; border:0; background:none; color:var(--ink-2); font:inherit; font-weight:800; text-decoration:underline; cursor:pointer; }
.fc-loading { grid-column:1/-1; display:grid; place-items:center; padding:40px; }
.fc-error { color:var(--danger); font-weight:700; grid-column:1/-1; }

/* play */
.fc-play { padding:18px; max-width:640px; margin:0 auto; }
.fc-play-top { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.fc-play-title { flex:1; text-align:center; min-width:0; }
.fc-play-title strong { display:block; font-weight:800; }
.fc-play-title small { color:var(--ink-3); font-weight:700; font-size:12px; font-variant-numeric:tabular-nums; }
.fc-play-actions { display:flex; gap:4px; }
.fc-bar { height:6px; border-radius:999px; background:var(--surface-2); overflow:hidden; margin-bottom:6px; }
.fc-bar i { display:block; height:100%; width:0; background:var(--accent); }

.fc-track { position:relative; display:grid; place-items:center; padding:12px 0 6px; }
.fc-side { position:absolute; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; align-items:center; gap:4px; font-weight:800; font-size:13px; opacity:.3; pointer-events:none; }
.fc-side .i { width:26px; height:26px; }
.fc-side-left { left:2px; color:var(--green-700); }
.fc-side-right { right:2px; color:#a9432f; }
.fc-card-stage { width:min(380px,78vw); }

.fc-card { position:relative; width:100%; aspect-ratio:3/4; cursor:grab; touch-action:pan-y; user-select:none; -webkit-user-select:none; border-radius:26px; }
.fc-card:active { cursor:grabbing; }
.fc-card:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
.fc-face { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:26px 22px 40px; border-radius:26px; text-align:center; box-shadow:var(--shadow); border:1px solid var(--line-2); }
.fc-front { background:var(--surface); }
.fc-back { display:none; background:var(--accent); color:#fff; }
.fc-card.is-flipped .fc-front { display:none; }
.fc-card.is-flipped .fc-back { display:flex; }
.fc-face-kicker { font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--green-700); opacity:.8; }
.fc-word { font-size:clamp(34px,10vw,56px); font-weight:800; line-height:1.1; color:var(--ink); word-break:break-word; }
.fc-card-cn .fc-word { font-size:clamp(60px,20vw,110px); }
.fc-back .fc-word { color:#fff; }
.fc-tap-hint { font-size:12px; color:var(--ink-3); font-weight:700; }
.fc-pinyin { font-size:clamp(20px,6vw,30px); font-weight:700; opacity:.9; }
.fc-meaning { font-size:clamp(26px,7vw,40px); font-weight:800; line-height:1.15; word-break:break-word; }
.fc-meaning-front { color:var(--ink); }
.fc-word-sub { font-size:15px; opacity:.75; font-weight:700; }
.fc-speak { display:inline-grid; place-items:center; width:44px; height:44px; border-radius:50%; border:1px solid var(--line-2); background:var(--surface-2); color:var(--ink); cursor:pointer; }
.fc-back .fc-speak { background:rgba(255,255,255,.18); border-color:rgba(255,255,255,.4); color:#fff; }
.fc-speak .i { width:20px; height:20px; }
.fc-level { position:absolute; left:0; right:0; bottom:16px; display:flex; justify-content:center; gap:5px; font-size:11px; font-weight:800; color:var(--ink-3); }
.fc-level i { width:8px; height:8px; border-radius:50%; background:var(--line-2); }
.fc-level i.on { background:var(--accent); }
.fc-back .fc-level, .fc-back .fc-level.is-new { color:rgba(255,255,255,.8); }
.fc-back .fc-level i { background:rgba(255,255,255,.3); }
.fc-back .fc-level i.on { background:#fff; }

.fc-card.fc-hint-know .fc-face { box-shadow:0 0 0 3px var(--green-700) inset, var(--shadow); }
.fc-card.fc-hint-dont .fc-face { box-shadow:0 0 0 3px #a9432f inset, var(--shadow); }
.fc-card.fc-hint-know::after, .fc-card.fc-hint-dont::after { position:absolute; top:18px; z-index:3; padding:6px 14px; border-radius:999px; font-weight:800; font-size:14px; color:#fff; }
.fc-card.fc-hint-know::after { content:"✓ МЭДНЭ"; left:18px; background:var(--green-700); }
.fc-card.fc-hint-dont::after { content:"✕ МЭДЭХГҮЙ"; right:18px; background:#a9432f; }

.fc-hint { text-align:center; color:var(--ink-3); font-weight:600; font-size:12.5px; margin:14px 0 10px; }
.fc-controls { display:flex; gap:10px; justify-content:center; }
.fc-controls .btn { min-width:120px; }
.fc-btn-know { color:#fff; background:var(--green-700); }
.fc-btn-dont { color:#fff; background:#a9432f; }
.fc-btn-flip { background:var(--surface); border:1px solid var(--line-2); color:var(--ink); }

/* quiz */
.fc-quiz-q { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; min-height:220px; margin:12px 0 14px; padding:24px 20px 40px; border-radius:24px; background:var(--surface); border:1px solid var(--line-2); box-shadow:var(--shadow); text-align:center; }
.fc-quiz-prompt { font-size:clamp(30px,8vw,48px); font-weight:800; line-height:1.15; color:var(--ink); word-break:break-word; }
.fc-quiz-q.is-cn .fc-quiz-prompt { font-size:clamp(56px,16vw,96px); }
.fc-quiz-opts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.fc-ans { display:flex; align-items:center; gap:10px; min-height:58px; padding:12px 14px; border-radius:16px; border:1px solid var(--line-2); background:var(--surface); color:var(--ink); font:inherit; font-size:16px; font-weight:800; text-align:left; cursor:pointer; }
.fc-ans.is-cn span { font-size:24px; }
.fc-ans:hover:not(:disabled) { border-color:var(--accent); }
.fc-ans:disabled { cursor:default; }
.fc-ans kbd { flex:none; display:grid; place-items:center; width:24px; height:24px; border-radius:7px; background:var(--surface-2); color:var(--ink-3); font:inherit; font-size:12px; }
.fc-ans span { min-width:0; overflow-wrap:anywhere; }
.fc-ans.is-right { background:#e3ecd8; border-color:var(--green-700); color:#33502a; }
.fc-ans.is-wrong { background:#f4e1db; border-color:#a9432f; color:#7a2e20; }
.fc-ans:disabled:not(.is-right):not(.is-wrong) { opacity:.55; }
.fc-quiz-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:46px; margin-top:12px; }
.fc-quiz-msg { margin:0; font-weight:800; font-size:14px; }
.fc-quiz-msg span { font-weight:600; color:var(--ink-2); }
.fc-quiz-msg.is-ok { color:var(--green-700); }
.fc-quiz-msg.is-bad { color:#a9432f; }

/* summary */
.fc-summary { max-width:500px; margin:0 auto; padding:30px 24px; text-align:center; }
.fc-summary-badge { width:72px; height:72px; margin:0 auto 14px; border-radius:22px; display:grid; place-items:center; color:#fff; background:var(--accent); }
.fc-summary-badge.is-perfect { background:#b4863a; }
.fc-summary h3 { font-family:var(--display,inherit); font-size:24px; margin:0 0 16px; }
.fc-summary-stats { display:flex; gap:10px; justify-content:center; margin-bottom:14px; }
.fc-stat { flex:1; max-width:130px; padding:14px 10px; border-radius:16px; background:var(--surface); border:1px solid var(--line-2); }
.fc-stat b { display:block; font-family:var(--display,inherit); font-size:28px; font-weight:800; }
.fc-stat small { color:var(--ink-3); font-weight:700; }
.fc-stat-know b { color:var(--green-700); }
.fc-stat-dont b { color:#a9432f; }
.fc-summary-note { margin:0 0 16px; font-size:13px; color:var(--ink-2); line-height:1.6; }
.fc-missed { text-align:left; margin:0 0 18px; padding:14px 16px; border-radius:16px; background:var(--surface); border:1px solid var(--line-2); }
.fc-missed h4 { margin:0 0 8px; font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-3); }
.fc-missed ul { list-style:none; margin:0; padding:0; max-height:220px; overflow:auto; }
.fc-missed li { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; padding:6px 0; border-bottom:1px solid var(--line); font-size:14px; }
.fc-missed li:last-child { border-bottom:0; }
.fc-missed li small { color:var(--ink-3); }
.fc-missed li span { margin-left:auto; color:var(--ink-2); }
.fc-summary-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }

@media (max-width:560px) {
  .fc-options { gap:10px 14px; }
  .fc-controls .btn { min-width:0; flex:1; padding:12px 8px; }
  .fc-controls .btn span { font-size:13px; }
  .fc-quiz-opts { grid-template-columns:1fr; }
}

/* Shared sound-effects toggle (Ludo / FlashCards / Chooser heroes) */
.ludo-hero, .fc-hero, .chooser-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sfx-toggle { flex: 0 0 auto; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: inherit; cursor: pointer; backdrop-filter: blur(6px); transition: transform .15s ease, background .15s ease, opacity .15s ease; }
.sfx-toggle:hover { transform: translateY(-1px); background: rgba(255,255,255,.18); }
.sfx-toggle:active { transform: translateY(0) scale(.94); }
.sfx-toggle svg { width: 20px; height: 20px; }
.sfx-toggle.is-muted { opacity: .55; position: relative; }
.sfx-toggle.is-muted::after { content: ''; position: absolute; left: 9px; right: 9px; top: 50%; height: 2px; margin-top: -1px; background: currentColor; transform: rotate(-45deg); border-radius: 2px; }

/* Beat older skin rules (aurora.css / calm.css) that would otherwise win on these elements */
#view-flashcards .fc-face { box-shadow:var(--shadow); }
#view-flashcards .fc-back .fc-word { color:#fff !important; }
#view-flashcards .fc-card.fc-hint-know, #view-flashcards .fc-card.fc-hint-dont { box-shadow:none; }
#view-flashcards .fc-card.fc-hint-know .fc-face { box-shadow:0 0 0 3px var(--green-700) inset, var(--shadow); }
#view-flashcards .fc-card.fc-hint-dont .fc-face { box-shadow:0 0 0 3px #a9432f inset, var(--shadow); }
#view-flashcards .fc-deck { background:var(--surface); }
#view-flashcards .fc-deck-hsk { background:linear-gradient(135deg, rgba(181,128,106,.16), var(--surface)); }
#view-flashcards .fc-deck:hover { box-shadow:none; }
#view-flashcards .fc-summary-badge { box-shadow:none; }
#view-flashcards .fc-summary-badge.is-perfect { background:#b4863a; }
html[data-theme="dark"] #view-flashcards :is(.fc-stat-dont b, .fc-deck-hsk .fc-deck-glyph) { color:#e08a7d; }
