.g-quizrace, .g-memoryrace, .g-drawguess { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 390px; margin: 0 auto; }
.g-drawguess [hidden] { display: none !important; }
.g-quizrace .qbar, .g-memoryrace .qbar, .g-drawguess .qbar { align-items: center; min-height: 32px; }
.g-quizrace .qbox { min-height: 140px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; text-align: center; }
.g-quizrace .qtext { font-size: 19px; line-height: 1.9; font-weight: 700; }
.g-quizrace .qans { min-height: 28px; font-size: 22px; font-weight: 800; color: var(--good); opacity: 0; transition: opacity .25s; }
.g-quizrace .qans.show { opacity: 1; }
.g-quizrace .qin, .g-drawguess .qin {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); outline: none;
}
.g-quizrace .qin:focus, .g-drawguess .qin:focus { border-color: var(--accent); box-shadow: var(--glow); }
.g-quizrace .qin:disabled, .g-drawguess .qin:disabled, .g-quizrace .btn:disabled, .g-drawguess .btn:disabled { opacity: .5; }
.g-quizrace .row .btn, .g-drawguess .row .btn { min-height: 46px; }

.lv-scores { display: flex; flex-direction: column; gap: 6px; }
.lv-sc { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-height: 40px; }
.lv-sc.me { border-color: var(--accent); box-shadow: var(--glow); }
.lv-sc .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-sc .tag { font-size: 12px; color: var(--sub); }
.lv-sc.ok .tag { color: var(--good); font-weight: 700; }
.lv-sc.dead { opacity: .5; }
.lv-sc b { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }

.g-memoryrace .mr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(100%, 340px); margin: 0 auto; aspect-ratio: 1; }
.g-memoryrace .mr-cell {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); cursor: pointer;
  transition: background .12s, box-shadow .12s, transform .12s; min-height: 64px; padding: 0;
}
.g-memoryrace .mr-cell:disabled { cursor: default; }
.g-memoryrace .mr-cell.lit { background: var(--accent); box-shadow: var(--glow); transform: scale(.94); border-color: var(--accent); }
.g-memoryrace .mr-dots { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; min-height: 14px; }
.g-memoryrace .mr-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.g-memoryrace .mr-dots i.on { background: var(--accent); }

.g-drawguess .dg-word { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: 2px; min-height: 36px; direction: rtl; }
.g-drawguess .dg-word small { font-size: 12px; font-weight: 400; color: var(--sub); letter-spacing: 0; }
.g-drawguess .dg-word .mask { letter-spacing: 6px; }
.g-drawguess .dg-stage { position: relative; width: 100%; aspect-ratio: 1; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.g-drawguess .dg-cv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.g-drawguess .dg-tools { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.g-drawguess .dg-pal { flex-wrap: nowrap; justify-content: space-between; }
.g-drawguess .dg-sw { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; flex: none; }
.g-drawguess .dg-sw.on { border-color: var(--accent); box-shadow: var(--glow); transform: scale(1.1); }
.g-drawguess .dg-w { width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.g-drawguess .dg-w i { display: block; border-radius: 50%; background: #111; }
.g-drawguess .dg-w.on { border-color: var(--accent); box-shadow: var(--glow); }
.g-drawguess .dg-feed { max-height: 130px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; font-size: 14px; }
.g-drawguess .dg-feed .fl.ok { color: var(--good); font-weight: 700; }
