:root {
  --ink: #23264a;
  --ink-soft: #5b5f86;
  --bg1: #fff6d8;
  --bg2: #ffe1ec;
  --bg3: #dff3ff;
  --card: #ffffff;
  --line: #e6e3f3;
  --red: #ff5d73;
  --orange: #ff9f43;
  --yellow: #ffd23f;
  --green: #2ec27e;
  --teal: #19c3b8;
  --blue: #3d8bfd;
  --purple: #8c5cf6;
  --pink: #ff6fb5;
  --radius: 18px;
  --font-fun: 'Jua', 'Gowun Dodum', system-ui, sans-serif;
  --font-body: 'Gowun Dodum', 'Jua', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff6e5;
  background-image:
    radial-gradient(circle at 10% 15%, rgba(255, 210, 63, .35) 0 60px, transparent 61px),
    radial-gradient(circle at 92% 8%, rgba(255, 111, 181, .25) 0 80px, transparent 81px),
    radial-gradient(circle at 85% 90%, rgba(61, 139, 253, .2) 0 110px, transparent 111px),
    radial-gradient(circle at 5% 85%, rgba(46, 194, 126, .2) 0 70px, transparent 71px),
    linear-gradient(160deg, var(--bg1), var(--bg2) 50%, var(--bg3));
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, .fun { font-family: var(--font-fun); font-weight: 400; }

.page { max-width: 1100px; margin: 0 auto; padding: 16px 16px 48px; }

/* ---------- 공통 버튼 ---------- */
.btn {
  border: 0; border-radius: 14px; padding: 12px 20px;
  font-family: var(--font-fun); font-size: 1.15rem; line-height: 1.2;
  background: var(--blue); color: #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
  transition: transform .08s, box-shadow .08s, filter .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.18); }
.btn:disabled { background: #c9c9d6 !important; color: #fff; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.red { background: var(--red); }
.btn.green { background: var(--green); }
.btn.orange { background: var(--orange); }
.btn.purple { background: var(--purple); }
.btn.pink { background: var(--pink); }
.btn.teal { background: var(--teal); }
.btn.ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.btn.small { font-size: .95rem; padding: 8px 12px; min-height: 40px; border-radius: 12px; }
.btn.big { font-size: 1.6rem; padding: 16px 36px; min-height: 64px; border-radius: 20px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.muted { color: var(--ink-soft); }
.panel {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: 0 6px 0 rgba(35, 38, 74, .08), 0 10px 30px rgba(35, 38, 74, .08);
  margin-bottom: 18px;
}

/* ---------- 시작 화면 ---------- */
.hero { text-align: center; padding: 20px 0 8px; }
.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4rem); margin: 0;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--green), var(--blue), var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(255,255,255,.9));
}
.hero p { font-size: 1.3rem; margin: 6px 0 0; font-family: var(--font-fun); color: var(--ink-soft); }
.num-grid {
  display: grid; gap: 12px; margin: 24px auto;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.num-btn {
  aspect-ratio: 1; border: 0; border-radius: 22px;
  font-family: var(--font-fun); font-size: clamp(1.6rem, 4vw, 2.2rem); color: #fff;
  box-shadow: 0 5px 0 rgba(0,0,0,.2);
  transition: transform .1s;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.num-btn small { font-size: .9rem; opacity: .9; }
.num-btn:hover { transform: translateY(-3px) rotate(-2deg); }
.num-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.teacher-link { text-align: center; margin-top: 12px; }

/* ---------- 상단 헤더 ---------- */
.topnav {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 18px;
  box-shadow: 0 4px 0 rgba(35,38,74,.08);
}
.topnav .brand { font-family: var(--font-fun); font-size: 1.4rem; margin-right: 6px; }
.me-badge {
  border: 0; border-radius: 999px; padding: 8px 16px; min-height: 44px;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
  color: #3a2300; font-family: var(--font-fun); font-size: 1.15rem;
  box-shadow: 0 3px 0 rgba(0,0,0,.15);
}
.me-badge .lock { font-size: .9em; opacity: .7; margin-left: 4px; }
.tab { background: transparent; color: var(--ink); box-shadow: none; border: 2px solid transparent; }
.tab.active { background: var(--ink); color: #fff; }

/* ---------- 게임 카드 목록 ---------- */
.game-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.game-card {
  border: 0; text-align: left; border-radius: 22px; padding: 20px; color: #fff; min-height: 150px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 6px 0 rgba(0,0,0,.18); transition: transform .12s;
  position: relative; overflow: hidden;
}
.game-card:hover { transform: translateY(-4px) rotate(-.6deg); }
.game-card h3 { margin: 0; font-size: 1.6rem; line-height: 1.2; word-break: keep-all; overflow-wrap: anywhere; }
.game-card .meta { font-size: 1.05rem; opacity: .95; }
.game-card .best {
  margin-top: auto; background: rgba(255,255,255,.95); color: var(--ink);
  border-radius: 12px; padding: 6px 12px; font-family: var(--font-fun); font-size: 1.1rem; align-self: flex-start;
}
.game-card::after { content: '▶'; position: absolute; right: 16px; bottom: 12px; font-size: 2rem; opacity: .35; }
.c0 { background: linear-gradient(135deg, #ff6b81, #ff9f43); }
.c1 { background: linear-gradient(135deg, #3d8bfd, #19c3b8); }
.c2 { background: linear-gradient(135deg, #8c5cf6, #ff6fb5); }
.c3 { background: linear-gradient(135deg, #2ec27e, #19c3b8); }
.c4 { background: linear-gradient(135deg, #ff9f43, #ffd23f); color: #3a2300 !important; }
.c5 { background: linear-gradient(135deg, #ff6fb5, #ff5d73); }
.empty { text-align: center; padding: 40px 10px; font-size: 1.2rem; color: var(--ink-soft); }
.empty .big-emoji { font-size: 3rem; display: block; margin-bottom: 8px; }

/* ---------- 매칭 게임 화면 ---------- */
body.playing { overflow: hidden; }
.play { position: fixed; inset: 0; display: flex; flex-direction: column; }
.test-banner {
  background: repeating-linear-gradient(45deg, #ffd23f 0 18px, #ffc300 18px 36px);
  color: #3a2300; text-align: center; font-family: var(--font-fun); font-size: 1.05rem; padding: 6px 10px;
  flex: none; border-bottom: 3px solid #e0a800;
}
.gamebar {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.06);
  min-height: 46px;
}
.gamebar .quit { border: 0; background: #f1effa; border-radius: 10px; width: 36px; height: 36px; font-size: 1.1rem; flex: none; }
.gamebar .who { font-family: var(--font-fun); font-size: .95rem; background: var(--yellow); color: #3a2300; border-radius: 999px; padding: 3px 10px; flex: none; }
.gamebar .gtitle { font-family: var(--font-fun); font-size: 1rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gamebar .right { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.chip {
  font-family: var(--font-fun); font-size: .95rem; border-radius: 999px; padding: 4px 10px; color: #fff;
  animation: pop .25s ease-out;
}
.chip.combo { background: linear-gradient(90deg, var(--pink), var(--purple)); }
.chip.speed { background: linear-gradient(90deg, var(--orange), var(--yellow)); color: #3a2300; }
.score-badge {
  font-family: var(--font-fun); font-size: 1.15rem; background: var(--ink); color: #fff;
  border-radius: 999px; padding: 5px 14px; min-width: 70px; text-align: center;
}
.score-badge.bump { animation: bump .35s ease-out; }
.board-wrap { flex: 1; min-height: 0; overflow: auto; padding: 10px; position: relative; }
.board { display: grid; justify-content: center; align-content: center; min-height: 100%; }
.board.scroll { align-content: start; min-height: 0; }
.mcard {
  border: 0; border-radius: 16px; background: #fff; color: var(--ink);
  box-shadow: 0 5px 0 #d9d4ee, 0 6px 14px rgba(35,38,74,.1);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 8px; overflow: hidden; position: relative;
  font-family: var(--font-fun); line-height: 1.15;
  word-break: keep-all; overflow-wrap: anywhere;
  transition: transform .12s, background .15s, opacity .4s, box-shadow .15s;
  user-select: none;
}
.mcard .txt { display: block; max-width: 100%; }
.mcard.answer { background: #f3f8ff; box-shadow: 0 5px 0 #c9dcf7, 0 6px 14px rgba(35,38,74,.1); }
.mcard:hover { transform: translateY(-2px); }
.mcard.sel { background: #fff3b0; box-shadow: 0 0 0 4px var(--orange), 0 5px 0 #e0a800; transform: translateY(-3px) scale(1.03); }
.mcard.wrong { background: #ffd9de; box-shadow: 0 0 0 4px var(--red); animation: wiggle .35s; }
.mcard.right { background: #c9f5dd; box-shadow: 0 0 0 4px var(--green); animation: pop .3s; }
.mcard.matched { opacity: 0; pointer-events: none; transform: scale(.85); }
.mcard.hint1 { animation: hintshake 1.2s ease-in-out infinite; box-shadow: 0 0 0 4px #ffd23f, 0 0 22px #ffd23f; }
.mcard.hint3 { box-shadow: 0 0 0 4px #ffd23f, 0 0 22px #ffd23f; }
.mcard .hint-tag {
  position: absolute; top: 4px; left: 4px; font-size: 13px; line-height: 1;
  background: #ffd23f; color: #3a2300; border-radius: 8px; padding: 3px 6px; font-family: var(--font-fun);
  pointer-events: none; max-width: calc(100% - 8px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shake { animation: screenshake .4s; }

.overlay-center {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column;
  padding: 20px; text-align: center; gap: 14px; overflow: auto;
}
.start-box { background: #fff; border-radius: 28px; padding: 28px 24px; max-width: 560px; width: 100%; box-shadow: 0 8px 0 rgba(0,0,0,.08), 0 20px 50px rgba(0,0,0,.12); }
.start-box h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); margin: 0 0 6px; word-break: keep-all; overflow-wrap: anywhere; }
.rules { text-align: left; background: #f7f5ff; border-radius: 16px; padding: 12px 16px; margin: 14px 0; font-size: 1rem; line-height: 1.6; }

.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.float-pts {
  position: absolute; font-family: var(--font-fun); font-size: 1.8rem; color: var(--green);
  text-shadow: 0 2px 0 #fff, 0 0 6px #fff; transform: translate(-50%, -50%);
  animation: floatup 1s ease-out forwards; white-space: nowrap;
}
.float-pts.minus { color: var(--red); font-size: 2.2rem; }
.big-fx {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  font-family: var(--font-fun); font-size: clamp(2.2rem, 9vw, 5rem); white-space: nowrap;
  color: #fff; -webkit-text-stroke: 2px rgba(0,0,0,.15);
  text-shadow: 0 4px 0 rgba(0,0,0,.2), 0 0 30px rgba(255,255,255,.8);
  animation: bigfx 1.1s ease-out forwards;
}
.big-fx.combo { color: var(--pink); }
.big-fx.combo.lv3 { color: var(--purple); }
.big-fx.combo.lv4 { background: linear-gradient(90deg, #ff5d73, #ff9f43, #ffd23f, #2ec27e, #3d8bfd, #8c5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big-fx.speed { color: var(--orange); top: 58%; font-size: clamp(1.6rem, 6vw, 3.2rem); }
.big-fx.reset { color: var(--red); font-size: clamp(1.2rem, 4.5vw, 2rem); top: 56%; }
.big-fx.hint { color: #e0a800; font-size: clamp(1.4rem, 5vw, 2.4rem); top: 30%; }
.confetti { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: confetti linear forwards; }

/* ---------- 결과 ---------- */
.result { max-width: 720px; margin: 0 auto; padding: 20px 16px 40px; text-align: center; }
.result h1 { font-size: clamp(1.8rem, 6vw, 3rem); margin: 6px 0; word-break: keep-all; overflow-wrap: anywhere; }
.final-score { font-family: var(--font-fun); font-size: clamp(2.4rem, 10vw, 4.6rem); color: var(--red); margin: 6px 0; animation: pop .5s; }
.final-combo { font-family: var(--font-fun); font-size: 1.6rem; color: var(--purple); }
.save-state { margin: 10px 0; font-size: 1rem; }
.lb { list-style: none; padding: 0; margin: 0; text-align: left; }
.lb li { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; font-size: 1.1rem; }
.lb li + li { margin-top: 4px; }
.lb li.me { background: #fff3b0; box-shadow: inset 0 0 0 3px var(--orange); font-weight: bold; }
.lb .rk { font-family: var(--font-fun); font-size: 1.3rem; text-align: center; }
.lb .who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lb .bar { height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--blue)); min-width: 6px; }
.lb li:nth-child(1) .bar { background: linear-gradient(90deg, #ffd23f, #ff9f43); }
.lb li:nth-child(2) .bar { background: linear-gradient(90deg, #cfd8e6, #9aa8bd); }
.lb li:nth-child(3) .bar { background: linear-gradient(90deg, #f0b27a, #c47a3a); }
.lb .pts { font-family: var(--font-fun); font-size: 1.2rem; }
.lb-gap { text-align: center; color: var(--ink-soft); padding: 2px; }
.notice-box { background: #fff3b0; border-radius: 16px; padding: 16px; font-size: 1.1rem; border: 3px dashed #e0a800; }

/* ---------- 표 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; }
.tbl th { text-align: left; background: #f1effa; padding: 10px; font-family: var(--font-fun); font-weight: 400; white-space: nowrap; }
.tbl th:first-child { border-radius: 10px 0 0 10px; }
.tbl th:last-child { border-radius: 0 10px 10px 0; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.best-row td { background: #fff8d6; font-weight: bold; }
.tbl tr.err td { background: #fff0f2; }
.tbl .num { text-align: right; white-space: nowrap; }
.cell-input {
  width: 100%; border: 2px solid transparent; background: transparent; border-radius: 8px; padding: 6px 8px; min-width: 80px;
}
.cell-input:hover { border-color: var(--line); background: #fff; }
.cell-input:focus { outline: none; border-color: var(--blue); background: #fff; }
.cell-input.bad { border-color: var(--red); background: #fff; }
.del-btn { border: 0; background: #ffe3e7; color: #c81d3a; width: 36px; height: 36px; border-radius: 10px; font-size: 1.1rem; }
.err-msg { color: #c81d3a; font-size: .92rem; }
.ok-msg { color: #13824f; }

/* ---------- 폼 ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-family: var(--font-fun); font-size: 1.1rem; margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; font-size: 1.05rem;
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(61,139,253,.15); }
textarea.input { min-height: 180px; resize: vertical; line-height: 1.5; }
.inline-num { width: 100px; display: inline-block; text-align: center; }
.help { font-size: .95rem; color: var(--ink-soft); line-height: 1.5; }
.form-msg { min-height: 1.4em; margin-top: 8px; font-size: 1rem; }

.names-box { display: flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.names-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(61,139,253,.15); }
.names-gutter {
  margin: 0; padding: 12px 8px; background: #f1effa; color: var(--ink-soft); text-align: right;
  font-size: 1rem; line-height: 1.6; overflow: hidden; user-select: none; min-width: 52px; white-space: pre;
  font-family: var(--font-body);
}
.names-ta {
  flex: 1; border: 0; outline: none; padding: 12px 14px; min-height: 320px; resize: vertical;
  font-size: 1rem; line-height: 1.6; white-space: pre; overflow-wrap: normal; overflow-x: auto; font-family: var(--font-body);
}

/* ---------- 대시보드 ---------- */
.chart { display: flex; flex-direction: column; gap: 8px; }
.chart .crow { display: grid; grid-template-columns: 48px minmax(90px, 160px) 1fr; align-items: center; gap: 10px; }
.chart .crk { font-family: var(--font-fun); font-size: 1.2rem; text-align: center; }
.chart .cname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: bold; }
.chart .cbar { height: 30px; border-radius: 10px; color: #fff; font-family: var(--font-fun); display: flex; align-items: center; justify-content: flex-end; padding: 0 10px; min-width: 52px; white-space: nowrap; transition: width .5s; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #f7f5ff; border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-family: var(--font-fun); font-size: 1.8rem; font-weight: 400; }

/* ---------- 모달 (항상 또렷한 대비) ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 1000; background: rgba(18, 18, 38, .62);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadein .15s;
}
.modal {
  background: #ffffff !important; color: #1b1d3a !important;
  border-radius: 22px; padding: 24px 22px 20px; width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); border: 4px solid #ffd23f;
  animation: pop .2s ease-out; max-height: calc(100dvh - 32px); overflow: auto;
}
.modal h2 { margin: 0 0 10px; font-size: 1.6rem; color: #1b1d3a !important; }
.modal p { margin: 0 0 14px; font-size: 1.1rem; line-height: 1.5; color: #2d3058 !important; }
.modal .input { background: #fff !important; color: #1b1d3a !important; border-color: #b9b5d6; font-size: 1.4rem; text-align: center; letter-spacing: .3em; }
.modal .modal-err { color: #c81d3a !important; background: #ffe8eb; border-radius: 10px; padding: 8px 12px; margin-top: 10px; font-size: 1rem; font-weight: bold; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.modal .modal-actions .btn { flex: 1 1 120px; }
.modal .btn.ghost { background: #eef0f6 !important; color: #1b1d3a !important; border-color: #cfd3e3; }

.toast {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 1100;
  background: #1b1d3a; color: #fff; padding: 12px 20px; border-radius: 14px; font-size: 1.05rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: toastin .25s ease-out; max-width: calc(100vw - 32px);
}
.toast.err { background: #c81d3a; }

.loading { text-align: center; padding: 40px; font-size: 1.3rem; font-family: var(--font-fun); color: var(--ink-soft); }
.loading::before { content: '⏳ '; }

/* ---------- 애니메이션 ---------- */
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.3); background: var(--green); } 100% { transform: scale(1); } }
@keyframes wiggle { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px) rotate(-3deg); } 40% { transform: translateX(8px) rotate(3deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
@keyframes screenshake { 0%,100% { transform: translate(0,0); } 15% { transform: translate(-10px, 4px); } 30% { transform: translate(9px,-5px); } 45% { transform: translate(-7px, 3px); } 60% { transform: translate(6px,-2px); } 80% { transform: translate(-3px,1px); } }
@keyframes hintshake { 0%,60%,100% { transform: rotate(0); } 70% { transform: rotate(-5deg) scale(1.04); } 80% { transform: rotate(5deg) scale(1.04); } 90% { transform: rotate(-3deg); } }
@keyframes floatup { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 20% { opacity: 1; transform: translate(-50%, -70%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
@keyframes bigfx { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-8deg); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(2deg); } 35% { transform: translate(-50%, -50%) scale(1) rotate(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1); } }
@keyframes confetti { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -12px); } }

@media (max-width: 600px) {
  .page { padding: 12px 12px 40px; }
  .panel { padding: 16px; }
  .num-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
  .num-btn { border-radius: 16px; }
  .topnav .brand { font-size: 1.15rem; }
  .btn { font-size: 1.05rem; padding: 10px 14px; }
  .gamebar .gtitle { font-size: .9rem; }
  .score-badge { font-size: 1.05rem; padding: 4px 10px; min-width: 56px; }
  .chip { font-size: .85rem; padding: 3px 8px; }
  .chart .crow { grid-template-columns: 40px 80px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
