/*
 * HITG v7.15.30 - game-only page shell.
 * The post/article wrapper comes from templates/single-hit_game.php, not Chronos.
 * Scope all rules to its own main element so the site's header/footer and
 * regular posts/pages stay exactly as configured in the active theme.
 */
body.single-hit_game {
    background: #f2e7df;
    overflow-x: clip;
}

body.single-hit_game .hitg-page,
body.single-hit_game .hitg-page *,
body.single-hit_game .hitg-page *::before,
body.single-hit_game .hitg-page *::after {
    box-sizing: border-box;
}

body.single-hit_game main.hitg-page {
    display: block;
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: clamp(20px, 3.2vw, 48px) clamp(12px, 3vw, 40px) clamp(48px, 6vw, 96px);
    background: #f2e7df !important;
    color: #29221d;
    direction: rtl;
}

body.single-hit_game .hitg-page__inner {
    width: 100%;
    max-width: 1320px;
    min-width: 0;
    margin-inline: auto;
}

body.single-hit_game .hitg-page__navigation {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto clamp(20px, 4vw, 48px);
}

body.single-hit_game .hitg-page__back {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: 9px 14px;
    border: 1px solid #d8c5b5;
    border-radius: 999px;
    background: rgba(255, 255, 255, .6);
    color: #58402d;
    font-size: .875rem;
    line-height: 1.45;
    font-weight: 650;
    text-decoration: none;
    transition: background-color .2s, border-color .2s;
}

body.single-hit_game .hitg-page__back:hover,
body.single-hit_game .hitg-page__back:focus-visible {
    background: #fff;
    border-color: #93714e;
    color: #342b24;
}
body.single-hit_game .hitg-page__back:focus-visible {
    outline: 3px solid #86632d;
    outline-offset: 3px;
}

body.single-hit_game .hitg-page__header {
    width: 100%;
    max-width: 920px;
    min-width: 0;
    margin: 0 auto clamp(20px, 3.5vw, 42px);
    text-align: center;
}
body.single-hit_game .hitg-page__eyebrow {
    display: inline-block;
    margin-bottom: clamp(9px, 2vw, 16px);
    color: #80643d;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .02em;
}
body.single-hit_game .hitg-page__title {
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: #271b1b;
    font-size: clamp(1.85rem, 4.3vw, 3.6rem);
    font-weight: 800;
    line-height: 1.2;
    text-align: center !important;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
body.single-hit_game .hitg-page__summary {
    max-width: 780px;
    margin: clamp(12px, 2.4vw, 20px) auto 0;
    color: #6a5a4d;
    font-size: clamp(.98rem, 1.7vw, 1.2rem);
    line-height: 1.7;
    text-align: center;
    overflow-wrap: anywhere;
}

body.single-hit_game .hitg-page__article,
body.single-hit_game .hitg-page__content {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none;
}

/*
 * Never break out of a narrow theme container using viewport offsets.
 * A game's own saved --hitg-game-max-width setting is honored, bounded by
 * the shell and available screen space.
 */
body.single-hit_game .hitg-page .hitg-game {
    position: relative;
    inset-inline: auto;
    left: auto;
    right: auto;
    width: 100% !important;
    max-width: min(100%, var(--hitg-game-max-width, 1120px)) !important;
    min-width: 0;
    margin: 0 auto clamp(24px, 4vw, 52px) !important;
    transform: none;
}

/* Custom/embed games need a wider but still bounded area. */
body.single-hit_game .hitg-page .hitg-k26,
body.single-hit_game .hitg-page .hitg-page__content--manual > .hitg-game {
    position: relative;
    inset-inline: auto;
    left: auto;
    right: auto;
    width: 100% !important;
    max-width: min(100%, 1240px) !important;
    min-width: 0;
    margin: 0 auto clamp(24px, 4vw, 52px) !important;
    transform: none;
}

body.single-hit_game .hitg-page__content > :not(.hitg-game):not(.hitg-k26) {
    max-width: 100%;
}

body.single-hit_game .hitg-page__content :is(img, video, iframe, canvas) {
    max-width: 100%;
}
body.single-hit_game .hitg-page__content img,
body.single-hit_game .hitg-page__content video {
    height: auto;
}
body.single-hit_game .hitg-page__content :is(.hitg-game, .hitg-k26, .hitg-shell, .hitg-stage) {
    min-width: 0;
}

/* Let mobile HUD grids shrink without widening the page. */
body.single-hit_game .hitg-page__content :is(.hitg-grid, .hitg-k26__layout, .hitg-k26__shell) {
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 760px) {
    body.single-hit_game main.hitg-page {
        padding: 18px 12px 48px;
    }
    body.single-hit_game .hitg-page__navigation {
        margin-bottom: 25px;
    }
    body.single-hit_game .hitg-page__header {
        margin-bottom: 24px;
    }
    body.single-hit_game .hitg-page .hitg-game,
    body.single-hit_game .hitg-page .hitg-k26 {
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: auto !important;
        transform: none !important;
    }
}

@media (max-width: 480px) {
    body.single-hit_game main.hitg-page { padding-inline: 8px; }
    body.single-hit_game .hitg-page__title { font-size: clamp(1.6rem, 7.8vw, 2.1rem); }
    body.single-hit_game .hitg-page__summary { font-size: .96rem; }
    body.single-hit_game .hitg-page__back { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    body.single-hit_game .hitg-page__back { transition: none; }
}
