/* Плагін games2 — «Ігровий майданчик» Бобрового містечка */
.g2-hub { --g2-r: var(--r, 22px); font-family: var(--font-round, inherit); }
.g2-hub b, .g2-play b { font-weight: 800; }

/* ---------- Банер ---------- */
.g2-banner { position: relative; display: flex; align-items: center; gap: 12px; padding: 22px 24px; border-radius: var(--g2-r); overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--glass-bg)), var(--glass-bg));
  box-shadow: var(--glass-edge), var(--glass-shadow); }
.g2-banner-txt { position: relative; z-index: 1; flex: 1; min-width: 0; }
.g2-banner .page-title { margin: 0 0 6px; }
.g2-banner .page-sub { margin: 0 0 12px; max-width: 460px; }
.g2-banner-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.g2-banner-stats span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 99px; background: var(--fill); font-size: 13px; font-weight: 700; color: var(--label2); }
.g2-banner-stats svg { width: 14px; height: 14px; color: var(--accent); }
.g2-banner-art { position: relative; width: 210px; height: 120px; flex: none; }
.g2-banner-art svg { position: absolute; }
.g2-banner-art .g2-deco-b { width: 120px; right: 34px; bottom: -8px; }
.g2-banner-art .g2-deco-t { width: 70px; right: -6px; bottom: -6px; }
.g2-banner-art .g2-deco-cloud { width: 80px; left: 0; top: -6px; opacity: .9; animation: g2drift 9s ease-in-out infinite; }
@keyframes g2drift { 50% { transform: translateX(14px); } }

/* ---------- Незавершена гра / гра дня ---------- */
.g2-resume { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 18px;
  background: var(--glass-bg); box-shadow: var(--glass-edge), var(--glass-shadow); }
.g2-resume > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.g2-resume small { color: var(--label2); }
.g2-resume .btn { height: 42px; padding: 0 16px; }
.g2-daily { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 16px 18px; border-radius: var(--g2-r);
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 26%, var(--glass-bg)), var(--glass-bg) 70%);
  box-shadow: var(--glass-edge), 0 0 0 2px color-mix(in srgb, var(--c) 40%, transparent), var(--glass-shadow); }
.g2-daily-art { width: 108px; flex: none; animation: g2bob 3.2s ease-in-out infinite; }
.g2-daily-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.g2-daily-txt b { font-size: 21px; }
.g2-daily-txt small { color: var(--label2); font-size: 14px; }
.g2-daily-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; }
.g2-daily-tag svg { width: 13px; height: 13px; }
.g2-daily-btn { background: var(--c); flex: none; }
@keyframes g2bob { 50% { transform: translateY(-5px) rotate(-1.5deg); } }

/* ---------- Категорії ---------- */
.g2-cats { display: flex; gap: 8px; margin: 18px 0 14px; overflow-x: auto; width: 0; min-width: 100%; padding: 2px 2px 6px; scrollbar-width: none; }
.g2-cats::-webkit-scrollbar { display: none; }
.g2-catbtn { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--glass-bg); box-shadow: var(--glass-edge); font-size: 15px; font-weight: 700; color: var(--label2); transition: transform .2s var(--ease), background .2s; }
.g2-catbtn small { opacity: .6; margin-left: 2px; }
.g2-catbtn:active { transform: scale(.95); }
.g2-catbtn.on { background: var(--cc, var(--accent)); color: #fff; box-shadow: none; }

/* ---------- Сітка карток ---------- */
.g2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 14px; padding-bottom: 24px; }
.g2-card-game { display: flex; flex-direction: column; border-radius: var(--g2-r); overflow: hidden; cursor: pointer;
  background: var(--glass-bg); box-shadow: var(--glass-edge), var(--glass-shadow); transition: transform .25s var(--ease); animation: g2in .4s var(--ease) backwards; }
.g2-card-game:nth-child(2) { animation-delay: .03s; } .g2-card-game:nth-child(3) { animation-delay: .06s; } .g2-card-game:nth-child(4) { animation-delay: .09s; }
.g2-card-game:nth-child(n+5) { animation-delay: .12s; }
.g2-card-game:hover { transform: translateY(-3px); }
.g2-card-game:active { transform: scale(.98); }
.g2-card-game.locked { opacity: .62; }
.g2-card-art { position: relative; padding: 12px 14px 4px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, transparent), transparent); }
.g2-card-art .g2-art { width: 100%; height: 92px; display: block; transition: transform .35s var(--ease); }
.g2-card-game:hover .g2-art { transform: scale(1.05) rotate(-1deg); }
.g2-x2 { position: absolute; top: 10px; right: 10px; padding: 2px 9px; border-radius: 99px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 2px 8px rgba(255,149,0,.4); }
.g2-card-body { display: flex; flex-direction: column; gap: 3px; padding: 6px 14px 14px; flex: 1; }
.g2-card-body > b { font-size: 17px; }
.g2-card-body > small { color: var(--label2); font-size: 13px; line-height: 1.35; flex: 1; }
.g2-cat { align-self: flex-start; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--cc); }
.g2-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.g2-best { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--label2); }
.g2-best svg { width: 14px; height: 14px; color: var(--orange); }
.g2-play-btn { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 13px; border-radius: 99px; background: var(--c); color: #fff; font-size: 14px; font-weight: 800; transition: transform .2s var(--ease); }
.g2-play-btn svg { width: 13px; height: 13px; }
.g2-play-btn:active { transform: scale(.93); }
.g2-play-btn[disabled] { background: var(--fill); color: var(--label3); }
@keyframes g2in { from { opacity: 0; transform: translateY(14px) scale(.97); } }

.g2-art.xs { width: 34px; height: 26px; flex: none; vertical-align: middle; }
.g2-art.sm { width: 64px; height: 48px; flex: none; }
.g2-art.lg { width: 220px; max-width: 70%; height: auto; }

/* ---------- Ігровий екран ---------- */
.g2-play { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg2); font-family: var(--font-round, inherit); position: relative; overflow-x: clip; }
.g2-top { gap: 10px; }
.g2-ttl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; }
.g2-ttl span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g2-pausebtn svg { width: 14px; height: 14px; }
.g2-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 99px; background: var(--fill); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.g2-chip svg { width: 14px; height: 14px; color: var(--label2); }
.g2-scorechip { background: color-mix(in srgb, var(--yellow) 22%, transparent); }
.g2-star { color: var(--orange); }
.g2-combo { display: inline-flex; align-items: center; gap: 3px; color: var(--orange); font-weight: 800; font-size: 14px; animation: pop .3s var(--ease); }
.g2-combo svg { width: 15px; height: 15px; }
.g2-tbar { height: 6px; background: var(--fill); margin: 0 max(20px, calc(50% - 480px)); border-radius: 99px; overflow: hidden; }
.g2-tbar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #5ac8fa)); transition: background .3s; }
.g2-tbar > i.low { background: var(--red); animation: g2pulse .8s ease-in-out infinite; }
@keyframes g2pulse { 50% { opacity: .55; } }
.g2-body { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 14px 18px calc(40px + env(safe-area-inset-bottom)); }
.g2-stage { animation: fadeIn .3s var(--ease); }
.g2-stage.blur { filter: blur(14px); pointer-events: none; user-select: none; }
.g2-shake { animation: g2shake .42s; }
@keyframes g2shake { 15%, 55% { transform: translateX(-8px); } 35%, 75% { transform: translateX(8px); } 90% { transform: translateX(-2px); } }
.g2-sub { color: var(--label2); text-align: center; margin: 4px 0 12px; font-size: 15px; }
.g2-muted { color: var(--label3); font-size: 14px; }
.g2-row-c { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 18px; }
.g2-key { width: 22px; height: 22px; border-radius: 7px; background: var(--fill); color: var(--label2); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.g2-emoji { font-size: 64px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0,0,0,.12)); }
.g2-emoji.sm { font-size: 26px; vertical-align: middle; }

/* Відлік */
.g2-count { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.g2-count-n { font-size: 120px; font-weight: 900; color: var(--accent); line-height: 1; animation: g2count .9s var(--ease); text-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.g2-count-n[data-n="0"], .g2-count-n[data-n="-0"] { font-size: 64px; color: var(--green); }
.g2-count small { color: var(--label2); font-size: 17px; font-weight: 700; }
@keyframes g2count { 0% { transform: scale(2.2); opacity: 0; } 30% { transform: scale(.9); opacity: 1; } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* Пауза */
.g2-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.28); animation: fadeIn .2s; }
.g2-pause { width: min(360px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 24px 22px; border-radius: 26px; text-align: center;
  background: var(--glass-strong, var(--bg2)); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--glass-edge), var(--shadow-lg); animation: pop .35s var(--ease); }
.g2-pause h2 { margin: 0; font-size: 28px; }
.g2-pause .g2-sub { margin: 0 0 6px; }

/* Інтро */
.g2-intro { width: 100%; max-width: 560px; margin: 12px auto 40px; padding: 22px 22px 24px; border-radius: 28px; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 18%, var(--glass-bg)), var(--glass-bg) 55%); box-shadow: var(--glass-edge), var(--glass-shadow); animation: g2in .45s var(--ease); }
.g2-intro-wrap { background: var(--bg); }
.g2-intro-art { position: relative; display: flex; justify-content: center; }
.g2-intro-art .g2-art { animation: g2bob 3.2s ease-in-out infinite; }
.g2-intro-art .g2-x2 { top: 0; right: 0; }
.g2-intro h1 { margin: 8px 0 2px; font-size: 30px; }
.g2-rules { text-align: left; margin: 10px 0 8px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.g2-rules li { position: relative; padding: 10px 12px 10px 38px; border-radius: 14px; background: var(--fill); font-size: 15px; line-height: 1.35; }
.g2-rules li::before { content: counter(list-item); position: absolute; left: 10px; top: 9px; width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.g2-controls { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--label2); font-size: 14px; margin: 10px 0; }
.g2-controls svg { width: 16px; height: 16px; flex: none; }
.g2-note { margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--label); font-size: 14px; }
.g2-note.bad { background: var(--red-tint); color: var(--red); font-weight: 700; }
.g2-intro-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 18px; }
.g2-intro-stats span { display: flex; flex-direction: column; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--bg2); box-shadow: 0 0 0 1px var(--sep); }
.g2-intro-stats small { color: var(--label2); font-size: 12px; font-weight: 700; }
.g2-intro-stats b { font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.g2-intro-stats svg { width: 14px; height: 14px; color: #e8a24a; }
.g2-intro-btns { display: flex; gap: 10px; justify-content: center; }
.g2-intro-btns .btn { flex: 1; max-width: 220px; }

/* Результат */
.g2-result .page-sub { display: inline-flex; align-items: center; gap: 6px; }
.g2-x2-inline { color: var(--orange); }
.g2-acc { margin-top: 16px; }
.g2-result .rbox { width: 140px; }

/* ---------- Спільні елементи ігор ---------- */
.g2-qcard { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 18px 0 22px; animation: g2in .25s var(--ease); }
.g2-qcard b { font-size: 30px; text-align: center; }
.g2-qcard.sm { margin: 8px 0 16px; }
.g2-qcard.sm .g2-emoji { font-size: 52px; }
.g2-qcard.sm b { font-size: 24px; }
.g2-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g2-opt { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 12px 14px; border-radius: 18px; text-align: left;
  background: var(--glass-bg); box-shadow: var(--glass-edge), 0 0 0 1px var(--sep), 0 2px 0 var(--sep); font-size: 18px; font-weight: 700; transition: transform .15s var(--ease), background .2s; animation: g2in .25s var(--ease) backwards; }
.g2-opt:nth-child(2) { animation-delay: .03s; } .g2-opt:nth-child(3) { animation-delay: .06s; } .g2-opt:nth-child(4) { animation-delay: .09s; }
.g2-opt:active { transform: scale(.95); }
.g2-opt-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.g2-opt.ok, .g2-pic.ok { background: var(--green-tint); color: var(--green); box-shadow: 0 0 0 2.5px var(--green); animation: springSel .4s var(--ease); }
.g2-opt.bad, .g2-pic.bad { background: var(--red-tint); color: var(--red); box-shadow: 0 0 0 2.5px var(--red); }
.g2-opt.dim, .g2-pic.dim { opacity: .45; }
.g2-opt.off { opacity: .5; }
.g2-opts.four .g2-opt { justify-content: center; font-size: 26px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.g2-opts.four .g2-opt-t { flex: 0 1 auto; }
.g2-hintline { text-align: center; color: var(--label3); font-size: 13px; margin: 8px 0 0; }

/* Частинки та спливаючі числа */
.g2-burst { position: fixed; z-index: 90; pointer-events: none; width: 0; height: 0; }
.g2-burst i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; animation: g2burst .7s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes g2burst { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.g2-float { position: fixed; z-index: 91; pointer-events: none; transform: translate(-50%, -50%); font-weight: 900; font-size: 24px; color: var(--green); text-shadow: 0 2px 0 var(--bg2), 0 0 12px var(--bg2); animation: g2float .9s var(--ease) forwards; font-family: var(--font-round, inherit); }
.g2-float.bad { color: var(--red); }
.g2-float.time { color: var(--accent); }
.g2-float.pill { display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: #fff; color: #3b2f2a; text-shadow: none; box-shadow: 0 0 0 2px #3b2f2a;
  font: 800 20px/1.1 var(--font-round, inherit); white-space: nowrap; animation: g2pill .9s cubic-bezier(.2,.8,.3,1) forwards; }
.g2-float.pill.bonus { background: #ffd23f; }
.g2-float.pill.info { background: #fff4e0; }
.g2-fl-star { color: #ff9500; font-size: 18px; line-height: 1; }
.g2-fl-spark { width: 16px; height: 16px; flex: none; }
.g2-fl-i { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #8fd0ef; font: 800 12px/18px var(--font-round, inherit); font-style: normal; text-align: center; color: #3b2f2a; }
@keyframes g2pill { 0% { opacity: 0; transform: translate(-50%, -50%); } 20%, 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, calc(-50% - 48px)); } }
@keyframes g2pillstill { 0%, 85% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -50%); } }
@media (min-width: 768px) { .g2-float.pill { font-size: 24px; } }
@keyframes g2float { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 25% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }

/* ---------- Пам'ять ---------- */
.g2-mem { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 10px; perspective: 900px; }
.g2-card { aspect-ratio: 3 / 3.4; padding: 0; border-radius: 16px; background: none; }
.g2-card-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3,1.4,.5,1); }
.g2-card.up .g2-card-in { transform: rotateY(180deg); }
.g2-card-back, .g2-card-front { position: absolute; inset: 0; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; -webkit-backface-visibility: hidden; backface-visibility: hidden; padding: 4px; }
.g2-card-back { background: linear-gradient(135deg, #8f7bff, #6a55ff); color: rgba(255,255,255,.85); box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), 0 3px 0 rgba(60,40,160,.35); }
.g2-card-back svg { width: 40%; height: 40%; }
.g2-card-front { transform: rotateY(180deg); background: var(--bg2); box-shadow: 0 0 0 2px #8f7bff inset; text-align: center; }
.g2-card-front b { font-size: clamp(13px, 3.6vw, 18px); overflow-wrap: anywhere; color: #6a55ff; }
.g2-card-em { font-size: clamp(22px, 7vw, 34px); line-height: 1; }
.g2-card-front small { font-size: clamp(10px, 2.8vw, 13px); color: var(--label2); line-height: 1.1; overflow-wrap: anywhere; }
.g2-card.done .g2-card-front { box-shadow: 0 0 0 2.5px var(--green) inset; background: var(--green-tint); animation: matchPulse .45s var(--ease); }
.g2-card.done { pointer-events: none; }
.g2-card:not(.up):hover .g2-card-in { transform: rotateY(-14deg); }

/* ---------- Збери слово ---------- */
.g2-slots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 4px 0 22px; }
.g2-slot { width: 42px; height: 50px; border-radius: 12px; background: var(--fill); box-shadow: inset 0 -3px 0 var(--sep); font-size: 24px; font-weight: 800; font-family: ui-monospace, "SF Mono", Menlo, monospace; display: grid; place-items: center; }
.g2-slot.fill { background: var(--bg2); box-shadow: 0 0 0 2px var(--green), 0 3px 0 color-mix(in srgb, var(--green) 50%, transparent); color: var(--label); animation: slotIn .25s var(--ease); }
.g2-slot.hint { box-shadow: 0 0 0 2px var(--orange); color: var(--orange); }
.g2-tiles { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.g2-tile { width: 50px; height: 56px; border-radius: 14px; background: #fff4e0; color: #3b2f2a; box-shadow: 0 0 0 2px #3b2f2a, 0 4px 0 #3b2f2a; font-size: 26px; font-weight: 800; font-family: ui-monospace, "SF Mono", Menlo, monospace; touch-action: none; transition: transform .15s var(--ease), opacity .2s; animation: chipIn .3s var(--ease) backwards; }
.g2-tile:active { transform: translateY(3px); box-shadow: 0 0 0 2px #3b2f2a, 0 1px 0 #3b2f2a; }
.g2-tile.used { opacity: .18; pointer-events: none; animation: none; }
.g2-tile.lift { opacity: .3; }
.g2-ghost { position: fixed; z-index: 95; pointer-events: none; transform: translate(-50%, -60%) rotate(-6deg) scale(1.12); }
.g2-hint { height: 42px; font-size: 15px; }
.g2-hint svg { width: 16px; height: 16px; }

/* ---------- Спільні сцени аркадних ігор (catch, train, knight, chain) ---------- */
.g2-scene { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; --fox-w: 56px; --aw: 34px; font-family: var(--font-round, inherit); }
.g2-scene::after { content: ""; position: absolute; inset: 0; z-index: 5; border-radius: inherit; box-shadow: inset 0 0 0 2px #3b2f2a; pointer-events: none; }
@media (min-width: 768px) { .g2-scene { --fox-w: 72px; --aw: 40px; } }
@media (min-width: 1100px) { .g2-scene { --fox-w: 88px; } }
.g2-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.g2-bg > * { position: absolute; }
.g2-bgart { height: auto; }
.g2-fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.g2-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.g2-play[data-g2-game="catch"] .g2-stage, .g2-play[data-g2-game="train"] .g2-stage, .g2-play[data-g2-game="knight"] .g2-stage, .g2-play[data-g2-game="chain"] .g2-stage { animation: none; }

/* Бобро на сцені: настрій normal/happy; реакції — за data-react (повернення в normal робить JS) */
.g2-fox { position: absolute; z-index: 3; width: var(--fox-w); pointer-events: none; }
.g2-fox svg { display: block; width: 100%; height: auto; overflow: visible; }
.g2-fox[data-react="ok"] svg { animation: hop .6s var(--ease) var(--ago, 0ms) both; }
.g2-fox[data-react="bonus"] svg { animation: g2hopb .6s var(--ease) var(--ago, 0ms) both; }
.g2-fox[data-react="hint"] .fox .m-head { animation: g2tilt .6s ease-out var(--ago, 0ms) both; }
.g2-fox[data-react="nod"] .fox .m-head { animation: g2nod .25s ease-out var(--ago, 0ms) both; }
.g2-fox[data-look="l"] .m-eyes { translate: -3px 0; }
.g2-fox[data-look="r"] .m-eyes { translate: 3px 0; }
@keyframes g2hopb { 30% { transform: translateY(-20px) scale(1.15, 1.1); } 55% { transform: translateY(0) scale(1.08, .94); } 75% { transform: translateY(-5px); } }
@keyframes g2tilt { 0% { transform: rotate(0); } 35%, 70% { transform: rotate(-8deg); } 100% { transform: rotate(0); } }
@keyframes g2nod { 50% { transform: translateY(3px); } }

/* Стрічка події */
.g2-flag { position: absolute; z-index: 4; top: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px 0 14px; max-width: calc(100% - 24px);
  border-radius: 12px; background: #fff4e0; color: #3b2f2a; box-shadow: 0 0 0 2px #3b2f2a, 0 3px 0 #3b2f2a; font: 800 16px/40px var(--font-round, inherit); white-space: nowrap;
  animation: g2flagin .25s var(--ease) both, g2flagout .2s linear forwards; }
.g2-flag > svg { width: 24px; height: 24px; flex: none; }
.g2-flag > span { overflow: hidden; text-overflow: ellipsis; }
.g2-flag.bonus { background: #ffd23f; }
.g2-flag-em { font-size: 22px; line-height: 1; }
@keyframes g2flagin { from { opacity: 0; translate: 0 -16px; } to { opacity: 1; translate: 0 0; } }
@keyframes g2flagout { to { opacity: 0; } }
@keyframes g2opin { from { opacity: 0; } to { opacity: 1; } }

/* Бульбашка Бобра */
.g2-say { position: absolute; z-index: 4; max-width: 70%; padding: 8px 12px; border-radius: 14px; background: #fff; color: #3b2f2a; box-shadow: 0 0 0 2px #3b2f2a; font: 700 16px/1.2 var(--font-round, inherit);
  animation: g2sayin .25s var(--ease) both, g2sayout .3s ease-in forwards; }
.g2-say::after { content: ""; position: absolute; width: 11px; height: 11px; background: #fff; transform: rotate(45deg); }
.g2-say[data-at="catch"] { bottom: 45%; transform: translateX(-50%); }
.g2-say[data-at="catch"]::after, .g2-say[data-at="train"]::after { bottom: -7px; left: calc(50% - 5px); border-right: 2px solid #3b2f2a; border-bottom: 2px solid #3b2f2a; }
.g2-say[data-at="train"] { left: 3%; top: 17%; }
.g2-say[data-at="train"]::after { left: 22px; }
.g2-say[data-at="knight"] { left: calc(var(--fox-w) + 22px); top: 12px; }
.g2-say[data-at="knight"]::after { left: -7px; top: calc(50% - 5px); border-left: 2px solid #3b2f2a; border-bottom: 2px solid #3b2f2a; }
.g2-say[data-at="chain-in"] { right: 60px; top: 50%; margin-top: -18px; white-space: nowrap; }
.g2-say[data-at="chain-in"]::after { right: -7px; top: calc(50% - 5px); border-right: 2px solid #3b2f2a; border-top: 2px solid #3b2f2a; }
@keyframes g2sayin { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes g2sayout { to { opacity: 0; } }
@media (min-width: 768px) { .g2-flag { font-size: 18px; } .g2-say { font-size: 18px; } }
@media (min-width: 1100px) { .g2-say[data-at="knight"] { left: calc(var(--fox-w) + 22px); } }

/* Підказка: пунктирна рамка + лампочка (форма, не лише колір) */
.g2-hint-ring { position: absolute; inset: -4px; z-index: 2; border: 3px dashed #3b2f2a; border-radius: inherit; box-shadow: 0 0 0 3px #ffd23f; pointer-events: none; animation: g2ring 1.2s ease-in-out infinite; }
.g2-hint-ring::after { content: "!"; position: absolute; top: -14px; right: -14px; width: 22px; height: 22px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 0 2px #3b2f2a; color: #3b2f2a; font: 800 14px/22px var(--font-round, inherit); text-align: center; }
@keyframes g2ring { 50% { transform: scale(1.06); } }

/* ---------- Жолуді з неба ---------- */
.g2-prompt { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 6px 14px; min-height: 44px; border-radius: 16px; background: var(--glass-bg); box-shadow: var(--glass-edge), var(--glass-shadow); font-size: 17px; animation: g2in .3s var(--ease); }
.g2-prompt b { font-size: 22px; color: var(--accent); }
.g2-sky { height: clamp(330px, calc(100dvh - 230px), 520px); margin-top: 10px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: ew-resize;
  background: linear-gradient(180deg, #8fd3ff 0%, #c9ecff 70%, #e6f7d8 100%); }
.g2-hills { left: 0; right: 0; bottom: 0; width: 100%; height: 36%; }
.g2-grass { left: 0; right: 0; bottom: 0; width: 100%; height: 12%; }
.g2-bgart.t1 { left: -4%; bottom: 6%; width: 22%; }
.g2-bgart.t2 { right: -3%; bottom: 6%; width: 18%; }
.g2-bgart.b1 { left: 24%; bottom: 7%; width: 20%; }
.g2-bgart.b2 { display: none; }
.g2-bgart.c1 { left: 8%; top: 6%; width: 22%; opacity: .9; animation: g2cloud 60s linear infinite; }
.g2-bgart.c2 { left: 58%; top: 14%; width: 16%; opacity: .9; animation: g2cloud 90s linear infinite; display: none; }
@keyframes g2cloud { to { transform: translateX(70%); } }
@media (min-width: 701px) { .g2-bgart.b2 { display: block; left: 42%; bottom: 7%; width: 15%; } .g2-bgart.c2 { display: block; } .g2-bgart.b1 { left: 22%; width: 17%; } }
.g2-stars { inset: 0; display: none; }
.g2-acorn { position: absolute; z-index: 2; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; will-change: top; }
.g2-acorn svg { width: var(--aw); height: auto; filter: drop-shadow(0 3px 2px rgba(0,0,0,.15)); overflow: visible; }
.g2-acorn span { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; margin-top: -2px; padding: 3px 10px; border-radius: 99px; background: #fff; color: #3b2f2a; font-size: 16px; font-weight: 800; white-space: nowrap; box-shadow: 0 0 0 2px #3b2f2a; }
.g2-acorn span .g2-sp { width: 14px; height: 14px; filter: none; flex: none; }
.g2-acorn.gold svg { width: calc(var(--aw) * 1.33 * 1.15); }
.g2-acorn.gold span { background: #fff3c4; }
.g2-acorn .g2-rays { animation: g2rays 1s ease-in-out infinite; }
@keyframes g2rays { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.g2-acorn.glow::before { content: ""; position: absolute; left: 50%; top: 8px; width: 60px; height: 60px; margin-left: -30px; border-radius: 50%; background: #fff; opacity: .55; z-index: -1; }
@media (min-width: 768px) { .g2-acorn span { font-size: 18px; } }
.g2-sky .g2-fox { z-index: 1; width: min(30%, 130px); bottom: 7%; transform: translateX(-50%); }
.g2-basket { position: absolute; bottom: 7%; width: 26%; max-width: 130px; transform: translateX(-50%); pointer-events: none; z-index: 3; }
.g2-basket svg { width: 100%; display: block; overflow: visible; }

/* ---------- Слухай і лови ---------- */
.g2-listen { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 8px 0 10px; }
.g2-speaker { width: 96px; height: 96px; border-radius: 50%; background: #ff4f8b; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 0 #c22e66, 0 10px 30px rgba(255,79,139,.4); transition: transform .15s var(--ease); animation: g2ring 2s ease-out infinite; }
.g2-speaker svg { width: 44px; height: 44px; }
.g2-speaker:active { transform: translateY(4px); box-shadow: 0 2px 0 #c22e66; }
@keyframes g2ring { 0% { box-shadow: 0 6px 0 #c22e66, 0 0 0 0 rgba(255,79,139,.45); } 70%, 100% { box-shadow: 0 6px 0 #c22e66, 0 0 0 22px rgba(255,79,139,0); } }
.g2-word-txt { font-size: 30px; font-weight: 800; margin: 8px 0 0; }
.g2-rbar { height: 8px; border-radius: 99px; background: var(--fill); overflow: hidden; margin: 6px 0 16px; }
.g2-rbar > i { display: block; height: 100%; background: #ff4f8b; border-radius: 99px; }
.g2-rbar > i.low { background: var(--red); }
.g2-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g2-pics.many { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.g2-pic { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 10px 6px; border-radius: 20px;
  background: var(--glass-bg); box-shadow: var(--glass-edge), 0 0 0 1px var(--sep), 0 3px 0 var(--sep); transition: transform .15s var(--ease); animation: g2in .25s var(--ease) backwards; }
.g2-pic:active { transform: scale(.95); }
.g2-pic .g2-key { position: absolute; top: 8px; left: 8px; }
.g2-pic-em { font-size: 54px; line-height: 1; }
.g2-pic small { font-size: 13px; font-weight: 700; color: inherit; text-align: center; overflow-wrap: anywhere; }
.g2-pics.many .g2-pic { min-height: 86px; border-radius: 16px; }
.g2-pics.many .g2-pic-em { font-size: 34px; }
.g2-pics.many .g2-pic small { font-size: 11px; }
.g2-pics.many .g2-key { width: 18px; height: 18px; font-size: 10px; top: 5px; left: 5px; }

/* ---------- Правда чи ні ---------- */
.g2-tf { position: relative; height: 270px; display: grid; place-items: center; margin: 10px 0 18px; }
.g2-tf-card { position: relative; width: min(320px, 92%); height: 240px; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
  background: var(--glass-strong, var(--bg2)); box-shadow: var(--glass-edge), var(--glass-shadow), 0 0 0 1px var(--sep); animation: g2cardIn .3s var(--ease); transition: box-shadow .2s; }
.g2-tf-card.to-r { box-shadow: var(--glass-edge), 0 0 0 3px var(--green), var(--glass-shadow); }
.g2-tf-card.to-l { box-shadow: var(--glass-edge), 0 0 0 3px var(--red), var(--glass-shadow); }
@keyframes g2cardIn { from { transform: translateY(26px) scale(.9); opacity: 0; } }
.g2-tf-en { font-size: 34px; font-weight: 800; }
.g2-tf-eq { color: var(--label3); font-weight: 800; font-size: 22px; }
.g2-tf-uk { font-size: 26px; font-weight: 700; color: var(--accent); text-align: center; padding: 0 12px; }
.g2-tf-tag { position: absolute; top: 16px; padding: 3px 10px; border-radius: 8px; font-size: 14px; font-weight: 900; opacity: 0; transition: opacity .15s; }
.g2-tf-tag.l { left: 16px; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); transform: rotate(-12deg); }
.g2-tf-tag.r { right: 16px; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); transform: rotate(12deg); }
.g2-tf-card.to-l .g2-tf-tag.l, .g2-tf-card.to-r .g2-tf-tag.r { opacity: 1; }
.g2-tf-ghost { position: absolute; width: 200px; height: 200px; border-radius: 26px; display: grid; place-items: center; font-size: 70px; font-weight: 900; color: #fff; pointer-events: none; animation: g2flyR .45s ease-in forwards; }
.g2-tf-ghost.l { animation-name: g2flyL; }
.g2-tf-ghost.ok { background: var(--green); } .g2-tf-ghost.bad { background: var(--red); }
@keyframes g2flyR { from { transform: none; opacity: .9; } to { transform: translateX(160%) rotate(24deg); opacity: 0; } }
@keyframes g2flyL { from { transform: none; opacity: .9; } to { transform: translateX(-160%) rotate(-24deg); opacity: 0; } }
.g2-tf-btns { display: flex; justify-content: center; gap: 28px; }
.g2-tf-btn { width: 88px; height: 88px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 36px; font-weight: 900; color: #fff; transition: transform .15s var(--ease); }
.g2-tf-btn small { font-size: 11px; font-weight: 800; opacity: .9; }
.g2-tf-btn.no { background: var(--red); box-shadow: 0 5px 0 color-mix(in srgb, var(--red) 60%, #000); }
.g2-tf-btn.yes { background: var(--green); box-shadow: 0 5px 0 color-mix(in srgb, var(--green) 60%, #000); }
.g2-tf-btn:active { transform: translateY(4px); box-shadow: none; }

/* ---------- Пропущена літера ---------- */
.g2-word-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; }
.g2-let { width: 40px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 28px; font-weight: 800; font-family: ui-monospace, "SF Mono", Menlo, monospace; background: var(--fill); }
.g2-let.blank { background: none; box-shadow: inset 0 0 0 2.5px var(--label3); color: var(--label3); }
.g2-let.cur { box-shadow: inset 0 0 0 3px var(--yellow); color: var(--orange); animation: g2pulse 1s ease-in-out infinite; }
.g2-let.got { background: var(--green-tint); color: var(--green); animation: slotIn .3s var(--ease); }

/* ---------- Речення-пазл ---------- */
.g2-pz-uk { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.g2-pz-fox { width: 70px; flex: none; }
.g2-bubble { position: relative; flex: 1; padding: 12px 16px; border-radius: 18px; background: var(--glass-bg); box-shadow: var(--glass-edge), 0 0 0 1px var(--sep); font-size: 20px; font-weight: 700; }
.g2-bubble::before { content: ""; position: absolute; left: -8px; top: 50%; width: 16px; height: 16px; background: inherit; transform: translateY(-50%) rotate(45deg); box-shadow: -1px 1px 0 var(--sep); }
.g2-answer { min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 2px solid var(--sep); border-top: 2px solid var(--sep); margin-bottom: 18px; }
.g2-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.g2-chipw { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 14px; background: var(--bg2); box-shadow: 0 0 0 1.5px var(--sep), 0 3px 0 var(--sep); font-size: 18px; font-weight: 700; transition: transform .15s var(--ease), opacity .2s; animation: chipIn .3s var(--ease) backwards; }
.g2-chipw:active { transform: scale(.94); }
.g2-chipw.in { background: color-mix(in srgb, var(--accent) 12%, var(--bg2)); box-shadow: 0 0 0 1.5px var(--accent); }
.g2-chipw.used { opacity: .2; pointer-events: none; animation: none; }
.g2-chipw .g2-key { width: 18px; height: 18px; font-size: 10px; }

/* ---------- Скажи швидко ---------- */
.g2-say-word { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 10px 0 18px; padding: 18px; border-radius: 24px; background: var(--glass-bg); box-shadow: var(--glass-edge), var(--glass-shadow); animation: g2in .25s var(--ease); }
.g2-say-word .en { font-size: 34px; }
.g2-say-word small { color: var(--label2); font-size: 15px; }
.g2-mini { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; background: var(--fill); color: var(--accent); display: grid; place-items: center; }
.g2-mini svg { width: 20px; height: 20px; }
.g2-mic { display: grid; place-items: center; width: 104px; height: 104px; margin: 0 auto; border-radius: 50%; background: var(--green); color: #fff; box-shadow: 0 6px 0 color-mix(in srgb, var(--green) 60%, #000); transition: transform .15s var(--ease); }
.g2-mic svg { width: 46px; height: 46px; }
.g2-mic.on { background: var(--red); animation: g2micOn 1.2s ease-out infinite; }
@keyframes g2micOn { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 50%, transparent); } 100% { box-shadow: 0 0 0 26px transparent; } }
.g2-heard { text-align: center; min-height: 26px; margin: 16px 0 0; font-size: 18px; font-weight: 700; color: var(--label2); }
.g2-heard.bad { color: var(--red); }

/* ---------- Математичний потяг ---------- */
.g2-trainscene { height: clamp(360px, calc(100dvh - 250px), 480px); background: linear-gradient(180deg, #bfe6ff 0%, #e6f7d8 100%); }
.g2-trainscene .g2-hills { bottom: 64%; }
.g2-trainscene .g2-bgart.t1 { bottom: 64%; width: 20%; left: -3%; }
.g2-trainscene .g2-bgart.t2 { bottom: 64%; width: 15%; right: -2%; }
.g2-trainscene .g2-bgart.b1 { bottom: 64%; left: 26%; width: 22%; }
.g2-trainscene .g2-bgart.b2 { bottom: 64%; left: 58%; width: 18%; }
.g2-trainscene .g2-bgart.c1 { top: 5%; width: 24%; }
.g2-trainscene .g2-bgart.c2 { top: 12%; width: 18%; }
.g2-gnd { left: 0; right: 0; bottom: 0; height: 66%; background: #9cc98a; box-shadow: inset 0 2px 0 #3b2f2a; }
.g2-train { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 6px 6px; }
.g2-wagons.arrive { animation: g2arrive .45s cubic-bezier(.2,.9,.3,1.1); }
@keyframes g2arrive { from { translate: -60px 0; opacity: 0; } }
.g2-loco { position: relative; width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: 336 / 100; }
@media (min-width: 1100px) { .g2-loco { max-width: 530px; } }
.g2-loco.chug { animation: g2chug .25s ease-out; }
@keyframes g2chug { 50% { transform: translateX(12px); } }
.g2-loco-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.g2-loco .g2-fox { left: 4.17%; top: 24%; width: 16.67%; aspect-ratio: 56 / 44; overflow: hidden; border-radius: 10px; z-index: 3; }
.g2-loco .g2-fox svg { margin-top: 3%; }
.g2-q { position: absolute; left: 33.33%; top: 40%; width: 59.5%; height: 34%; display: grid; place-items: center; font-size: clamp(24px, 7.5vw, 32px); font-weight: 800; font-variant-numeric: tabular-nums; color: #3b2f2a; white-space: nowrap; z-index: 2; }
.g2-gap { display: inline-block; min-width: 1.1em; margin: 0 .08em; padding: 0 .16em; border-radius: 8px; background: #ffd23f; box-shadow: 0 0 0 2px #3b2f2a; text-align: center; line-height: 1.12; }
.g2-wh { transform-box: fill-box; transform-origin: center; animation: g2spin 1s linear infinite; }
@keyframes g2spin { to { transform: rotate(360deg); } }
.g2-smoke { position: absolute; left: 86%; top: -2%; z-index: 0; }
.g2-smoke i { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; opacity: .75; box-shadow: 0 0 0 1.4px #3b2f2a; animation: g2smoke 1.8s ease-out infinite; }
.g2-smoke i:nth-child(2) { animation-delay: .6s; } .g2-smoke i:nth-child(3) { animation-delay: 1.2s; }
@keyframes g2smoke { from { transform: translate(0, 0) scale(.5); opacity: .8; } to { transform: translate(-12px, -36px) scale(1.7); opacity: 0; } }
.g2-rail { display: block; width: 100%; margin-top: -6px; }
.g2-wagons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: -4px; }
@media (min-width: 701px) { .g2-wagons { gap: 10px; } }
.g2-wagon { position: relative; width: 100%; max-width: 100px; aspect-ratio: 80 / 96; justify-self: center; padding: 0; border-radius: 14px; transition: transform .15s var(--ease); animation: g2in .3s var(--ease) backwards; }
.g2-wagon:nth-child(2) { animation-delay: .05s; } .g2-wagon:nth-child(3) { animation-delay: .1s; } .g2-wagon:nth-child(4) { animation-delay: .15s; }
.g2-wg-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: filter .2s, transform .3s; }
.g2-wg-shut { opacity: 0; }
.g2-wagon b { position: absolute; left: 12.5%; top: 22.9%; width: 75%; height: 35.4%; display: grid; place-items: center; font-size: clamp(22px, 7vw, 32px); font-variant-numeric: tabular-nums; color: #3b2f2a; }
.g2-wagon .g2-key { position: absolute; z-index: 2; top: -2px; left: -2px; width: 18px; height: 18px; border-radius: 50%; background: #fff4e0; box-shadow: 0 0 0 2px #3b2f2a; font-size: 11px; color: #3b2f2a; }
.g2-wagon:active { transform: translateY(3px); }
.g2-wagon.bad { transform: translateY(3px); }
.g2-wagon.bad .g2-wg-svg { filter: saturate(.45); }
.g2-wagon.bad .g2-wg-shut { opacity: 1; }
.g2-wagon .g2-hint-ring { border-radius: 16px; }
.g2-platform { position: relative; display: block; width: 40%; margin-top: 2px; animation: g2platform .8s cubic-bezier(.2,.9,.3,1.1) backwards; }
@keyframes g2platform { from { translate: -110% 0; } }
.g2-timechip.bump { animation: g2bump .6s var(--ease); }
@keyframes g2bump { 40% { transform: scale(1.25) translateY(-3px); } }

/* ---------- Шаховий кінь ---------- */
.g2-garden { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0 24px; background: #9cc98a; }
.g2-garden-bg { inset: 0; width: 100%; height: 100%; }
.g2-garden .g2-bgart { display: none; }
@media (min-width: 701px) { .g2-garden .g2-bgart.t1 { display: block; left: -2%; bottom: 8%; width: 17%; } .g2-garden .g2-bgart.t2 { display: block; right: -2%; bottom: 8%; width: 17%; } }
.g2-knrow { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 10px; }
.g2-knrow .g2-fox { position: relative; flex: none; }
.g2-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: 1; min-width: 0; }
.g2-kchip { background: #fff4e0; color: #3b2f2a; box-shadow: 0 0 0 2px #3b2f2a; padding: 3px 8px; font-size: 14px; }
.g2-kchip svg { color: #3b2f2a; }
.g2-frame { position: relative; z-index: 2; width: min(436px, 100%); padding: 8px; border-radius: 18px; background: #a0673c; box-shadow: 0 0 0 2px #3b2f2a, inset 0 0 0 2px #c98a55, 0 4px 0 #3b2f2a; }
.g2-board { display: grid; grid-template-columns: repeat(6, 1fr); width: 100%; margin: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 2px #3b2f2a; }
.g2-sq { aspect-ratio: 1; display: grid; place-items: center; padding: 0; border-radius: 0; position: relative; }
.g2-sq.lt { background: #f6dfb8; } .g2-sq.dk { background: #b98454; }
.g2-sq.can::after { content: ""; position: absolute; inset: 0; background: rgba(52,199,89,.12); pointer-events: none; }
.g2-dot { width: 26%; height: 26%; border-radius: 50%; background: #fff4e0; box-shadow: 0 0 0 1.5px #3b2f2a; display: grid; place-items: center; animation: pop .3s var(--ease); }
.g2-dot::after { content: ""; width: 36%; height: 36%; border-radius: 50%; background: #3b2f2a; }
.g2-board.pulse .g2-dot { animation: g2dotpulse .4s var(--ease); }
@keyframes g2dotpulse { 50% { transform: scale(1.25); } }
.g2-kn { width: 76%; display: block; animation: g2hop .35s var(--ease); }
.g2-kn svg { display: block; width: 100%; overflow: visible; }
@keyframes g2hop { 40% { transform: translateY(-10px) scale(1.1); } }
.g2-sq-acorn { width: 62%; height: 62%; animation: g2bob 1.6s ease-in-out infinite; overflow: visible; }
.g2-bush { width: 84%; display: block; }
.g2-bush.grow { animation: g2grow .3s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes g2grow { from { transform: scale(0); } }
.g2-sq.g2-nudge { animation: g2nudge .3s ease-out; }
@keyframes g2nudge { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.g2-sq .g2-hint-ring { inset: 2px; border-radius: 8px; }
.g2-sq .g2-hint-ring::after { top: -2px; right: -2px; width: 18px; height: 18px; font-size: 12px; line-height: 18px; }

/* ---------- Ланцюжок ---------- */
.g2-reading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 12px 14px; height: clamp(300px, calc(100dvh - 300px), 420px);
  background: linear-gradient(180deg, #fde7c8 0 78%, #a0673c 78% calc(78% + 2px), #c98a55 calc(78% + 2px)); }
.g2-reading.compact { height: auto; min-height: 112px; justify-content: flex-end; padding: 52px 10px 10px; margin-bottom: 10px; }
.g2-reading .g2-bg::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: repeating-linear-gradient(90deg, transparent 0 62px, rgba(160,103,60,.5) 62px 64px); }
.g2-shelf { left: 0; top: 6px; width: 100%; height: auto; }
.g2-reading > :not(.g2-bg):not(.g2-fx):not(.g2-fox) { position: relative; z-index: 2; }
.g2-reading .g2-fox { position: absolute; right: 2%; bottom: 5%; z-index: 3; }
.g2-chain-show { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 22px 18px; width: min(300px, 72%); border-radius: 26px; background: #fff4e0; color: #3b2f2a; animation: g2flip .4s var(--ease);
  box-shadow: 0 0 0 2px #3b2f2a, 0 0 0 6px #af52de, 0 8px 0 #3b2f2a; }
.g2-chain-show .g2-emoji { font-size: 64px; }
.g2-chain-show b { font-size: 28px; }
.g2-chain-show small { color: #3b2f2a; font-size: 16px; font-weight: 600; }
@keyframes g2flip { from { transform: rotateY(80deg) scale(.9); opacity: 0; } }
.g2-dots { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.g2-dots i { width: 10px; height: 10px; border-radius: 50%; background: #fff4e0; box-shadow: 0 0 0 2px #3b2f2a; transition: background .2s, transform .2s; }
.g2-dots i.on { background: #af52de; transform: scale(1.2); }
@media (min-width: 701px) { .g2-chain-show { width: min(300px, 78%); } .g2-chain-show .g2-emoji { font-size: 84px; } .g2-reading .g2-fox { right: 4%; } }
.g2-rounds { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--label2); }
.g2-rounds i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px #af52de; }
.g2-rounds i.on { background: #af52de; }
.g2-rounds i.cur { background: #fff; box-shadow: inset 0 0 0 3px #af52de; }
.g2-rounds span { margin-left: 4px; }
.g2-chrow { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.g2-chrow .g2-sub { flex: 1; min-width: 0; margin: 0; text-align: left; font-size: 14px; }
.g2-chrow .g2-fox { position: relative; flex: none; width: 48px; margin-top: 10px; }
.g2-replay { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 44px; padding: 0 16px; border-radius: 99px; background: #fff4e0; color: #3b2f2a; box-shadow: 0 0 0 2px #3b2f2a, 0 3px 0 #3b2f2a; font: 800 16px/1 var(--font-round, inherit); }
.g2-replay svg { width: 20px; height: 20px; flex: none; }
.g2-replay em { font-style: normal; font-size: 13px; }
.g2-replay:active { transform: translateY(2px); box-shadow: 0 0 0 2px #3b2f2a, 0 1px 0 #3b2f2a; }
.g2-replay:disabled { opacity: .6; }
.g2-replay.used { background: #e9ddc6; color: #6b5b52; opacity: 1; box-shadow: 0 0 0 2px #6b5b52, 0 3px 0 #6b5b52; }
.g2-chain-line { display: flex; justify-content: center; gap: 8px; width: 100%; }
.g2-chain-line span { position: relative; flex: 1 1 0; min-width: 0; max-width: 42px; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #3b2f2a; background: #fff4e0; box-shadow: 0 0 0 2px #3b2f2a; font-size: 15px; }
.g2-chain-line span:not(:last-child)::after { content: ""; position: absolute; left: 100%; top: 50%; width: 8px; height: 4px; margin-top: -2px; border-radius: 2px; background: #a0673c; }
.g2-chain-line span.got { font-size: 22px; background: #e8f9ec; box-shadow: 0 0 0 2px #34c759; animation: slotIn .3s var(--ease); }
@media (min-width: 701px) { .g2-chain-line span { max-width: 52px; } }
.g2-pics.many .g2-pic { background: #fff4e0; color: #3b2f2a; box-shadow: 0 0 0 2px #3b2f2a, 0 3px 0 #3b2f2a; }
.g2-pics.many .g2-pic small { font-size: 13px; font-weight: 700; }
.g2-pics.many .g2-pic.ok { background: #fff4e0; color: #3b2f2a; box-shadow: 0 0 0 3px #34c759, 0 3px 0 #3b2f2a; animation: none; }
.g2-pics.many .g2-pic.ok::after, .g2-pics.many .g2-pic.wr::after { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; font: 800 12px/18px var(--font-round, inherit); text-align: center; color: #fff; }
.g2-pics.many .g2-pic.ok::after { content: "✓"; background: #34c759; }
.g2-pics.many .g2-pic.wr { background: #fff4e0; color: #3b2f2a; box-shadow: 0 0 0 3px #8fd0ef, 0 3px 0 #3b2f2a; animation: g2nudge .3s ease-out; }
.g2-pics.many .g2-pic.wr::after { content: "?"; background: #8fd0ef; color: #3b2f2a; }
.g2-pics.many .g2-pic .g2-hint-ring { border-radius: 18px; }
.g2-pics.many .g2-pic .g2-hint-ring::after { top: -10px; right: -6px; }
@media (min-width: 701px) { .g2-pics.many .g2-pic { min-height: 120px; } .g2-pics.many .g2-pic-em { font-size: 54px; } }

/* ---------- Теми ---------- */
html[data-theme="town"] .g2-banner { background: linear-gradient(135deg, #fff3d6, var(--glass-bg)); }
html[data-theme="town"] .g2-play { background: var(--bg); }

/* ---------- Мобільні ---------- */
@media (max-width: 700px) {
  .g2-banner { padding: 18px 16px; }
  .g2-banner-art { position: absolute; right: -24px; bottom: -10px; width: 150px; height: 90px; opacity: .45; }
  .g2-banner-art .g2-deco-b { width: 86px; right: 26px; }
  .g2-banner-art .g2-deco-t { width: 52px; }
  .g2-banner-art .g2-deco-cloud { display: none; }
  .g2-daily { flex-wrap: wrap; gap: 10px 12px; padding: 14px; }
  .g2-daily-art { width: 76px; }
  .g2-daily-btn { width: 100%; }
  .g2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .g2-card-art .g2-art { height: 70px; }
  .g2-card-body { padding: 4px 10px 12px; }
  .g2-card-body > b { font-size: 15px; }
  .g2-card-body > small { font-size: 12px; }
  .g2-card-foot { flex-direction: column; align-items: stretch; gap: 6px; }
  .g2-play-btn { justify-content: center; }
  .g2-body { padding: 10px 12px 32px; }
  .g2-top { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .g2-ttl { font-size: 15px; }
  .g2-ttl .g2-art { display: none; }
  .g2-chip { padding: 4px 8px; font-size: 13px; }
  .g2-tbar { margin: 0 12px; }
  .g2-opt { min-height: 56px; font-size: 16px; padding: 10px; gap: 8px; }
  .g2-qcard b { font-size: 26px; }
  .g2-emoji { font-size: 54px; }
  .g2-mem { gap: 7px; }
  .g2-slot { width: 34px; height: 44px; font-size: 20px; }
  .g2-tile { width: 44px; height: 50px; font-size: 22px; }
  .g2-let { width: 34px; height: 46px; font-size: 24px; }
  .g2-pic { min-height: 104px; }
  .g2-pic-em { font-size: 46px; }
  .g2-pics.many { gap: 6px; }
  .g2-pics.many .g2-pic { min-height: 74px; padding: 6px 2px; }
  .g2-pics.many .g2-pic-em { font-size: 28px; }
  .g2-tf { height: 240px; }
  .g2-tf-card { height: 210px; }
  .g2-tf-en { font-size: 30px; }
  .g2-intro { padding: 18px 14px 20px; margin-top: 6px; border-radius: 24px; }
  .g2-intro h1 { font-size: 26px; }
  .g2-intro-stats b { font-size: 12px; }
  .g2-result .rbox { width: calc(50% - 8px); max-width: 150px; }
  .g2-pz-fox { width: 54px; }
  .g2-bubble { font-size: 17px; }
  .g2-chipw { font-size: 16px; padding: 9px 11px; }
}

/* ---------- Менше руху ---------- */
html.no-motion .g2-card-game, html.no-motion .g2-daily-art, html.no-motion .g2-intro-art .g2-art, html.no-motion .g2-banner-art svg,
html.no-motion .g2-speaker, html.no-motion .g2-smoke i, html.no-motion .g2-wheels i, html.no-motion .g2-sq-acorn, html.no-motion .g2-tbar > i.low,
html.no-motion .g2-let.cur, html.no-motion .g2-mic.on, html.no-motion .g2-train, html.no-motion .g2-count-n, html.no-motion .g2-tf-ghost,
html.no-motion .g2-fox svg, html.no-motion .g2-fox .fox .m-head, html.no-motion .g2-hint-ring, html.no-motion .g2-acorn .g2-rays, html.no-motion .g2-bgart, html.no-motion .g2-wh,
html.no-motion .g2-wagons, html.no-motion .g2-wagon, html.no-motion .g2-loco, html.no-motion .g2-platform, html.no-motion .g2-timechip, html.no-motion .g2-sq.g2-nudge, html.no-motion .g2-board .g2-dot,
html.no-motion .g2-kn, html.no-motion .g2-bush, html.no-motion .g2-pics.many .g2-pic, html.no-motion .g2-chain-show, html.no-motion .g2-chain-line span { animation: none !important; }
html.no-motion .g2-float.pill { animation: g2pillstill 1.2s linear forwards !important; }
html.no-motion .g2-flag, html.no-motion .g2-say { animation-name: g2opin, g2flagout; }
html.no-motion .g2-tf-ghost { display: none; }
html.no-motion .g2-card-in { transition-duration: .01ms; }
@media (prefers-reduced-motion: reduce) {
  .g2-daily-art, .g2-intro-art .g2-art, .g2-banner-art svg, .g2-speaker, .g2-smoke i, .g2-wheels i, .g2-sq-acorn, .g2-let.cur, .g2-mic.on, .g2-tbar > i.low,
  .g2-fox svg, .g2-fox .fox .m-head, .g2-hint-ring, .g2-acorn .g2-rays, .g2-bgart, .g2-wh, .g2-wagons, .g2-wagon, .g2-loco, .g2-platform, .g2-timechip, .g2-sq.g2-nudge, .g2-board .g2-dot,
  .g2-kn, .g2-bush, .g2-pics.many .g2-pic, .g2-chain-show, .g2-chain-line span { animation: none !important; }
  .g2-float.pill { animation: g2pillstill 1.2s linear forwards !important; }
  .g2-flag, .g2-say { animation-name: g2opin, g2flagout; }
  .g2-tf-ghost { display: none; }
}

/* Фокус клавіатури на ігрових елементах аркадних сцен */
.g2-wagon:focus-visible, .g2-sq:focus-visible, .g2-pics.many .g2-pic:focus-visible, .g2-replay:focus-visible { outline: 3px solid #007aff; outline-offset: 2px; z-index: 3; }
