/* Public flashcard pages (/cards). Generated HTML: scripts/build-cards.js */
:root {
  --ink: #1e1b4b; --text: #3b3768; --muted: #6b6799; --faint: #a8a3cf; --line: #f0eefb; --dash: #e4e0fb;
  --bg: #f8f6ff; --card: #ffffff; --tip: #fafaff; --btn: #efe9ff; --btn-ink: #5b21b6;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f1edff; --text: #d6d1f5; --muted: #b9b2e8; --faint: #8f88c4; --line: #2e2752; --dash: #3a3166;
    --bg: #0f0b1f; --card: #191334; --tip: #211a42; --btn: #2a2150; --btn-ink: #ddd3ff; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.45; }
a { color: inherit; }
.head { max-width: 1180px; margin: 0 auto; padding: 36px 16px 8px; text-align: center; }
.head h1 { font-family: 'Fredoka', sans-serif; font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 6px; }
.head p { margin: 0 auto; max-width: 56ch; color: var(--muted); font-weight: 700; }
.grid { max-width: 1180px; margin: 0 auto; padding: 20px 16px 8px; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr)); align-items: start; }
.single { max-width: 620px; margin: 0 auto; padding: 28px 16px 8px; }

.fc { background: var(--card); border-radius: 26px; box-shadow: 0 14px 34px rgba(60, 40, 140, .12), 0 3px 0 color-mix(in srgb, var(--c) 18%, transparent); padding: 22px 22px 18px; scroll-margin-top: 16px; }
.fc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fc-chip { background: var(--c); color: #fff; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1rem; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.fc-num { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: .85rem; letter-spacing: 1.5px; color: var(--faint); text-decoration: none; white-space: nowrap; }
.fc-q { font-family: 'Fredoka', sans-serif; font-weight: 500; font-size: clamp(1.35rem, 4.2vw, 1.7rem); line-height: 1.25; margin: 18px 4px 16px; }
.fc-q b { color: var(--c); font-weight: 600; white-space: nowrap; }

details summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--c) 12%, var(--card)); color: var(--c); font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.1rem; user-select: none; }
details summary::-webkit-details-marker { display: none; }
details summary:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
details .hide, details[open] .show { display: none; }
details[open] .hide { display: inline; }
.chev { transition: transform .2s; }
details[open] .chev { transform: rotate(180deg); }
details[open] summary { margin-bottom: 14px; }

.fc-ans { background: color-mix(in srgb, var(--soft) 100%, transparent); border-radius: 18px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; animation: pop .25s ease-out; }
@media (prefers-color-scheme: dark) { .fc-ans { background: color-mix(in srgb, var(--c) 22%, var(--card)); } }
.fc-ans .tick { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.6rem; color: var(--c); }
.fc-ans .val { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(1.4rem, 5vw, 1.9rem); line-height: 1.15; }
.fc-ans .note { font-weight: 800; color: var(--muted); }
.fc-body { padding: 12px 4px 4px; color: var(--text); font-weight: 600; font-size: 1.02rem; }
.fc-body p { margin: 8px 0; }
.fc-body b { color: var(--ink); font-weight: 900; }
.fc-body .tip { background: var(--tip); border-left: 5px solid var(--c); padding: 10px 14px; border-radius: 0 12px 12px 0; }
.fc-body table { width: 100%; border-collapse: collapse; }
.fc-body td { padding: 8px 0; border-bottom: 2px solid var(--line); vertical-align: top; }
.fc-body td:first-child { width: 44%; padding-right: 10px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.fc-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 2px dashed var(--dash); }
.btn { appearance: none; border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px; border-radius: 14px; font: 800 .95rem 'Nunito', sans-serif; background: var(--btn); color: var(--btn-ink); flex: 1 1 auto; }
.btn.primary { background: linear-gradient(135deg, #7c3aed, #db2777); color: #fff; }
.btn.fb { background: #1877f2; color: #fff; }
.btn:focus-visible { outline: 3px solid #7c3aed; outline-offset: 2px; }

.more { margin-top: 20px; text-align: center; }
.more .all { display: inline-block; font-weight: 800; color: #7c3aed; margin-bottom: 10px; }
.others { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.others a { background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 700; text-decoration: none; }

.foot { display: flex; justify-content: center; padding: 28px 16px 40px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 800; font-size: .9rem; text-decoration: none; }
.brand img { border-radius: 7px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s;
  background: #1e1b4b; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-color-scheme: dark) { .toast { background: #f1edff; color: #1e1b4b; } }
