/* 🎮 Intellektual o'yinlar (web/games.php, games.js). Colours come from style.css's tokens. */
:root {
  --g-navy: #1f3b73;
  --g-deep: #13254d;
  --g-gold: #e3b341;
  --g-ok: #1baf7a;
  --g-bad: #e0524d;
  --g-tile: var(--surface);
  --g-ease: cubic-bezier(.2, .8, .2, 1);
  --g-spring: cubic-bezier(.3, 1.35, .45, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --g-ok: #2bc28c; --g-bad: #f06a64; }
}
:root[data-theme="dark"] { --g-ok: #2bc28c; --g-bad: #f06a64; }

#games-app { display: grid; gap: 16px; padding-bottom: 24px; }
#games-app [hidden] { display: none !important; }
#games-app h1, #games-app h2 { margin: 0; }

/* ---------- hero */
.g-hero { position: relative; overflow: hidden; border-radius: 20px; color: #fff; padding: 26px 22px;
  background: radial-gradient(120% 140% at 0% 0%, #2f5fb8 0%, var(--g-navy) 45%, var(--g-deep) 100%); isolation: isolate; }
.g-hero-in { position: relative; z-index: 2; display: grid; gap: 10px; max-width: 640px; }
.g-hero h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); letter-spacing: -.02em; animation: g-rise .7s var(--g-ease) both; }
.g-hero p { margin: 0; color: rgba(255, 255, 255, .86); animation: g-rise .7s .08s var(--g-ease) both; }
.g-kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--g-gold) !important; font-weight: 700; }
.g-orbs i { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; z-index: 1; animation: g-float 9s ease-in-out infinite; }
.g-orbs i:nth-child(1) { width: 180px; height: 180px; right: -40px; top: -50px; background: radial-gradient(circle at 30% 30%, #ffd86b, #e3b341 60%, transparent 70%); }
.g-orbs i:nth-child(2) { width: 90px; height: 90px; right: 120px; bottom: -30px; background: radial-gradient(circle at 30% 30%, #8fd3ff, #2a78d6 65%, transparent 72%); animation-delay: -3s; animation-duration: 11s; }
.g-orbs i:nth-child(3) { width: 40px; height: 40px; right: 60px; top: 110px; background: radial-gradient(circle, #fff, rgba(255,255,255,0) 70%); animation-delay: -6s; animation-duration: 7s; }
.g-me { display: flex; flex-wrap: wrap; gap: 8px; }
.g-live { display: flex; flex-wrap: wrap; gap: 8px; }
.g-hero .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.g-result-line { font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: .86rem; font-weight: 600;
  background: rgba(255, 255, 255, .14); color: inherit; white-space: nowrap; }
.card .chip, .g-stage .chip, .g-card .chip { background: var(--grid); }
.chip-coin b { font-variant-numeric: tabular-nums; }
.chip-win { color: var(--g-ok); }
a.chip { text-decoration: none; }
a.chip:hover { filter: brightness(1.1); }

/* ---------- game cards */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; perspective: 900px; }
.g-card { position: relative; display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: 18px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none !important; transform-style: preserve-3d;
  animation: g-card-in .6s calc(var(--i, 0) * 70ms + .1s) var(--g-spring) both; transition: transform .25s var(--g-ease), box-shadow .25s; }
.g-card:hover { box-shadow: 0 10px 30px rgba(20, 23, 31, .12); }
.g-card:active { transform: scale(.97); }
.g-emo { font-size: 2.2rem; line-height: 1; display: inline-block; transform: translateZ(30px); }
.g-emo.big { font-size: 4rem; animation: g-bob 3s ease-in-out infinite; }
.g-title { font-weight: 700; font-size: 1.1rem; }
.g-line { color: var(--muted); font-size: .9rem; }
.g-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.g-duel p { margin: 6px 0 0; color: var(--ink-2); }
.g-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.g-tabs a { white-space: nowrap; }
#games-app .card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.g-top { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.g-top li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; }
.g-top li:nth-child(odd) { background: var(--grid); }
.g-top li.me { box-shadow: inset 0 0 0 2px var(--accent); }
.g-top .rk { text-align: center; font-weight: 700; }
.g-top .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-top .pt { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }

/* ---------- the stage */
.g-back { display: flex; justify-content: space-between; align-items: center; }
.g-mute { border: 0; background: var(--grid); border-radius: 99px; width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; }
.g-stage { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 18px 16px; min-height: 420px; overflow: hidden; }
.g-screen { display: grid; gap: 14px; animation: g-screen-in .45s var(--g-ease) both; }
.g-screen.out { animation: g-screen-out .25s ease-in both; }
.g-lobby { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 10px 0; }
.g-lobby h1 { font-size: 1.6rem; }
.g-lobby .muted { margin: 0; max-width: 46ch; }
.g-loading { color: var(--muted); }
.g-cta { font-size: 1.05rem; padding: 15px 26px; border-radius: 14px; min-width: 230px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #3b8af0, var(--accent) 50%, #1f5fb8); box-shadow: 0 8px 22px rgba(42, 120, 214, .35); transition: transform .15s var(--g-ease); }
.g-cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-100%); animation: g-sheen 3.2s 1s ease-in-out infinite; }
.g-cta:active, .kp button:active, .g-opt:active { transform: scale(.96); }
.g-cta[disabled] { opacity: .6; cursor: progress; }
.g-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.g-seg { display: inline-flex; background: var(--grid); border-radius: 12px; padding: 4px; gap: 4px; }
.g-seg button { border: 0; background: transparent; color: var(--ink-2); padding: 8px 14px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.g-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.g-panel { width: 100%; max-width: 420px; display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--grid); text-align: left; animation: g-rise .35s var(--g-ease) both; }
.g-panel label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.g-link { font-family: ui-monospace, monospace; font-size: .85rem; word-break: break-all; background: var(--surface); padding: 8px 10px; border-radius: 8px; }
.g-note { font-size: .85rem; color: var(--muted); margin: 0; }

/* the bar on top of a running game */
.g-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.g-bar .g-name { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.g-tools { display: flex; gap: 6px; }
.g-tool { border: 0; border-radius: 10px; padding: 8px 12px; background: var(--grid); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; transition: transform .15s, background .2s; }
.g-tool:hover { filter: brightness(1.05); }
.g-tool[disabled] { opacity: .45; cursor: default; }
.g-tool.gold { background: color-mix(in srgb, var(--g-gold) 22%, var(--grid)); }
.g-timebar { height: 8px; border-radius: 99px; background: var(--grid); overflow: hidden; }
.g-timebar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--g-ok), #6fd3a8); transform-origin: left; }
.g-timebar.low i { background: linear-gradient(90deg, var(--g-bad), #ff9a6b); animation: g-pulse .5s ease-in-out infinite alternate; }
.g-stats { display: flex; gap: 8px; justify-content: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* keypad */
.kp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 330px; margin: 0 auto; }
.kp button { border: 0; border-radius: 14px; padding: 14px 0; font-weight: 700; font-size: 1.35rem; line-height: 1; font-family: inherit; background: var(--grid); color: var(--ink);
  cursor: pointer; transition: transform .1s, background .2s, opacity .2s; touch-action: manipulation; }
.kp button.go { background: var(--accent); color: #fff; }
.kp button[disabled] { opacity: .3; }

/* ---------- 🐂 buqa */
.bq-code, .bq-input { display: flex; gap: 8px; justify-content: center; perspective: 600px; }
.bq-slot, .bq-cell { width: 54px; height: 64px; display: grid; place-items: center; border-radius: 14px; font-weight: 800; font-size: 1.9rem; line-height: 1; font-family: inherit; }
.bq-slot { background: linear-gradient(160deg, var(--g-navy), var(--g-deep)); color: var(--g-gold); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); transition: transform .5s var(--g-spring); }
.bq-slot.open { animation: g-flip .6s var(--g-ease) both; }
.bq-slot.win { background: linear-gradient(160deg, var(--g-ok), #11845b); color: #fff; }
.bq-slot.lose { background: linear-gradient(160deg, var(--g-bad), #a8302c); color: #fff; }
.bq-cell { background: var(--grid); border: 2px dashed var(--line); color: var(--ink); }
.bq-cell.on { border-style: solid; border-color: var(--accent); animation: g-pop .25s var(--g-spring); }
.bq-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 330px; overflow: auto; }
.bq-hist li { display: grid; grid-template-columns: 26px auto 1fr; align-items: center; gap: 10px; }
.bq-hist .n { color: var(--muted); font-size: .85rem; text-align: right; }
.bq-hist .ds { display: flex; gap: 4px; perspective: 400px; }
.bq-hist .d { width: 34px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: var(--grid); font-weight: 800; font-size: 1.15rem; }
.bq-hist li.new .d { animation: g-flip .5s calc(var(--k) * 90ms) var(--g-ease) both; }
.bq-hist .bc { display: flex; gap: 6px; }
.bq-hist .bc span { padding: 4px 9px; border-radius: 99px; font-weight: 700; font-size: .9rem; background: var(--grid); }
.bq-hist .bc .b { background: color-mix(in srgb, var(--g-ok) 22%, var(--grid)); }
.bq-hist .bc .c { background: color-mix(in srgb, var(--g-gold) 26%, var(--grid)); }
.bq-hist li.new .bc span { animation: g-pop .4s .42s var(--g-spring) both; }

/* ---------- 🏆 zina */
.zn-ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.zn-ladder li { height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--grid); font-size: .72rem; font-weight: 700; color: var(--muted);
  transition: background .4s, color .4s, transform .4s var(--g-spring); }
.zn-ladder li.safe { box-shadow: inset 0 0 0 2px var(--g-gold); }
.zn-ladder li.done { background: linear-gradient(160deg, #f1c75a, var(--g-gold)); color: #3a2a00; }
.zn-ladder li.cur { background: var(--accent); color: #fff; transform: translateY(-4px) scale(1.08); }
.zn-head { display: flex; align-items: center; gap: 12px; }
.zn-timer { position: relative; width: 58px; height: 58px; flex: none; }
.zn-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.zn-timer circle { fill: none; stroke-width: 6; }
.zn-timer .bg { stroke: var(--grid); }
.zn-timer .fg { stroke: var(--g-ok); stroke-linecap: round; stroke-dasharray: 157; transition: stroke .3s; }
.zn-timer.low .fg { stroke: var(--g-bad); }
.zn-timer.low { animation: g-pulse .5s ease-in-out infinite alternate; }
.zn-timer span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.zn-q { font-size: 1.12rem; font-weight: 600; line-height: 1.45; animation: g-focus .5s var(--g-ease) both; }
.zn-opts { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .zn-opts { grid-template-columns: 1fr 1fr; } }
.g-opt { display: flex; align-items: center; gap: 10px; text-align: left; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; animation: g-rise .4s calc(var(--k) * 60ms + .15s) var(--g-ease) both;
  transition: transform .15s, border-color .2s, background .25s, opacity .3s; }
.g-opt b { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--grid); font-size: .85rem; }
.g-opt:hover:not([disabled]) { border-color: var(--accent); }
.g-opt.pick { border-color: var(--g-gold); background: color-mix(in srgb, var(--g-gold) 14%, var(--surface)); animation: g-pulse .35s ease-in-out infinite alternate; }
.g-opt.right { border-color: var(--g-ok); background: color-mix(in srgb, var(--g-ok) 20%, var(--surface)); animation: g-pop .4s var(--g-spring); }
.g-opt.wrong { border-color: var(--g-bad); background: color-mix(in srgb, var(--g-bad) 16%, var(--surface)); animation: g-shake .45s; }
.g-opt.gone { animation: g-gone .35s var(--g-ease) forwards; pointer-events: none; } /* an animation: the entrance one would win over plain opacity */
.g-opt[disabled] { cursor: default; }

/* ---------- ⚡ hisob */
.hs-prob { position: relative; height: 96px; overflow: hidden; }
.hs-prob div { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: clamp(2rem, 9vw, 3rem); line-height: 1; font-family: inherit; font-variant-numeric: tabular-nums; }
.hs-prob .in { animation: g-from-right .32s var(--g-ease) both; }
.hs-prob .ok { animation: g-to-left .32s ease-in both; color: var(--g-ok); }
.hs-prob .no { animation: g-drop .45s ease-in both; color: var(--g-bad); }
.hs-ans { min-height: 52px; display: grid; place-items: center; font-weight: 800; font-size: 2rem; line-height: 1; font-family: inherit; border-radius: 14px; background: var(--grid); font-variant-numeric: tabular-nums; }
.hs-ans.bad { animation: g-shake .4s; box-shadow: inset 0 0 0 2px var(--g-bad); }
.hs-fx { position: absolute; left: 50%; top: 0; font-weight: 800; pointer-events: none; animation: g-float-up .8s var(--g-ease) both; }

/* ---------- 🔤 soz */
.sz-slots, .sz-tiles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 54px; }
.sz-slot { width: 44px; height: 52px; border-radius: 12px; border: 2px dashed var(--line); display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; line-height: 1; font-family: inherit; }
.sz-slot.f { border-style: solid; border-color: var(--accent); background: var(--grid); }
.sz-slots.ok .sz-slot { border-color: var(--g-ok); background: color-mix(in srgb, var(--g-ok) 22%, var(--surface)); animation: g-hop .5s calc(var(--k) * 50ms) var(--g-spring); }
.sz-slots.no { animation: g-shake .45s; }
.sz-slots.no .sz-slot.f { border-color: var(--g-bad); }
.sz-tile { width: 48px; height: 54px; border: 0; border-radius: 12px; font-weight: 800; font-size: 1.5rem; line-height: 1; font-family: inherit; cursor: pointer; color: #3a2a00;
  background: linear-gradient(160deg, #f6d77a, var(--g-gold)); box-shadow: 0 4px 0 #b98b1d; transition: transform .12s, opacity .2s;
  animation: g-deal .45s calc(var(--k) * 45ms) var(--g-spring) both; touch-action: manipulation; }
.sz-tile:active { transform: translateY(3px); box-shadow: 0 1px 0 #b98b1d; }
.sz-tile.used { visibility: hidden; }
.sz-tile.w2, .sz-slot.w2 { font-size: 1.15rem; letter-spacing: -.02em; } /* Oʻ Gʻ SH CH: one letter, two signs */
.sz-fly { position: fixed; z-index: 50; pointer-events: none; margin: 0; }
.sz-hintline { text-align: center; min-height: 1.4em; color: var(--muted); font-weight: 600; }

/* ---------- 🧩 sudoku */
.sd-board { display: grid; grid-template-columns: repeat(9, 1fr); width: min(100%, 460px); margin: 0 auto; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.sd-board.bad { animation: g-shake .45s; }
.sd-c { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); color: var(--accent);
  font-weight: 600; font-size: clamp(1rem, 4.6vw, 1.45rem); line-height: 1; font-family: inherit; display: grid; place-items: center; cursor: pointer; padding: 0; transition: background .15s; }
.sd-c:nth-child(9n+3), .sd-c:nth-child(9n+6) { border-right: 2px solid var(--ink); }
.sd-c:nth-child(n+19):nth-child(-n+27), .sd-c:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid var(--ink); }
.sd-c.g { color: var(--ink); font-weight: 800; }
.sd-c.h { color: #9a6a00; font-weight: 800; background: color-mix(in srgb, var(--g-gold) 18%, var(--surface)); animation: g-pop .5s var(--g-spring); }
.sd-c.area { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.sd-c.same { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.sd-c.sel { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.sd-c.err { color: var(--g-bad); }
.sd-c.pop { animation: g-pop .22s var(--g-spring); }
.sd-board.won .sd-c { animation: g-wave .6s calc(var(--w) * 40ms) var(--g-ease) both; }
.kp.sd { grid-template-columns: repeat(5, 1fr); max-width: 460px; }
.kp.sd button { padding: 12px 0; font-size: 1.2rem; }

/* ---------- 🔢 15 */
.sl-board { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin: 0 auto; border-radius: 18px; background: var(--grid); padding: 6px; touch-action: none; }
.sl-t { position: absolute; left: 6px; top: 6px; width: calc((100% - 12px) / 4); height: calc((100% - 12px) / 4); padding: 4px; transition: transform .17s var(--g-spring); cursor: pointer; }
.sl-t span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 12px; font-weight: 800; font-size: clamp(1.3rem, 6vw, 1.9rem); line-height: 1; font-family: inherit;
  color: #fff; background: linear-gradient(160deg, #3f72d0, var(--g-navy)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.15); transition: background .3s; }
.sl-t.home span { background: linear-gradient(160deg, #f1c75a, #c99520); color: #3a2a00; }
.sl-board.won .sl-t span { animation: g-hop .5s calc(var(--k) * 35ms) var(--g-spring); }

/* ---------- result */
.g-result { display: grid; gap: 14px; justify-items: center; text-align: center; }
.g-ring { position: relative; width: 170px; height: 170px; }
.g-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.g-ring circle { fill: none; stroke-width: 12; }
.g-ring .bg { stroke: var(--grid); }
.g-ring .fg { stroke: url(#g-grad); stroke-linecap: round; stroke-dasharray: 440; stroke-dashoffset: 440; }
.g-ring div { position: absolute; inset: 0; display: grid; place-content: center; }
.g-ring b { font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.g-ring small { color: var(--muted); font-weight: 600; }
.g-prize { font-size: 1.6rem; font-weight: 800; color: var(--g-ok); animation: g-pop .6s .9s var(--g-spring) both; }
.g-prize.zero { color: var(--muted); font-size: 1.1rem; }
.g-verdict { font-size: 1.25rem; font-weight: 800; animation: g-rise .5s .3s var(--g-ease) both; }
.g-coin { position: fixed; z-index: 60; width: 26px; height: 26px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff6c9, #f1c75a 40%, #b98b1d 80%); box-shadow: 0 0 0 2px #e3b341 inset; }
.g-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 55; }
.g-toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 70; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; max-width: min(92vw, 420px); text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: g-toast 2.8s var(--g-ease) both; }
.g-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; animation: g-rot .7s linear infinite; }

/* ---------- inside Telegram */
.in-tg .top nav, .in-tg .foot, .in-tg .ad { display: none; }
.in-tg .g-hero { border-radius: 16px; }

/* ---------- motion */
@keyframes g-rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes g-card-in { from { opacity: 0; transform: translateY(26px) rotateX(-18deg) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes g-screen-in { from { opacity: 0; transform: translateX(28px) scale(.98); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes g-screen-out { to { opacity: 0; transform: translateX(-28px) scale(.98); filter: blur(6px); } }
@keyframes g-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-14px, 12px); } }
@keyframes g-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
@keyframes g-sheen { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes g-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes g-flip { from { transform: rotateX(90deg); opacity: .2; } to { transform: rotateX(0); opacity: 1; } }
@keyframes g-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes g-pulse { from { transform: scale(1); } to { transform: scale(1.03); } }
@keyframes g-focus { from { opacity: 0; filter: blur(8px); transform: scale(1.04); } to { opacity: 1; filter: none; transform: none; } }
@keyframes g-from-right { from { transform: translateX(70%) scale(.9); opacity: 0; filter: blur(6px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes g-to-left { to { transform: translateX(-70%) scale(.85); opacity: 0; filter: blur(6px); } }
@keyframes g-drop { 0% { transform: none; } 30% { transform: translateX(-8px) rotate(-3deg); } 100% { transform: translateY(60%) rotate(8deg); opacity: 0; } }
@keyframes g-float-up { from { transform: translate(-50%, 10px); opacity: 1; } to { transform: translate(-50%, -40px); opacity: 0; } }
@keyframes g-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-12px) scale(1.06); } }
@keyframes g-deal { from { transform: translateY(-30px) rotate(-14deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes g-wave { 0% { transform: scale(1); } 40% { transform: scale(.82); background: color-mix(in srgb, var(--g-ok) 35%, var(--surface)); } 100% { transform: scale(1); } }
@keyframes g-toast { 0% { opacity: 0; transform: translate(-50%, 20px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes g-rot { to { transform: rotate(360deg); } }
@keyframes g-gone { from { opacity: 1; transform: none; } to { opacity: .16; transform: scale(.94); filter: grayscale(1); } }

@media (prefers-reduced-motion: reduce) {
  #games-app *, .g-toast { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
