/* ============================================================
   Игры (v460): pages/games.html, pages/quiz.html
   ============================================================ */
.gm-app, .qz-app { --gold: #ffc93c; --ok: #2fd27a; --bad: #ff5a6e; padding: 8px 0 40px; min-width: 0; }
.gm-app *, .qz-app *, .gm-app *::before, .qz-app *::before { box-sizing: border-box; }

/* ---------- витрина ---------- */
.gm-hero { position: relative; padding: 28px; margin-bottom: 18px; border-radius: 28px; overflow: hidden; isolation: isolate;
    border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
    background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 55%),
                radial-gradient(80% 130% at 100% 100%, color-mix(in srgb, #f7931e 26%, transparent), transparent 60%),
                linear-gradient(160deg, color-mix(in srgb, var(--surface) 92%, #0b1030), color-mix(in srgb, var(--bg) 85%, #04060f)); }
.gm-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5; background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, .025) 22px 23px); }
.gm-kicker, .qz-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.gm-hero h2 { font-family: 'Russo One', 'Montserrat', sans-serif; font-weight: 400; font-size: clamp(24px, 3.4vw, 36px); line-height: 1.12; margin: 10px 0 8px; }
.gm-hero h2 em { font-style: normal; background: linear-gradient(90deg, var(--gold), #ff8a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gm-hero p { margin: 0; max-width: 620px; color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }

.gm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.gm-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 24px; overflow: hidden; isolation: isolate; min-width: 0;
    color: var(--text); text-decoration: none; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #fff 4%), var(--surface)); border: 1px solid var(--border-soft);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .3s; animation: gm-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.gm-card:nth-child(2) { animation-delay: 60ms; } .gm-card:nth-child(3) { animation-delay: 120ms; }
@keyframes gm-in { from { opacity: 0; transform: translateY(12px); } }
a.gm-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: 0 22px 40px -24px color-mix(in srgb, var(--gold) 70%, transparent); }
a.gm-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gm-card-glow { position: absolute; inset: -40% -20% auto auto; width: 220px; height: 220px; border-radius: 50%; z-index: -1;
    background: radial-gradient(circle, color-mix(in srgb, var(--gold) 30%, transparent), transparent 70%); }
.gm-ico { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 24px; color: #1a1300;
    background: linear-gradient(135deg, #ffe07a, #ff9d3a); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 10px 22px -12px #ff9d3a; }
.gm-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gm-top b { font-family: 'Montserrat', sans-serif; font-size: 18px; }
.gm-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--text-muted); }
.gm-badge.is-reward { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.gm-badge.is-done { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.gm-text { color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.gm-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); }
.gm-meta i { margin-right: 5px; color: var(--accent); }
.gm-cta { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; border-radius: 16px; margin-top: auto; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 12px 26px -14px var(--accent); }
.gm-cta i { transition: transform .25s; }
a.gm-card:hover .gm-cta i { transform: translateX(4px); }
.gm-card.is-soon { opacity: .6; border-style: dashed; }
.gm-card.is-soon .gm-ico { background: var(--surface-2); color: var(--text-muted); box-shadow: none; }

/* ---------- тест ---------- */
.qz-app { max-width: 760px; margin: 0 auto; }
.qz-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; font-weight: 700; font-size: 14px; color: var(--text-muted); text-decoration: none; }
.qz-back:hover { color: var(--text); }
.qz-stage { position: relative; display: grid; }
.qz-screen { grid-area: 1 / 1; min-width: 0; animation: qz-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.qz-screen.is-out { animation: qz-out .35s cubic-bezier(.4, 0, .6, 1) both; pointer-events: none; }
@keyframes qz-in { from { opacity: 0; transform: translateX(40px) scale(.98); } }
@keyframes qz-out { to { opacity: 0; transform: translateX(-40px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .qz-screen, .qz-screen.is-out { animation-duration: .01s; } }

.qz-intro, .qz-result, .qz-card { position: relative; border-radius: 28px; padding: 28px; overflow: hidden; isolation: isolate;
    border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
    background: radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 55%),
                radial-gradient(70% 110% at 100% 100%, color-mix(in srgb, #f7931e 20%, transparent), transparent 60%),
                linear-gradient(160deg, color-mix(in srgb, var(--surface) 94%, #0b1030), color-mix(in srgb, var(--bg) 88%, #04060f)); }
.qz-intro, .qz-result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.qz-emblem { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; font-size: 38px; color: #1a1300; margin-bottom: 6px;
    background: linear-gradient(135deg, #ffe07a, #ff9d3a); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), 0 18px 36px -16px #ff9d3a; animation: qz-bob 3s ease-in-out infinite; }
@keyframes qz-bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.qz-intro h2, .qz-result h2 { font-family: 'Russo One', 'Montserrat', sans-serif; font-weight: 400; font-size: clamp(24px, 4vw, 34px); line-height: 1.12; margin: 2px 0; }
.qz-lead { margin: 0; max-width: 540px; color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }
.qz-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; margin: 12px 0 4px; }
.qz-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 18px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .07); min-width: 0; }
.qz-stat i { color: var(--gold); font-size: 15px; }
.qz-stat b { font-family: 'Russo One', sans-serif; font-weight: 400; font-size: 22px; }
.qz-stat small { font-size: 11.5px; color: var(--text-muted); line-height: 1.25; }
.qz-best { font-size: 14px; color: var(--text-muted); }
.qz-best b { color: var(--text); }
.qz-best i { color: var(--gold); margin-right: 4px; }
.qz-done { margin: 0; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; background: color-mix(in srgb, var(--ok) 12%, transparent); color: color-mix(in srgb, var(--ok) 80%, var(--text)); }
.qz-warn { margin: 0; color: var(--text-muted); }
.qz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.qz-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 22px; border-radius: 16px; overflow: hidden;
    border: 1px solid var(--border-soft); background: rgba(255, 255, 255, .06); color: var(--text); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none;
    transition: transform .2s, background .2s, box-shadow .25s; }
.qz-btn:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.qz-btn.is-main { border: 0; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 14px 28px -14px var(--accent); }
.qz-btn.is-main:hover { box-shadow: 0 18px 34px -14px var(--accent); }

/* вопрос */
.qz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.qz-count { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px; color: var(--text-muted); }
.qz-count b { font-family: 'Russo One', sans-serif; font-weight: 400; font-size: 24px; color: var(--text); }
.qz-count i { font-style: normal; margin: 0 4px; opacity: .5; }
.qz-score { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-weight: 800;
    background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.qz-score b { font-variant-numeric: tabular-nums; }
.qz-bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-bottom: 14px; }
.qz-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.qz-card { padding: 26px 22px 22px; }
.qz-num { position: absolute; right: 14px; top: -10px; z-index: -1; font-family: 'Russo One', sans-serif; font-size: 110px; line-height: 1; color: rgba(255, 255, 255, .045); }
.qz-q { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: clamp(18px, 2.6vw, 23px); line-height: 1.35; margin: 0 0 18px; overflow-wrap: anywhere; }
.qz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qz-opt { --c: var(--accent); position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border-radius: 18px; text-align: left;
    border: 1.5px solid var(--border-soft); background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
    transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .2s, background .2s, box-shadow .25s, opacity .25s; animation: qz-opt .4s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d); }
@keyframes qz-opt { from { opacity: 0; transform: translateY(10px); } }
.qz-opt:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.qz-opt:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.qz-opt:disabled { cursor: default; }
.qz-let { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-family: 'Russo One', sans-serif; font-size: 15px;
    background: color-mix(in srgb, var(--c) 22%, rgba(0, 0, 0, .2)); color: #fff; transition: background .2s; }
.qz-otext { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.qz-mark { flex: none; font-size: 18px; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.qz-opt.is-picked { border-color: var(--c); }
.qz-opts:has(.is-right) .qz-opt:not(.is-right):not(.is-wrong) { opacity: .45; }
.qz-opt.is-right { --c: var(--ok); border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.qz-opt.is-right .qz-mark { opacity: 1; transform: none; color: var(--ok); }
.qz-opt.is-right .qz-mark::before { content: '\f00c'; }
.qz-opt.is-wrong { --c: var(--bad); border-color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); animation: qz-shake .45s; }
.qz-opt.is-wrong .qz-mark { opacity: 1; transform: none; color: var(--bad); }
.qz-opt.is-wrong .qz-mark::before { content: '\f00d'; }
@keyframes qz-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.was-right .qz-card { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.was-wrong .qz-card { border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.qz-after { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; animation: qz-opt .35s both; }
.qz-after[hidden] { display: none; }
.qz-verdict { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-family: 'Russo One', sans-serif; font-size: 18px; }
.qz-verdict.is-ok { color: var(--ok); } .qz-verdict.is-bad { color: var(--bad); }
.qz-note { flex: 1 1 260px; margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.45; }
.qz-btn.is-next { margin-left: auto; min-height: 44px; padding: 0 18px; border: 0; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.qz-tick { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255, 255, 255, .6); transform-origin: left; animation: qz-tick var(--t) linear both; }
@keyframes qz-tick { from { transform: scaleX(0); } }

/* итог */
.qz-ring { position: relative; width: 168px; height: 168px; margin-bottom: 6px; }
.qz-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.qz-ring circle { fill: none; stroke-width: 11; }
.qz-ring-bg { stroke: var(--surface-2); }
.qz-ring-fg { stroke: var(--bad); stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .2, 1); }
.qz-result.is-pass .qz-ring-fg { stroke: var(--gold); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--gold) 60%, transparent)); }
.qz-ring > span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.qz-ring b { font-family: 'Russo One', sans-serif; font-weight: 400; font-size: 38px; line-height: 1; }
.qz-ring small { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.qz-result.is-fail .qz-kicker { color: var(--bad); }
.qz-res-msg { margin: 0; max-width: 480px; color: var(--text-muted); font-size: 14.5px; line-height: 1.5; }
.qz-res-msg.is-win { color: var(--gold); font-weight: 800; font-size: 16px; }

.qz-loading { display: flex; justify-content: center; gap: 8px; padding: 80px 0; }
.qz-loading span { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); animation: qz-dot 1s infinite ease-in-out; }
.qz-loading span:nth-child(2) { animation-delay: .15s; } .qz-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes qz-dot { 50% { transform: translateY(-10px); opacity: .5; } }

@media (max-width: 640px) {
    .gm-hero, .qz-intro, .qz-result { padding: 22px 18px; border-radius: 24px; }
    .qz-card { padding: 22px 16px 18px; border-radius: 24px; }
    .qz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qz-opts { grid-template-columns: 1fr; }
    .qz-opt { min-height: 56px; }
    .qz-num { font-size: 84px; }
    .qz-btn.is-next { width: 100%; margin-left: 0; }
    .qz-actions .qz-btn { flex: 1 1 100%; }
}

/* ---------- v461: витрина всех игр ---------- */
.gm-list { display: block; }
.gm-sec { display: flex; align-items: center; gap: 9px; margin: 26px 0 12px; font-family: 'Montserrat', sans-serif; font-size: 17px; }
.gm-sec i { color: var(--gold); }
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.gm-card { --tone: #ffc93c; gap: 12px; padding: 16px; animation-delay: calc(var(--i, 0) * 40ms); }
.gm-card.is-gold { --tone: #ffc93c; } .gm-card.is-orange { --tone: #ff9d3a; } .gm-card.is-pink { --tone: #ff5ca8; } .gm-card.is-red { --tone: #ff5a6e; }
.gm-card.is-purple { --tone: #a98bff; } .gm-card.is-blue { --tone: #4fc3ff; } .gm-card.is-green { --tone: #2fd27a; }
.gm-card .gm-card-glow { background: radial-gradient(circle, color-mix(in srgb, var(--tone) 26%, transparent), transparent 70%); }
a.gm-card:hover { border-color: color-mix(in srgb, var(--tone) 60%, transparent); box-shadow: 0 22px 40px -24px color-mix(in srgb, var(--tone) 75%, transparent); }
.gm-row { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.gm-card .gm-ico { flex: none; width: 50px; height: 50px; border-radius: 16px; font-size: 22px; color: #fff;
    background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 85%, #fff), color-mix(in srgb, var(--tone) 70%, #000)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 10px 22px -12px var(--tone); }
.gm-card .gm-top b { font-size: 16.5px; }
.gm-card .gm-badge.is-reward { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); font-size: 11.5px; padding: 3px 8px; }
.gm-card .gm-text { font-size: 13.5px; }
.gm-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; min-height: 30px; flex-wrap: wrap; }
.gm-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); padding: 4px 10px; border-radius: 999px; background: var(--surface-2); }
.gm-st.is-done { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.gm-st.is-hot { color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.gm-go { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; color: var(--tone); }
.gm-go i { transition: transform .25s; }
a.gm-card:hover .gm-go i { transform: translateX(4px); }

.gm-week { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: center; padding: 20px 22px; border-radius: 24px; margin-top: 4px;
    border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
    background: radial-gradient(80% 140% at 0% 0%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 60%), linear-gradient(160deg, color-mix(in srgb, var(--surface) 94%, #1a1200), var(--surface)); }
.gm-week h3 { font-family: 'Russo One', sans-serif; font-weight: 400; font-size: clamp(19px, 2.6vw, 24px); margin: 8px 0 6px; }
.gm-week h3 em { font-style: normal; color: var(--gold); }
.gm-week p { margin: 0 0 12px; color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }
.gm-cta-sm { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 14px; font-weight: 800; color: #1a1300; text-decoration: none;
    background: linear-gradient(135deg, #ffe07a, #ff9d3a); box-shadow: 0 10px 22px -12px #ff9d3a; }
.gm-week-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gm-week-top li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); min-width: 0; }
.gm-week-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-week-top em { font-style: normal; font-family: 'Russo One', sans-serif; color: var(--gold); }
.gm-wk-p { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--surface-2); }
.gm-wk-p.p1 { background: linear-gradient(135deg, #ffe07a, #ff9d3a); color: #1a1300; } .gm-wk-p.p2 { background: #cfd6e2; color: #1a1d26; } .gm-wk-p.p3 { background: #d9935a; color: #1a0f05; }
.gm-wk-empty { color: var(--text-muted); font-size: 13.5px; justify-content: center; }
@media (max-width: 720px) { .gm-week { grid-template-columns: minmax(0, 1fr); padding: 18px; } }
.gm-week-l, .gm-week-top { min-width: 0; } .gm-week h3, .gm-week p { overflow-wrap: anywhere; }

/* ---------- вопросы от игроков и модерация (v462) ---------- */
.qs-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding: 18px 20px; border-radius: 24px; min-width: 0;
    border: 1px dashed color-mix(in srgb, var(--gold, #ffc93c) 45%, transparent); background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, #ffc93c 12%, transparent), transparent 60%), var(--surface); }
.qs-cta > div:nth-child(2) { flex: 1 1 260px; min-width: 0; }
.qs-cta b { font-size: 16px; }
.qs-cta p { margin: 4px 0 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }
.qs-cta p b { font-size: inherit; color: #ffc93c; }
.qs-cta-ico { flex: none; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; color: #1a1300; background: linear-gradient(135deg, #ffe07a, #ff9d3a); }
.qs-cta-act { display: flex; gap: 8px; flex-wrap: wrap; }
.qs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 13px; cursor: pointer; font: inherit; font-weight: 800; font-size: 13.5px;
    color: var(--text); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); transition: transform .15s; }
.qs-btn:hover { transform: translateY(-1px); }
.qs-btn.is-main { border: 0; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.qs-btn.is-bad { color: #ff5a6e; border-color: color-mix(in srgb, #ff5a6e 35%, transparent); }
.qs-btn.is-sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.qs-btn:disabled { opacity: .6; cursor: default; }
.qs-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border-radius: 24px; color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 94%, #0b1030), var(--bg)); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.qs-dialog.is-wide { width: min(820px, calc(100vw - 24px)); }
.qs-dialog::backdrop { background: rgba(4, 6, 15, .65); backdrop-filter: blur(4px); }
.qs-dialog * { box-sizing: border-box; }
.qs-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .07); color: var(--text); cursor: pointer; z-index: 2; }
.qs-form, .qs-admin { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.qs-form h3, .qs-admin h3 { margin: 0; padding-right: 40px; font-family: 'Russo One', sans-serif; font-weight: 400; font-size: 21px; }
.qs-form h3 i, .qs-admin h3 i { color: #ffc93c; margin-right: 6px; }
.qs-lead { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }
.qs-lead b { color: #ffc93c; }
.qs-l { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.qs-l small { font-weight: 500; color: var(--text-dim); }
.qs-form textarea, .qs-form input[type=text], .qs-search input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-soft); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; resize: vertical; }
.qs-form textarea:focus, .qs-form input[type=text]:focus { outline: 0; border-color: var(--accent); }
.qs-opts { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.qs-opts legend { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.qs-opt { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 8px; }
.qs-opt input[type=radio] { width: 20px; height: 20px; accent-color: #2fd27a; margin: 0; }
.qs-opt b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 12px; background: rgba(255, 255, 255, .08); }
.qs-opt:has(input:checked) b { background: #2fd27a; color: #062b16; }
.qs-err { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; color: #ff5a6e; background: color-mix(in srgb, #ff5a6e 12%, transparent); }
.qs-act { display: flex; justify-content: flex-end; gap: 10px; }
.qs-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.qs-mine h4 { margin: 6px 0 8px; font-size: 14px; }
.qs-mine ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qs-mine li { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); font-size: 13.5px; overflow-wrap: anywhere; }
.qs-mine small { color: var(--text-muted); }
.qs-st { align-self: flex-start; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.qs-st.is-wait { background: color-mix(in srgb, #ffc93c 18%, transparent); color: #ffc93c; }
.qs-st.is-ok { background: color-mix(in srgb, #2fd27a 18%, transparent); color: #2fd27a; }
.qs-st.is-bad { background: color-mix(in srgb, #ff5a6e 18%, transparent); color: #ff5a6e; }
.qs-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.qs-tabs button { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-soft); background: none; color: var(--text-muted); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.qs-tabs button.is-on { color: var(--text); background: rgba(255, 255, 255, .08); border-color: var(--accent); }
.qs-tabs em { font-style: normal; margin-left: 4px; color: #ffc93c; }
.qs-tabs .qs-add { margin-left: auto; color: var(--text); }
.qs-search { display: flex; align-items: center; gap: 8px; }
.qs-search[hidden] { display: none; }
.qs-list { display: grid; gap: 10px; }
.qs-skel { height: 140px; border-radius: 16px; background: rgba(255, 255, 255, .05); }
.qs-empty { margin: 10px 0; text-align: center; color: var(--text-muted); }
.qs-item { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .06); overflow-wrap: anywhere; }
.qs-item.is-off { opacity: .55; }
.qs-who { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.qs-vars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.qs-vars li { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: 13px; min-width: 0; }
.qs-vars li.is-right { background: color-mix(in srgb, #2fd27a 18%, transparent); color: #c8ffe0; }
.qs-vars em { font-style: normal; font-weight: 800; color: var(--text-dim); }
.qs-note { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.qs-item-act { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 560px) { .qs-vars { grid-template-columns: minmax(0, 1fr); } .qs-cta-act, .qs-cta-act .qs-btn { width: 100%; } }

/* ---------- v465: админка игр ---------- */
.gm-edit { position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--border-soft); cursor: pointer;
    display: grid; place-items: center; color: var(--text); background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.gm-edit:hover { color: #ffc93c; border-color: #ffc93c; }
.gm-card.is-off { opacity: .55; filter: grayscale(.6); }
.gm-card.is-off:hover { opacity: .85; }
.gm-off-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #ffc93c; background: rgba(0, 0, 0, .35); }
.ga-switch { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; cursor: pointer; }
.ga-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ga-switch span { position: relative; flex: none; width: 46px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, .15); transition: background .2s; }
.ga-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ga-switch input:checked + span { background: #2fd27a; }
.ga-switch input:checked + span::after { transform: translateX(20px); }
.ga-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ga-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; }
.ga-form input[type=number], .ga-add select, .ga-add input[type=text] { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-soft); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.ga-extra { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.ga-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto auto; gap: 8px; align-items: center; }
.ga-sum { margin: 0; font-size: 14px; } .ga-sum .is-bad { color: #ff5a6e; }
.ga-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 56dvh; overflow: auto; padding: 2px; }
.ga-tile { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: rgba(0, 0, 0, .22); min-width: 0; }
.ga-tile img, .ga-noimg { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.ga-noimg { display: grid; place-items: center; align-content: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.ga-tile figcaption { display: flex; flex-direction: column; min-width: 0; }
.ga-tile figcaption b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ga-tile figcaption small { font-size: 11.5px; color: var(--text-muted); }
.ga-tile.is-off img { opacity: .35; }
.ga-tile.is-miss { outline: 1px dashed color-mix(in srgb, #ff5a6e 60%, transparent); }
.ga-tile label.is-busy { opacity: .5; pointer-events: none; }
@media (max-width: 600px) { .ga-add { grid-template-columns: 1fr 1fr; } .ga-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gm-card:has(> .gm-edit) .gm-top { padding-right: 40px; }
