/* Страница мини-игры. Шапка и переменные — из общего файла облика (look.css или scene.css);
   у самой игры свои тёмные цвета, они не зависят от светлого вида сайта. */

html, body.v4g-page {
    overflow: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100%;
}

.v4g-wrap { padding-top: var(--v4g-top, 72px); }

/* Игровая зона занимает весь экран под шапкой; высоту выставляет game.js */
.v4g-stage {
    position: relative;
    display: grid;
    place-items: center;
    height: calc(100vh - var(--v4g-top, 72px));
    height: calc(100dvh - var(--v4g-top, 72px));
    min-height: 420px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(13, 79, 60, 0.55) 0%, transparent 60%),
        #05070d;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

#v4g-canvas {
    display: block;
    grid-area: 1 / 1;
    background: #0a0f16;
    border-radius: 0;
}
/* во время забега свайпы принадлежат игре, а не прокрутке страницы */
.v4g-playing #v4g-canvas { touch-action: none; cursor: default; }

.v4g-overlay {
    grid-area: 1 / 1;
    position: relative;
    z-index: 2;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(5, 8, 14, 0.9);
    color: #e6ebf3;
    font-family: 'Onest', system-ui, sans-serif;
}
.v4g-overlay[hidden] { display: none; }

.v4g-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 100%;
    padding: 18px 16px 22px;
    text-align: center;
}
.v4g-card { cursor: pointer; }

.v4g-pose { width: 42%; max-width: 190px; height: auto; }
.v4g-menu .v4g-pose { width: 30%; max-width: 130px; }

.v4g-title {
    margin: 0;
    font-family: 'Unbounded', 'Onest', system-ui, sans-serif;
    font-size: clamp(19px, 5.6vw, 26px);
    line-height: 1.2;
    color: #fff;
}
.v4g-sub, .v4g-how { margin: 0; font-size: 14px; line-height: 1.45; color: #a9b8cc; }
.v4g-how { font-size: 13px; color: #8494aa; }
.v4g-days {
    margin: 0;
    padding: 6px 14px;
    border: 1px solid rgba(74, 222, 128, 0.35);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #4ade80;
}
.v4g-quote { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; color: #fff; }
.v4g-score { margin: 0; font-size: 15px; line-height: 1.6; color: #cbd5e1; }

.v4g-levels { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 380px; }
.v4g-level {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid #1e2a38;
    border-radius: 12px;
    background: #11161f;
    color: #e6ebf3;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}
.v4g-level:hover:not(:disabled) { border-color: rgba(74, 222, 128, 0.6); }
.v4g-level:active:not(:disabled) { transform: scale(0.98); }
.v4g-level b {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.14);
    color: #4ade80;
}
.v4g-level > span:nth-child(2) { flex: 1; }
.v4g-locked { opacity: 0.5; cursor: default; }
.v4g-active { border-color: rgba(74, 222, 128, 0.7); }
.v4g-shop .v4g-level > span:first-child { flex: 1; }
.v4g-shop .v4g-level > span:nth-child(2) { flex: 0 0 auto; }
.v4g-group { margin: 6px 0 -4px; font-size: 13px; font-weight: 600; color: #8494aa; text-transform: uppercase; letter-spacing: 0.06em; }
.v4g-pair { display: flex; gap: 8px; width: 100%; max-width: 380px; }
.v4g-pair .v4g-btn { flex: 1; }
.v4g-pair .v4g-lang { flex: 0 0 auto; width: auto; }
.v4g-best { color: #c8a26a; font-weight: 700; }

.v4g-stars { color: #fbbf24; letter-spacing: 2px; white-space: nowrap; }
.v4g-stars i { color: #334155; font-style: normal; }
.v4g-bigstars { font-size: 40px; line-height: 1; }

.v4g-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 380px;
    min-height: 48px;
    padding: 10px 18px;
    border: 1px solid #1e2a38;
    border-radius: 12px;
    background: #11161f;
    color: #e6ebf3;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}
.v4g-btn:hover { border-color: rgba(74, 222, 128, 0.6); }
.v4g-btn:active { transform: scale(0.98); }
.v4g-primary, .v4g-cta { border-color: transparent; background: #4ade80; color: #06140c; }
.v4g-cta { background: transparent; border-color: #4ade80; color: #4ade80; }

.v4g-settings { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 380px; }
.v4g-toggle {
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid #1e2a38;
    border-radius: 999px;
    background: transparent;
    color: #8494aa;
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
}
.v4g-toggle[aria-pressed="true"] { border-color: rgba(74, 222, 128, 0.5); color: #4ade80; background: rgba(74, 222, 128, 0.1); }

.v4g-noscript { grid-area: 1 / 1; z-index: 3; padding: 20px; color: #e6ebf3; text-align: center; }

/* Текст под игрой */
.v4g-about {
    max-width: 760px;
    margin: 0 auto;
    padding: 36px 24px 72px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.65;
}
.v4g-about h2 { margin: 0 0 12px; font-family: var(--font-display, inherit); font-size: 22px; color: var(--text); }
.v4g-about p { margin: 0 0 12px; }
.v4g-about a { color: var(--accent-bright); }
.v4g-about-cta { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
    .v4g-level, .v4g-btn { transition: none; }
}
