/* Lingua Quest — vocab mini-games */
.vg-root { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 12px 14px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; animation: vg-slide .28s cubic-bezier(.3,1.4,.5,1); }
.vg-root::-webkit-scrollbar { display: none; }
@keyframes vg-slide { from { opacity: 0; transform: translateX(24px); } }
.vg-q { font-size: 15px; font-weight: 900; color: var(--text2); text-align: center; }
.vg-card { position: relative; width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 12px; border-radius: 24px; background: var(--cream); border: 3px solid #f0dcc0; box-shadow: 0 5px 0 #e6cfa8, 0 8px 16px rgba(90,60,30,.15); animation: vg-pop .3s cubic-bezier(.3,1.6,.5,1); flex: none; }
@keyframes vg-pop { from { transform: scale(.8); opacity: 0; } }
.vg-bigemo { font-size: 84px; line-height: 1.05; }
.vg-target { font-size: 44px; font-weight: 900; line-height: 1.15; color: var(--text); text-align: center; word-break: break-word; }
.vg-target.mid { font-size: 30px; }
.vg-sub { font-size: 16px; color: var(--teal); font-weight: 700; text-align: center; }
.vg-speak { width: 48px; height: 48px; min-width: 48px; border: 0; border-radius: 50%; font-size: 22px; cursor: pointer; background: radial-gradient(circle, #fffaf0 55%, #bfe8dc); box-shadow: 0 3px 0 #8fd3c3, 0 4px 8px rgba(0,0,0,.12); transition: transform .12s; }
.vg-speak:active { transform: scale(.9); }
.vg-opts { width: 100%; max-width: 360px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: none; }
.vg-opts.one { grid-template-columns: 1fr; }
.vg-opt { position: relative; min-height: 64px; min-width: 44px; padding: 8px 8px; border-radius: 18px; border: 3px solid #f0dcc0; background: var(--cream); box-shadow: 0 4px 0 #e6cfa8; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 22px; font-weight: 900; color: var(--text); transition: transform .12s, box-shadow .2s, background .2s; animation: vg-pop .3s cubic-bezier(.3,1.6,.5,1) backwards; }
.vg-opt:nth-child(2) { animation-delay: .04s; } .vg-opt:nth-child(3) { animation-delay: .08s; } .vg-opt:nth-child(4) { animation-delay: .12s; }
.vg-opt:hover { transform: translateY(-1px) scale(1.02); }
.vg-opt:active { transform: scale(.95); }
.vg-opt small { font-size: 14px; color: var(--teal); font-weight: 700; }
.vg-opt .vg-main { font-size: 24px; line-height: 1.15; word-break: break-word; }
.vg-opt .vg-emo { font-size: 44px; line-height: 1.1; }
.vg-opt .vg-mean { font-size: 17px; line-height: 1.2; }
.vg-opt .vg-k { position: absolute; left: 8px; top: 4px; font-size: 11px; color: var(--text2); opacity: .6; font-weight: 700; }
.vg-opt.lock { cursor: default; }
.vg-opt.good, .vg-opt.reveal { border-color: var(--teal); background: #eafaf5; box-shadow: 0 0 0 3px rgba(84,224,207,.45), 0 0 18px var(--ink-glow); animation: vg-glow .5s; }
.vg-opt.reveal { animation: vg-pulse .8s 2; }
.vg-opt.bad { border-color: var(--bad); background: #fdecec; animation: vg-shake .4s; }
@keyframes vg-glow { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes vg-pulse { 50% { transform: scale(1.05); } }
@keyframes vg-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-4px); } }
.vg-shake { animation: vg-shake .4s; }
.vg-spark { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; pointer-events: none; background: radial-gradient(circle, #fff 20%, var(--ink-glow) 60%, transparent 70%); border-radius: 50%; animation: vg-spark .65s ease-out forwards; z-index: 3; }
@keyframes vg-spark { to { transform: rotate(var(--a)) translateX(var(--d)) scale(.2); opacity: 0; } }
.vg-spark { transform: rotate(var(--a)) translateX(4px); }
.vg-hintline { min-height: 22px; font-size: 16px; font-weight: 700; color: var(--teal); text-align: center; }
.vg-note { font-size: 14px; color: var(--text2); text-align: center; }

/* listen */
.vg-play { display: flex; align-items: center; justify-content: center; gap: 18px; }
.vg-round { width: 96px; height: 96px; border: 0; border-radius: 50%; font-size: 44px; cursor: pointer; background: radial-gradient(circle at 35% 30%, #fff, #bfe8dc 60%, #8fd3c3); box-shadow: 0 5px 0 #6fbaa9, 0 0 20px rgba(84,224,207,.6); transition: transform .12s; }
.vg-round:active { transform: scale(.92); }
.vg-round.playing { animation: vg-pulse .6s infinite; }
.vg-slow { width: 56px; height: 56px; border: 0; border-radius: 50%; font-size: 26px; cursor: pointer; background: radial-gradient(circle, #fffaf0 55%, #fbd9bd); box-shadow: 0 3px 0 #e8a679; }
.vg-hintbtn { min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 22px; border: 2px solid #f0dcc0; background: #fffaf0; font-weight: 900; font-size: 15px; cursor: pointer; }
.vg-hintbtn[disabled] { opacity: .45; }

/* flip */
.vg-top { width: 100%; max-width: 360px; display: flex; justify-content: space-between; align-items: center; font-weight: 900; font-size: 16px; flex: none; }
.vg-fgrid { width: 100%; max-width: 360px; flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(72px, 112px); align-content: center; gap: 8px; }
.vg-fc { perspective: 700px; border: 0; padding: 0; background: none; min-width: 72px; min-height: 72px; cursor: pointer; animation: vg-pop .3s cubic-bezier(.3,1.6,.5,1) backwards; }
.vg-fci { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3,1.3,.5,1); }
.vg-fc.up .vg-fci { transform: rotateY(180deg); }
.vg-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; overflow: hidden; text-align: center; }
.vg-back { background: repeating-linear-gradient(45deg, #fbd9bd 0 8px, #f9cba4 8px 16px); border: 3px solid var(--apricot); box-shadow: 0 4px 0 var(--apricot2); font-size: 30px; }
.vg-back::after { content: ""; position: absolute; inset: 6px; border: 2px dashed rgba(255,255,255,.85); border-radius: 11px; }
.vg-front { transform: rotateY(180deg); background: var(--cream); border: 3px solid #f0dcc0; box-shadow: 0 4px 0 #e6cfa8; font-size: 26px; font-weight: 900; line-height: 1.15; word-break: break-word; }
.vg-front.emo { font-size: 42px; }
.vg-front.sm { font-size: 18px; }
.vg-front small { font-size: 12px; color: var(--teal); }
.vg-fc.done .vg-front { border-color: var(--teal); background: #eafaf5; box-shadow: 0 0 0 3px rgba(84,224,207,.45), 0 0 16px var(--ink-glow); }
.vg-fc.done { cursor: default; }

/* dictation */
.vg-ans { width: 100%; max-width: 360px; min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 18px; border: 3px dashed var(--mint2); background: rgba(255,250,240,.9); cursor: pointer; font-size: 28px; font-weight: 900; flex: none; }
.vg-ans:empty::before, .vg-ans .ph { content: attr(data-ph); font-size: 14px; color: var(--text2); font-weight: 700; }
.vg-ans.good { border-style: solid; border-color: var(--teal); box-shadow: 0 0 16px var(--ink-glow); background: #eafaf5; }
.vg-chip { min-width: 40px; padding: 2px 8px; border-radius: 12px; background: var(--mint); text-align: center; animation: vg-pop .2s; }
.vg-tiles { width: 100%; max-width: 360px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; flex: none; }
.vg-tile { min-width: 48px; min-height: 52px; padding: 0 12px; border-radius: 14px; border: 3px solid #f0dcc0; background: var(--cream); box-shadow: 0 4px 0 #e6cfa8; font-size: 24px; font-weight: 900; cursor: pointer; transition: transform .12s, opacity .2s; }
.vg-tile:active { transform: scale(.92); }
.vg-tile.used { opacity: .2; pointer-events: none; }
.vg-ctrls { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; flex: none; }
.vg-input { width: 100%; max-width: 360px; height: 56px; padding: 0 16px; border-radius: 18px; border: 3px solid var(--mint2); background: var(--cream); color: var(--text); font-family: var(--font); font-size: 20px; font-weight: 700; outline: none; box-shadow: inset 0 2px 4px rgba(90,60,30,.1); text-align: center; -webkit-appearance: none; appearance: none; user-select: text; -webkit-user-select: text; }
.vg-input:focus { border-color: var(--teal); box-shadow: 0 0 12px var(--ink-glow); }

/* timed */
.vg-hud { width: 100%; max-width: 360px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; }
.vg-ring { position: relative; width: 96px; height: 96px; flex: none; }
.vg-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.vg-ring .bg { fill: var(--cream); stroke: #eadfcd; stroke-width: 9; }
.vg-ring .fg { fill: none; stroke: var(--teal); stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--ink-glow)); transition: stroke .3s; }
.vg-ring.low .fg { stroke: var(--bad); }
.vg-ring.low { animation: vg-pulse .5s infinite; }
.vg-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 900; }
.vg-stat { flex: 1; display: flex; flex-direction: column; align-items: center; font-weight: 900; font-size: 15px; color: var(--text2); }
.vg-stat b { font-size: 30px; color: var(--text); }
.vg-stat.combo b { color: var(--apricot2); }
.vg-float { position: absolute; top: 4px; right: 12px; font-size: 22px; font-weight: 900; color: var(--apricot2); text-shadow: 0 2px 0 #fff; animation: vg-float .8s ease-out forwards; pointer-events: none; z-index: 4; }
@keyframes vg-float { from { transform: translateY(8px) scale(.6); opacity: 0; } 30% { opacity: 1; transform: scale(1.2); } to { transform: translateY(-26px); opacity: 0; } }
.vg-card.flash-good { border-color: var(--teal); box-shadow: 0 0 20px var(--ink-glow); }
.vg-card.flash-bad { border-color: var(--bad); animation: vg-shake .35s; }
.vg-over { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(255,248,236,.85); z-index: 10; animation: vg-over .4s cubic-bezier(.3,1.7,.5,1); }
.vg-over b { font-size: 56px; color: var(--teal); text-shadow: 0 3px 0 #fff, 0 0 16px var(--ink-glow); }
.vg-over span { font-size: 20px; font-weight: 900; color: var(--text2); }
@keyframes vg-over { from { transform: scale(2); opacity: 0; } }
@media (max-height: 660px) { .vg-bigemo { font-size: 64px; } .vg-target { font-size: 38px; } .vg-round { width: 80px; height: 80px; font-size: 36px; } .vg-ring { width: 80px; height: 80px; } .vg-opt { min-height: 56px; } }
