:root {
  --bg: #fff8ec;
  --ink: #2b2140;
  --muted: #6d6485;
  --panel: #ffffff;
  --line: #eadfce;
  --pink: #ff5d8f;
  --orange: #ff8a00;
  --yellow: #ffc733;
  --green: #2bb673;
  --sky: #2f9bff;
  --purple: #8f5bff;
  --red: #ef3b4f;
  --radius: 20px;
  --shadow: 0 6px 0 rgba(43, 33, 64, 0.12), 0 10px 24px rgba(43, 33, 64, 0.08);
  --font: "Jua", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(#ffe2b8 1.5px, transparent 1.6px), radial-gradient(#d9ecff 1.5px, transparent 1.6px);
  background-size: 34px 34px, 34px 34px;
  background-position: 0 0, 17px 17px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }

.page { max-width: 1100px; margin: 0 auto; padding: 16px 16px 48px; }
.page-title { font-size: clamp(26px, 5vw, 38px); text-align: center; margin: 18px 0 20px; }
.page-title.left { text-align: left; margin: 8px 0 14px; }

/* ---------- 버튼 ---------- */
.btn {
  border: 0; border-radius: 16px; padding: 12px 20px; font-size: 19px; color: #fff;
  background: var(--sky); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); transition: transform 0.08s, box-shadow 0.08s;
  line-height: 1.2;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18); }
.btn-big { font-size: 23px; padding: 16px 28px; border-radius: 20px; }
.btn-small { font-size: 16px; padding: 9px 14px; border-radius: 13px; }
.btn-blue { background: var(--sky); }
.btn-go { background: var(--green); }
.btn-purple { background: var(--purple); }
.btn-orange { background: var(--orange); }
.btn-red { background: var(--red); }
.btn-gray { background: #8a84a0; }
.btn-ghost { background: #fff; color: var(--ink); border: 3px dashed #c9bfdc; box-shadow: none; }

/* ---------- 상단 바 / 배지 ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.student-badge {
  border: 3px solid var(--ink); background: var(--yellow); color: var(--ink); font-size: 19px;
  padding: 8px 16px; border-radius: 999px; box-shadow: 0 3px 0 var(--ink);
}
.student-badge.small { font-size: 14px; padding: 4px 10px; border-width: 2px; box-shadow: 0 2px 0 var(--ink); white-space: nowrap; }
.teacher-badge { background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 18px; }

/* ---------- 시작 화면 ---------- */
.hero { text-align: center; margin: 18px 0 22px; }
.hero-cards { font-size: 44px; letter-spacing: 8px; }
.hero-title {
  font-size: clamp(36px, 8vw, 64px); margin: 4px 0; color: var(--pink);
  text-shadow: 3px 3px 0 var(--yellow), 6px 6px 0 rgba(43, 33, 64, 0.15);
}
.hero-sub { font-size: 24px; margin: 4px 0; color: var(--muted); }
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px; }
.num-btn {
  aspect-ratio: 1; border: 0; border-radius: 22px; color: #fff; box-shadow: var(--shadow);
  display: flex; align-items: baseline; justify-content: center; padding-top: 22%;
  transition: transform 0.1s;
}
.num-btn:hover { transform: translateY(-3px) rotate(-2deg); }
.num-btn:active { transform: scale(0.95); }
.num-btn .num { font-size: clamp(32px, 6vw, 44px); }
.num-btn .num-unit { font-size: 17px; margin-left: 2px; }
.login-foot { text-align: center; margin-top: 28px; }
.demo-note { color: var(--muted); font-size: 15px; }

.color-0 { background: var(--pink); }
.color-1 { background: var(--orange); }
.color-2 { background: #e8a800; }
.color-3 { background: var(--green); }
.color-4 { background: var(--sky); }
.color-5 { background: var(--purple); }

/* ---------- 게임 목록 ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.game-card {
  border: 0; border-radius: var(--radius); color: #fff; text-align: left; padding: 18px 20px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-height: 170px; transition: transform 0.12s;
}
.game-card:hover { transform: translateY(-4px); }
.gc-type { align-self: flex-start; background: rgba(255, 255, 255, 0.25); border-radius: 999px; padding: 3px 12px; font-size: 14px; }
.gc-title { font-size: 26px; line-height: 1.25; flex: 1; word-break: keep-all; overflow-wrap: anywhere; }
.gc-meta { font-size: 16px; opacity: 0.95; }
.gc-best { background: rgba(255, 255, 255, 0.95); color: var(--ink); border-radius: 12px; padding: 6px 10px; font-size: 16px; }

/* ---------- 공용 패널/표 ---------- */
.panel { background: var(--panel); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel-title { font-size: 22px; margin: 0 0 8px; }
.label { display: block; font-size: 17px; margin: 12px 0 6px; color: var(--muted); }
.input {
  width: 100%; font-family: "Noto Sans KR", system-ui, sans-serif; font-size: 17px; color: var(--ink); background: #fffdf8;
  border: 3px solid var(--line); border-radius: 14px; padding: 10px 12px; outline: none;
}
.input:focus { border-color: var(--sky); }
.input.big { font-size: 20px; }
.paste-box { resize: vertical; min-height: 160px; font-size: 16px; line-height: 1.5; }
.hint-text { color: var(--muted); font-size: 15px; margin: 6px 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-family: "Noto Sans KR", system-ui, sans-serif; font-size: 16px; }
.table th { background: #f5efff; color: var(--ink); text-align: left; padding: 10px; font-family: var(--font); font-weight: normal; white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 2px solid #f3ecdf; }
.table .num-cell { white-space: nowrap; }
.best-row td { background: #fff6cf; font-weight: 700; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); grid-column: 1 / -1; }
.empty-emoji { font-size: 54px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 30px; color: var(--muted); grid-column: 1 / -1; }
.spinner { width: 26px; height: 26px; border: 4px solid #eadfce; border-top-color: var(--pink); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.my-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.my-summary > div { background: #f5efff; padding: 8px 14px; border-radius: 12px; }
.my-summary b { font-size: 24px; color: var(--purple); margin-right: 2px; }

/* ---------- 교사 화면 ---------- */
.tabs { display: flex; gap: 8px; margin: 10px 0 14px; flex-wrap: wrap; }
.tab { border: 3px solid var(--ink); background: #fff; color: var(--ink); border-radius: 14px; padding: 9px 16px; font-size: 18px; }
.tab.active { background: var(--ink); color: #fff; }
.t-list { display: flex; flex-direction: column; gap: 10px; }
.t-item { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.t-title { font-size: 22px; }
.t-meta { color: var(--muted); font-size: 15px; }
.t-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.parse-errors { margin-top: 8px; }
.parse-error { background: #ffe3e6; color: #a1122a; border-radius: 10px; padding: 7px 10px; margin-top: 6px; font-family: "Noto Sans KR", sans-serif; font-size: 15px; }
.pair-count { background: #e8f9ef; color: #146c43; padding: 6px 12px; border-radius: 999px; font-size: 16px; }
.edit-table td.idx { width: 40px; color: var(--muted); }
.edit-cell { cursor: text; border-radius: 8px; outline: none; min-width: 80px; }
.edit-cell:hover { background: #f4faff; }
.edit-cell:focus { background: #eaf4ff; box-shadow: inset 0 0 0 2px var(--sky); }
.del { width: 46px; text-align: center; }
.del-btn { border: 0; background: #ffe3e6; color: #c0162f; width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.empty-row { text-align: center; color: var(--muted); padding: 22px !important; }
.add-btn { margin-top: 10px; width: 100%; }
.editor-actions { position: sticky; bottom: 0; background: rgba(255, 248, 236, 0.95); padding: 12px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.editor-buttons { display: flex; gap: 10px; }
.save-status { margin: 0; font-size: 16px; color: var(--muted); }
.save-status.bad { color: #c0162f; }
.save-status.good { color: #14804a; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 18px; padding: 14px; box-shadow: var(--shadow); text-align: center; }
.stat-num { font-size: 28px; color: var(--purple); }
.stat-label { color: var(--muted); font-size: 15px; }
.segs { display: flex; gap: 4px; background: #f1ebe0; padding: 4px; border-radius: 12px; }
.seg { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-size: 16px; color: var(--ink); }
.seg.active { background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1); }
.pin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 10px; }
.register-note { font-family: "Noto Sans KR", sans-serif; font-size: 16px; line-height: 1.6; margin: 6px 0; }
.count-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; flex-wrap: wrap; }
.count-label { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.count-input { width: 100px; font-size: 20px; text-align: center; }
.names-box { min-height: 260px; line-height: 1.6; margin-top: 8px; }
.names-preview { color: var(--muted); font-size: 15px; }

/* ---------- 순위표 ---------- */
.lb-box { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.lb-title { margin: 0 0 10px; font-size: 24px; }
.lb-row { display: grid; grid-template-columns: 52px minmax(70px, 140px) 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; }
.lb-row.me { background: #fff1b8; outline: 3px solid var(--yellow); }
.lb-rank { font-size: 22px; text-align: center; }
.lb-name { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-bar { height: 18px; background: #f3ecdf; border-radius: 999px; overflow: hidden; }
.lb-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow)); }
.lb-score { font-size: 17px; white-space: nowrap; }
.lb-gap { text-align: center; color: var(--muted); }

/* ---------- 결과 화면 ---------- */
.result-page { max-width: 760px; }
.result-card { background: #fff; border-radius: 28px; padding: 26px 20px; text-align: center; box-shadow: var(--shadow); margin: 10px 0 16px; }
.result-emoji { font-size: 64px; animation: pop 0.6s ease-out; }
.result-title { font-size: clamp(30px, 6vw, 44px); margin: 6px 0 10px; word-break: keep-all; overflow-wrap: anywhere; }
.result-score { font-size: 28px; }
.result-score b { font-size: clamp(48px, 11vw, 76px); color: var(--pink); margin: 0 4px; }
.result-combo { font-size: 24px; color: var(--orange); margin-top: 4px; }
.save-note { color: var(--muted); font-size: 16px; min-height: 1.2em; }
.result-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.notice { background: #fff; border: 3px dashed var(--orange); border-radius: 18px; padding: 16px; text-align: center; font-size: 19px; }
.test-banner {
  background: repeating-linear-gradient(45deg, #ff8a00, #ff8a00 14px, #ff9d2e 14px, #ff9d2e 28px);
  color: #fff; text-align: center; padding: 6px 10px; font-size: 17px; border-radius: 12px; margin-bottom: 6px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

/* ---------- 매칭 게임 화면 ---------- */
body.in-game { overflow: hidden; }
.game-screen { position: fixed; inset: 0; display: flex; flex-direction: column; padding: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.game-screen .test-banner { margin-bottom: 6px; flex: none; }
.game-top { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 2px; }
.g-exit { flex: none; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #fff; color: var(--ink); font-size: 16px; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); }
.g-title { flex: 1; min-width: 0; font-size: 17px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-chips { display: flex; gap: 6px; flex: none; }
.chip { display: none; padding: 4px 10px; border-radius: 999px; font-size: 15px; color: #fff; white-space: nowrap; }
.chip.show { display: inline-block; animation: pop 0.3s ease-out; }
.chip-combo { background: var(--pink); }
.chip-speed { background: var(--sky); }
.score-badge { flex: none; background: var(--ink); color: #fff; padding: 5px 14px; border-radius: 999px; font-size: 18px; min-width: 70px; text-align: center; }
.score-badge.bump { animation: bump 0.45s ease-out; }
.board-wrap { position: relative; flex: 1; min-height: 0; padding: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.board-wrap.scroll { overflow-y: auto; align-items: flex-start; }
.board { display: grid; justify-content: center; align-content: center; }
.card {
  border: 0; border-radius: 16px; color: #fff; padding: 8px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2); transition: transform 0.12s, box-shadow 0.12s, opacity 0.35s; position: relative; overflow: hidden;
  font-family: var(--font);
}
.card-text { display: block; width: 100%; text-align: center; line-height: 1.18; word-break: keep-all; overflow-wrap: normal; }
/* 뜻/답 카드는 점선 테두리로 구분 */
.card.side-a { outline: 3px dashed rgba(255, 255, 255, 0.9); outline-offset: -7px; }
.card.side-a .card-text { font-family: "Noto Sans KR", system-ui, sans-serif; font-weight: 700; }
.card:hover:not(:disabled) { transform: translateY(-2px); }
.card.selected { transform: translateY(-4px) scale(1.04); box-shadow: 0 0 0 5px #fff, 0 0 0 9px var(--ink), 0 10px 18px rgba(0, 0, 0, 0.25); z-index: 2; }
.card.wrong { animation: wrong 0.5s; background: var(--red) !important; }
.card.matched { animation: matched 0.45s ease-out forwards; pointer-events: none; }
.card.hint1 { animation: wiggle 0.9s ease-in-out infinite; }
.card.hint1::after, .card.hint3::after { content: "💡"; position: absolute; top: 2px; right: 4px; font-size: 18px; }
.card.hint3 { animation: wiggle 0.9s ease-in-out infinite; box-shadow: 0 0 0 4px #fff, 0 0 18px 8px var(--yellow); }
.game-screen.shake { animation: shake 0.4s; }
.start-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 248, 236, 0.82); backdrop-filter: blur(4px); z-index: 5; padding: 12px; overflow-y: auto; }
.start-card { background: #fff; border-radius: 28px; padding: 22px 22px 26px; text-align: center; box-shadow: var(--shadow); max-width: 560px; width: 100%; color: var(--ink); }
.start-emoji { font-size: 50px; }
.start-title { font-size: clamp(28px, 6vw, 44px); margin: 4px 0; word-break: keep-all; overflow-wrap: anywhere; }
.start-sub { font-size: 20px; color: var(--muted); margin: 4px 0 10px; }
.start-rules { text-align: left; font-family: "Noto Sans KR", sans-serif; font-size: 15px; line-height: 1.7; background: #fff8ec; border-radius: 14px; padding: 10px 14px 10px 30px; margin: 0 0 16px; }

/* ---------- 이펙트 ---------- */
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.float-text { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-family: var(--font); animation: floatUp 1.2s ease-out forwards; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); }
.fx-plus { color: var(--green); font-size: 36px; -webkit-text-stroke: 1.5px #fff; }
.fx-minus { color: var(--red); font-size: 40px; -webkit-text-stroke: 1.5px #fff; }
.fx-combo { font-size: clamp(40px, 9vw, 76px); color: var(--pink); -webkit-text-stroke: 2px #fff; animation: comboPop 1.2s ease-out forwards; top: 38% !important; }
.fx-combo.lvl3 { color: var(--orange); }
.fx-combo.lvl4 { color: var(--purple); }
.fx-combo.lvl5, .fx-combo.lvl6 { background: linear-gradient(90deg, #ff5d8f, #ffc733, #2bb673, #2f9bff, #8f5bff); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; filter: drop-shadow(0 3px 0 #fff) drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.fx-speed { font-size: clamp(30px, 6vw, 48px); color: var(--sky); -webkit-text-stroke: 1.5px #fff; top: 52% !important; animation: speedZoom 1.1s ease-out forwards; }
.fx-hint { font-size: 34px; color: #b07c00; top: 60px !important; -webkit-text-stroke: 1px #fff; }
.fx-reset { font-size: 24px; color: #fff; background: var(--red); padding: 6px 14px; border-radius: 999px; top: 60% !important; text-shadow: none; }
.confetti { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }

@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
@keyframes comboPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-8deg); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.25) rotate(3deg); } 35% { transform: translate(-50%, -50%) scale(1) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1.05); } }
@keyframes speedZoom { 0% { opacity: 0; transform: translate(-150%, -50%) skewX(-20deg); } 20% { opacity: 1; transform: translate(-50%, -50%) skewX(-10deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(40%, -50%) skewX(-20deg); } }
@keyframes pop { 0% { transform: scale(0.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.3); background: var(--green); } 100% { transform: scale(1); } }
@keyframes matched { 0% { transform: scale(1); opacity: 1; } 40% { transform: scale(1.12); opacity: 1; box-shadow: 0 0 0 5px #fff, 0 0 24px 10px var(--yellow); } 100% { transform: scale(0.6); opacity: 0; visibility: hidden; } }
@keyframes wrong { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-6px, 2px); } 40% { transform: translate(6px, -2px); } 60% { transform: translate(-4px, 1px); } 80% { transform: translate(4px, -1px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg) scale(1.03); } 75% { transform: rotate(4deg) scale(1.03); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- 팝업 (바깥 색과 상관없이 항상 흰 배경 + 진한 글씨) ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(20, 14, 35, 0.6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; animation: fadeIn 0.15s; }
.modal {
  background: #ffffff !important; color: #1e1730 !important; border-radius: 24px; padding: 22px 20px 18px; width: 100%; max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); border: 4px solid #1e1730; animation: pop 0.25s ease-out;
}
.modal.warn { border-color: #ff8a00; }
.modal.danger { border-color: #ef3b4f; }
.modal-title { margin: 0 0 8px; font-size: 24px; color: #1e1730 !important; }
.modal-text { font-size: 18px; line-height: 1.5; color: #2b2140 !important; margin: 6px 0 12px; font-family: "Noto Sans KR", sans-serif; }
.modal-error { min-height: 1.3em; color: #c0162f !important; font-size: 16px; margin: 8px 0 0; font-family: "Noto Sans KR", sans-serif; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.modal .btn { color: #ffffff !important; }
.modal .btn-blue { background: #1f7ae0 !important; }
.modal .btn-gray { background: #6b6580 !important; }
.modal .btn-red { background: #d62839 !important; }
.pin-input { width: 100%; font-size: 30px; letter-spacing: 10px; text-align: center; padding: 10px; border: 3px solid #c9bfdc; border-radius: 14px; color: #1e1730 !important; background: #fbf9ff !important; font-family: inherit; outline: none; }
.pin-input:focus { border-color: #1f7ae0; }
@keyframes fadeIn { from { opacity: 0; } }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .num-grid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 9px; }
  .num-btn { border-radius: 16px; }
  .lb-row { grid-template-columns: 40px minmax(56px, 90px) 1fr auto; gap: 6px; }
  .g-title { font-size: 14px; }
  .score-badge { font-size: 16px; padding: 4px 10px; min-width: 56px; }
  .chip { font-size: 13px; padding: 3px 8px; }
  .student-badge { font-size: 16px; padding: 6px 12px; }
  .card { border-radius: 12px; padding: 5px; }
  .card.side-a { outline-width: 2px; outline-offset: -5px; }
  .editor-buttons { width: 100%; }
  .editor-buttons .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .card.hint1, .card.hint3 { animation: none; }
}
