:root {
    --hitg-gold: #9b7427;
    --hitg-gold-strong: #73531a;
    --hitg-gold-soft: #f4ead3;
    --hitg-ink: #171512;
    --hitg-text: #2b2924;
    --hitg-muted: #6b665d;
    --hitg-stone: #f8f6f1;
    --hitg-white: #f2e7df;
    --hitg-border: #ddd6c8;
    --hitg-success: #28784a;
    --hitg-success-soft: #eef8f2;
    --hitg-danger: #9a433c;
    --hitg-danger-soft: #fbefee;
}

.hitg-game,
.hitg-games-browser,
.hitg-grid,
.hitg-game *,
.hitg-games-browser *,
.hitg-grid * {
    box-sizing: border-box;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================
   SINGLE GAME
   ========================= */

.hitg-game {
    width: 100%;
    max-width: var(--hitg-game-max-width, 920px);
    margin: 34px auto 44px;
    color: var(--hitg-text);
    font: inherit;
}

.hitg-shell {
    overflow: hidden;
    border: 1px solid var(--hitg-border);
    border-radius: var(--hitg-shell-radius, 22px);
    background: var(--hitg-white);
    box-shadow: 0 18px 48px rgba(34, 27, 15, .08);
}

.hitg-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    padding: 13px clamp(18px, 4vw, 30px);
    background:
        radial-gradient(circle at 15% 20%, rgba(155, 116, 39, .26), transparent 26%),
        linear-gradient(135deg, #171512, #252119);
    color: #fff;
}

.hitg-wordmark {
    min-width: 0;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.hitg-wordmark strong {
    color: #d7b260;
    font-weight: 900;
}

.hitg-all-games-link,
.hitg-all-games-link:visited {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 6px 11px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    color: #f4ead3 !important;
    font-size: .86rem;
    font-weight: 800;
    text-decoration: none !important;
}

.hitg-all-games-link::after {
    content: "←";
    margin-inline-start: 7px;
}

.hitg-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 22px clamp(18px, 4vw, 34px) 10px;
    color: var(--hitg-muted);
    font-size: .92rem;
    font-weight: 700;
}

.hitg-score-text {
    color: var(--hitg-gold-strong);
    font-weight: 900;
}

.hitg-progress {
    height: 8px;
    overflow: hidden;
    margin: 0 clamp(18px, 4vw, 34px) 4px;
    border-radius: 999px;
    background: #ece7dd;
}

.hitg-progress > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--hitg-gold-strong), #c69a43);
    transition: width .28s ease;
}

.hitg-stage {
    padding: clamp(22px, 5vw, 40px) clamp(18px, 5vw, 42px) clamp(26px, 5vw, 44px);
}

.hitg-shell.is-start .hitg-status,
.hitg-shell.is-start .hitg-progress {
    display: none;
}

.hitg-start {
    max-width: 690px;
    margin: 0 auto;
    padding: clamp(10px, 3vw, 24px) 0;
    text-align: center;
}

.hitg-start-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-bottom: 14px;
    padding: 5px 11px;
    border: 1px solid #d7c49e;
    border-radius: 999px;
    background: var(--hitg-gold-soft);
    color: var(--hitg-gold-strong);
    font-size: .82rem;
    font-weight: 900;
}

.hitg-start h2 {
    margin: 0 0 13px;
    color: var(--hitg-ink);
    font-size: clamp(1.9rem, 5vw, 3.1rem);
    line-height: 1.12;
    letter-spacing: -.025em;
}

.hitg-start-description {
    max-width: 620px;
    margin: 0 auto;
    color: var(--hitg-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.hitg-start-context {
    max-width: 620px;
    margin: 22px auto 0;
    padding: 16px 18px;
    border: 1px solid rgba(117, 84, 29, .22);
    border-radius: 14px;
    background: #fbf8f1;
    color: var(--hitg-ink);
    text-align: right;
}

.hitg-start-context h3 {
    margin: 0 0 6px;
    color: var(--hitg-gold-strong);
    font-size: .9rem;
    font-weight: 900;
}

.hitg-start-context p {
    margin: 0;
    color: var(--hitg-muted);
    font-size: .96rem;
    line-height: 1.72;
}

.hitg-start-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
}

.hitg-start-meta span {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid var(--hitg-border);
    border-radius: 999px;
    background: var(--hitg-stone);
    color: #514c43;
    font-size: .9rem;
    font-weight: 700;
}

.hitg-best-start {
    margin: -8px 0 20px;
    color: var(--hitg-gold-strong);
    font-size: .92rem;
    font-weight: 800;
}

.hitg-question-content {
    min-width: 0;
}

.hitg-question-title {
    margin: 0 0 22px;
    color: var(--hitg-ink);
    font-size: clamp(1.45rem, 3.5vw, 2.25rem);
    line-height: 1.32;
    letter-spacing: -.015em;
}

.hitg-question-image {
    display: block;
    width: 100%;
    max-height: 430px;
    object-fit: contain;
    margin: 0 auto 24px;
    padding: 8px;
    border: 1px solid var(--hitg-border);
    border-radius: 16px;
    background: #fbf6f2;
}

.hitg-question-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.hitg-answers,
.hitg-earlier-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 22px !important;
}

.hitg-answer-option,
.hitg-earlier-option {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 66px;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid #d8d1c5;
    border-radius: 13px;
    background: #fbf6f2;
    color: var(--hitg-text);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.hitg-earlier-option {
    min-height: 118px;
    justify-content: center;
    text-align: center;
    font-size: 1.06rem;
    font-weight: 800;
}

.hitg-answer-option input,
.hitg-earlier-option input {
    flex: 0 0 auto;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    accent-color: var(--hitg-gold) !important;
}

.hitg-answer-option span,
.hitg-earlier-option span {
    min-width: 0;
}

.hitg-answer-option:has(input:checked),
.hitg-earlier-option:has(input:checked) {
    border-color: var(--hitg-gold);
    background: #fbf7ee;
    box-shadow: 0 0 0 2px rgba(155, 116, 39, .08);
}

.hitg-answer-option.is-correct,
.hitg-earlier-option.is-correct {
    border-color: var(--hitg-success) !important;
    background: var(--hitg-success-soft) !important;
}

.hitg-answer-option.is-wrong,
.hitg-earlier-option.is-wrong {
    border-color: var(--hitg-danger) !important;
    background: var(--hitg-danger-soft) !important;
}

.hitg-answer-mark {
    margin-inline-start: auto;
    color: inherit;
    font-size: .78rem;
    font-weight: 900;
}

.hitg-answer-option.is-correct .hitg-answer-mark,
.hitg-earlier-option.is-correct .hitg-answer-mark {
    color: var(--hitg-success);
}

.hitg-answer-option.is-wrong .hitg-answer-mark,
.hitg-earlier-option.is-wrong .hitg-answer-mark {
    color: var(--hitg-danger);
}

.hitg-year-field {
    max-width: 390px;
    margin-bottom: 20px;
}

.hitg-year-field label,
.hitg-share-fallback label {
    display: block;
    margin-bottom: 7px;
    color: var(--hitg-ink);
    font-weight: 800;
}

.hitg-year-field input,
.hitg-share-fallback input,
.hitg-game-search input {
    width: 100% !important;
    min-height: 48px !important;
    padding: 10px 13px !important;
    border: 1px solid #cfc7b9 !important;
    border-radius: 11px !important;
    background: #fbf6f2 !important;
    color: var(--hitg-text) !important;
    font: inherit !important;
    box-shadow: none !important;
}

.hitg-year-field input.is-correct {
    border-color: var(--hitg-success) !important;
    background: var(--hitg-success-soft) !important;
}

.hitg-year-field input.is-wrong {
    border-color: var(--hitg-danger) !important;
    background: var(--hitg-danger-soft) !important;
}

.hitg-button,
.hitg-related-link,
.hitg-card-cta,
.hitg-filter-button {
    appearance: none !important;
    display: inline-flex !important;
    min-height: 46px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 18px !important;
    border-radius: 10px !important;
    font: inherit !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: none !important;
    text-transform: none !important;
}

.hitg-primary,
.hitg-primary:hover,
.hitg-primary:focus,
.hitg-card-cta,
.hitg-card-cta:hover,
.hitg-card-cta:focus {
    border: 1px solid var(--hitg-gold) !important;
    background: var(--hitg-gold) !important;
    color: #fff !important;
}

.hitg-primary:hover,
.hitg-primary:focus-visible {
    border-color: var(--hitg-gold-strong) !important;
    background: var(--hitg-gold-strong) !important;
}

.hitg-secondary,
.hitg-secondary:hover,
.hitg-secondary:focus,
.hitg-related-link,
.hitg-related-link:hover,
.hitg-related-link:focus {
    border: 1px solid var(--hitg-gold) !important;
    background: #fbf6f2 !important;
    color: var(--hitg-gold-strong) !important;
}

.hitg-secondary:hover,
.hitg-related-link:hover {
    background: var(--hitg-gold-soft) !important;
}

.hitg-button:disabled {
    opacity: .58 !important;
    cursor: not-allowed !important;
}

.hitg-button:focus-visible,
.hitg-related-link:focus-visible,
.hitg-card-link:focus-visible,
.hitg-filter-button:focus-visible,
.hitg-all-games-link:focus-visible,
.hitg-answer-option:has(input:focus-visible),
.hitg-earlier-option:has(input:focus-visible),
.hitg-year-field input:focus-visible,
.hitg-share-fallback input:focus-visible,
.hitg-game-search input:focus-visible {
    outline: 3px solid #c9a14d !important;
    outline-offset: 3px !important;
}

.hitg-feedback {
    position: relative;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--hitg-border);
    border-radius: 13px;
    background: var(--hitg-stone);
}

.hitg-feedback.is-correct {
    border-color: var(--hitg-success);
    background: var(--hitg-success-soft);
}

.hitg-feedback.is-wrong {
    border-color: var(--hitg-danger);
    background: var(--hitg-danger-soft);
}

.hitg-feedback-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.hitg-feedback-symbol {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--hitg-gold);
    color: #fff;
    font-weight: 900;
}

.hitg-feedback.is-correct .hitg-feedback-symbol { background: var(--hitg-success); }
.hitg-feedback.is-wrong .hitg-feedback-symbol { background: var(--hitg-danger); }

.hitg-feedback h3 {
    margin: 0;
    color: var(--hitg-ink);
    font-size: 1.2rem;
}

.hitg-feedback p {
    margin: 9px 0 14px;
    line-height: 1.7;
}

.hitg-feedback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 15px;
}

.hitg-result {
    max-width: 690px;
    margin: 0 auto;
    padding: clamp(12px, 3vw, 26px) 0;
    text-align: center;
}

.hitg-result-badge {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    margin: 0 auto 16px;
    border: 1px solid #d8c08d;
    border-radius: 50%;
    background: var(--hitg-gold-soft);
    color: var(--hitg-gold-strong);
    font-size: 1.45rem;
    font-weight: 900;
}

.hitg-result h2 {
    margin: 0 0 8px;
    color: var(--hitg-ink);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
}

.hitg-result-message {
    margin: 0 auto 18px;
    color: var(--hitg-muted);
    line-height: 1.65;
}

.hitg-result-score {
    margin: 0;
    color: var(--hitg-gold-strong);
    font-size: clamp(2.6rem, 8vw, 4.8rem);
    font-weight: 900;
    line-height: 1.05;
}

.hitg-result-percent {
    margin: 8px 0 5px;
    color: var(--hitg-text);
    font-weight: 800;
}

.hitg-best {
    margin: 5px 0 0;
    color: var(--hitg-muted);
    font-size: .92rem;
}

.hitg-result-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 23px;
}

.hitg-result-all-games {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    margin-top: 12px;
    color: var(--hitg-gold-strong) !important;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hitg-share-fallback {
    max-width: 520px;
    margin: 22px auto 0;
    text-align: start;
}

.hitg-empty {
    padding: 18px;
    border: 1px solid var(--hitg-border);
    border-radius: 12px;
    background: var(--hitg-stone);
}

/* =========================
   GAMES DIRECTORY SHORTCODE
   ========================= */

.hitg-games-browser {
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
}

.hitg-browser-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 0 22px;
}

.hitg-filter-buttons {
    display: flex;
    flex: 1 1 620px;
    flex-wrap: wrap;
    gap: 8px;
}

.hitg-filter-button,
.hitg-filter-button:hover,
.hitg-filter-button:focus {
    min-height: 40px !important;
    padding: 7px 13px !important;
    border: 1px solid var(--hitg-border) !important;
    border-radius: 999px !important;
    background: #fbf6f2 !important;
    color: var(--hitg-text) !important;
    font-size: .88rem !important;
}

.hitg-filter-button.is-active,
.hitg-filter-button.is-active:hover,
.hitg-filter-button.is-active:focus {
    border-color: var(--hitg-gold) !important;
    background: var(--hitg-gold-soft) !important;
    color: var(--hitg-gold-strong) !important;
}

.hitg-game-search {
    flex: 0 1 230px;
    min-width: min(230px, 100%);
}

.hitg-game-search input {
    min-height: 42px !important;
}

.hitg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.hitg-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--hitg-border);
    border-radius: 17px;
    background: #fbf6f2;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hitg-card[hidden] {
    display: none !important;
}

.hitg-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    color: inherit !important;
    text-decoration: none !important;
}

.hitg-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.hitg-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.hitg-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 9px;
}

.hitg-card-type {
    color: var(--hitg-gold-strong);
    font-size: .84rem;
    font-weight: 900;
}

.hitg-card-count {
    color: var(--hitg-muted);
    font-size: .8rem;
    font-weight: 700;
}

.hitg-card h2 {
    margin: 0 0 9px;
    color: var(--hitg-ink);
    font-size: 1.22rem;
    line-height: 1.4;
}

.hitg-card p {
    margin: 0 0 18px;
    color: var(--hitg-muted);
    line-height: 1.6;
}

.hitg-card-cta {
    align-self: flex-start;
    min-height: 41px !important;
    margin-top: auto;
}

.hitg-no-results {
    margin: 22px 0 0;
    padding: 20px;
    border: 1px dashed #cfc4b1;
    border-radius: 12px;
    background: var(--hitg-stone);
    color: var(--hitg-muted);
    text-align: center;
}

@media (hover: hover) and (pointer: fine) {
    .hitg-answer-option:hover,
    .hitg-earlier-option:hover {
        border-color: #b99854;
        transform: translateY(-1px);
    }

    .hitg-card:hover {
        transform: translateY(-4px);
        border-color: #b99854;
        box-shadow: 0 13px 30px rgba(38, 29, 14, .08);
    }

    .hitg-all-games-link:hover {
        border-color: rgba(255,255,255,.42);
        background: rgba(255,255,255,.06);
    }
}

@media (max-width: 850px) {
    .hitg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .hitg-game {
        margin-block: 24px 34px;
    }

    .hitg-shell {
        border-radius: 16px;
    }

    .hitg-topbar {
        min-height: 54px;
        padding-inline: 16px;
    }

    .hitg-wordmark {
        font-size: .82rem;
    }

    .hitg-all-games-link {
        min-height: 34px;
        padding-inline: 9px;
        font-size: .8rem;
    }

    .hitg-status {
        padding-inline: 17px;
    }

    .hitg-progress {
        margin-inline: 17px;
    }

    .hitg-stage {
        padding: 22px 17px 27px;
    }

    .hitg-answers,
    .hitg-earlier-grid,
    .hitg-grid {
        grid-template-columns: 1fr;
    }

    .hitg-earlier-option {
        min-height: 82px;
    }

    .hitg-button,
    .hitg-related-link {
        width: 100% !important;
        margin-inline-end: 0 !important;
    }

    .hitg-feedback-actions,
    .hitg-result-actions {
        flex-direction: column;
    }

    .hitg-browser-tools {
        align-items: stretch;
    }

    .hitg-game-search {
        flex-basis: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hitg-progress > span,
    .hitg-answer-option,
    .hitg-earlier-option,
    .hitg-card {
        transition: none !important;
    }

    .hitg-answer-option:hover,
    .hitg-earlier-option:hover,
    .hitg-card:hover {
        transform: none !important;
    }
}

/* =========================================================
   HISTORY IS TOLD GAMES 3.0 - INTERACTION & ANIMATION LAYER
   ========================================================= */

.hitg-question-form > .hitg-button.hitg-primary {
    display: flex !important;
    width: fit-content !important;
    min-width: 220px !important;
    margin: 24px auto 0 !important;
}

.hitg-feedback-actions {
    justify-content: center;
}

.hitg-stage-enter {
    animation: hitg-stage-in .42s cubic-bezier(.2,.8,.2,1) both;
}

.hitg-shell.is-correct-flash {
    animation: hitg-shell-correct .55s ease both;
}

.hitg-shell.is-wrong-flash {
    animation: hitg-shell-wrong .42s ease both;
}

.hitg-start-emblem {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    margin: 0 auto 16px;
    border: 1px solid #d9c18c;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,.92), rgba(244,234,211,.88) 46%, rgba(155,116,39,.13) 100%);
    color: var(--hitg-gold-strong);
    font-size: 1.75rem;
    font-weight: 900;
    box-shadow: 0 9px 28px rgba(95,69,22,.12);
    animation: hitg-emblem-breathe 3.5s ease-in-out infinite;
}

.hitg-button {
    position: relative;
    overflow: hidden;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease !important;
}

.hitg-button::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.2) 46%, transparent 72%);
    transform: translateX(130%);
}

@media (hover:hover) and (pointer:fine) {
    .hitg-button:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(86,61,17,.14) !important;
    }
    .hitg-button:hover:not(:disabled)::after {
        animation: hitg-button-shine .65s ease;
    }
}

.hitg-button:active:not(:disabled) {
    transform: translateY(0) scale(.985);
}

.hitg-answer-option.is-correct,
.hitg-earlier-option.is-correct,
.hitg-timeline-item.is-correct {
    animation: hitg-answer-correct .45s ease both;
}

.hitg-answer-option.is-wrong,
.hitg-earlier-option.is-wrong,
.hitg-timeline-item.is-wrong {
    animation: hitg-answer-wrong .36s ease both;
}

/* Timer */
.hitg-timer {
    position: relative;
    height: 12px;
    overflow: visible;
    margin: 0 0 22px;
    border-radius: 999px;
    background: #ece7dc;
    box-shadow: inset 0 0 0 1px rgba(98,76,32,.08);
}

.hitg-timer > span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #73531a, #c99b3d, #e4c67d);
    transition: width .1s linear;
}

.hitg-timer > strong {
    position: absolute;
    inset-inline-end: 0;
    top: -29px;
    display: grid;
    min-width: 30px;
    height: 25px;
    place-items: center;
    border: 1px solid #d7c49e;
    border-radius: 999px;
    background: #fbf6f2;
    color: var(--hitg-gold-strong);
    font-size: .78rem;
    font-weight: 900;
}

.hitg-timer.is-low > span {
    background: linear-gradient(90deg, #86382f, #b95c4f);
    animation: hitg-timer-pulse .7s ease-in-out infinite alternate;
}

.hitg-timer.is-low > strong {
    border-color: #d5aaa4;
    color: var(--hitg-danger);
}

/* Gold media frame */
.hitg-media-frame {
    position: relative;
    overflow: hidden;
    margin: 0 auto 24px;
    border: 1px solid #d6c9ad;
    border-radius: 18px;
    background: linear-gradient(145deg, #fbf6f2, #f2e7df);
    box-shadow: 0 12px 30px rgba(53,41,17,.07);
}

.hitg-media-frame .hitg-question-image {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

/* Quote game */
.hitg-quote {
    position: relative;
    max-width: 760px;
    margin: 0 auto 26px;
    padding: clamp(24px, 5vw, 38px) clamp(22px, 5vw, 44px);
    border: 1px solid #d9cfbb;
    border-radius: 18px;
    background:
        radial-gradient(circle at 90% 12%, rgba(155,116,39,.10), transparent 30%),
        #fbf9f4;
    color: var(--hitg-ink);
    font-size: clamp(1.25rem, 3.4vw, 1.8rem);
    font-weight: 700;
    line-height: 1.65;
    text-align: center;
}

.hitg-quote::before {
    content: "״";
    position: absolute;
    inset-inline-start: 18px;
    top: 2px;
    color: rgba(155,116,39,.32);
    font-size: 4.8rem;
    font-weight: 900;
    line-height: 1;
}

/* Timeline */
.hitg-timeline-list {
    display: grid;
    gap: 10px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.hitg-timeline-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 11px 13px;
    border: 1px solid #d9d1c3;
    border-radius: 14px;
    background: #fbf6f2;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.hitg-timeline-number {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: var(--hitg-gold-soft);
    color: var(--hitg-gold-strong);
    font-weight: 900;
}

.hitg-timeline-text {
    min-width: 0;
    color: var(--hitg-text);
    font-weight: 800;
    line-height: 1.45;
}

.hitg-timeline-controls {
    display: flex;
    gap: 5px;
}

.hitg-mini-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 1px solid #cfbf9f;
    border-radius: 9px;
    background: #fbf6f2;
    color: var(--hitg-gold-strong);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.hitg-mini-button:disabled { opacity: .35; cursor: default; }
.hitg-timeline-item.is-correct { border-color: var(--hitg-success); background: var(--hitg-success-soft); }
.hitg-timeline-item.is-wrong { border-color: var(--hitg-danger); background: var(--hitg-danger-soft); }

/* Reveal game */
.hitg-reveal-frame {
    isolation: isolate;
}

.hitg-reveal-frame img {
    transition: filter .42s ease, transform .42s ease, opacity .42s ease;
}

.hitg-reveal-frame.reveal-0 img { filter: blur(22px) saturate(.35); transform: scale(1.13); opacity: .62; }
.hitg-reveal-frame.reveal-1 img { filter: blur(13px) saturate(.55); transform: scale(1.09); opacity: .72; }
.hitg-reveal-frame.reveal-2 img { filter: blur(6px) saturate(.8); transform: scale(1.045); opacity: .86; }
.hitg-reveal-frame.reveal-3 img { filter: none; transform: none; opacity: 1; }

.hitg-reveal-button {
    display: flex !important;
    width: fit-content !important;
    min-width: 190px !important;
    margin: -9px auto 22px !important;
}

/* =========================
   DYNAMIC FLAG GAMES
   ========================= */

.hitg-type-flag_quiz .hitg-shell {
    background:
        radial-gradient(circle at 10% 0%, rgba(155,116,39,.06), transparent 25%),
        #fff;
}

.hitg-flag-orbit {
    position: relative;
    display: grid;
    width: 104px;
    height: 104px;
    place-items: center;
    margin: 0 auto 18px;
}

.hitg-flag-orbit b {
    position: relative;
    z-index: 3;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid #d7c18f;
    border-radius: 50%;
    background: #fbf6f2;
    color: var(--hitg-gold-strong);
    font-size: 1.75rem;
    box-shadow: 0 8px 24px rgba(58,43,14,.12);
}

.hitg-flag-orbit span {
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(155,116,39,.28);
    border-radius: 50%;
    animation: hitg-orbit-spin 6s linear infinite;
}

.hitg-flag-orbit span:nth-child(2) { inset: 17px; animation-duration: 4.5s; animation-direction: reverse; }
.hitg-flag-orbit span:nth-child(3) { inset: 28px; animation-duration: 3.3s; }
.hitg-flag-orbit span::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    top: -4px;
    left: 50%;
    border-radius: 50%;
    background: #b88a31;
    box-shadow: 0 0 0 4px rgba(184,138,49,.10);
}

.hitg-flag-frame {
    --rx: 0deg;
    --ry: 0deg;
    position: relative;
    width: min(100%, 690px);
    margin: 0 auto 26px;
    padding: 4px;
    border-radius: 22px;
    background: conic-gradient(from var(--hitg-angle, 0deg), #725016, #d4af37, #fff0b2, #9b7427, #4e3510, #d4af37, #725016);
    box-shadow: 0 16px 42px rgba(87,62,17,.17);
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
    transform-style: preserve-3d;
    transition: transform .15s ease;
    animation: hitg-gold-frame 4.8s linear infinite;
}

.hitg-flag-frame::before {
    content: "";
    position: absolute;
    inset: -10px;
    z-index: -1;
    border-radius: 28px;
    background: radial-gradient(circle, rgba(212,175,55,.22), transparent 68%);
    filter: blur(12px);
    opacity: .75;
}

.hitg-flag-frame-inner {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.94), rgba(248,245,238,.98));
}

.hitg-flag-frame img {
    display: block;
    width: 100%;
    height: clamp(230px, 42vw, 410px);
    object-fit: contain;
    padding: clamp(15px, 3vw, 28px);
    animation: hitg-flag-enter .55s cubic-bezier(.16,.84,.34,1) both;
}

.hitg-flag-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.72) 47%, transparent 67%);
    transform: translateX(120%);
    animation: hitg-flag-shine 3.7s ease-in-out infinite 1s;
}

.hitg-flag-name-options,
.hitg-flag-image-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
    margin: 0 auto;
}

.hitg-flag-name-option,
.hitg-flag-image-option {
    appearance: none;
    position: relative;
    min-height: 62px;
    padding: 14px 16px;
    border: 1px solid #d8d0c2;
    border-radius: 14px;
    background: #fbf6f2;
    color: var(--hitg-text);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform .17s ease, border-color .17s ease, box-shadow .17s ease, background .17s ease;
}

.hitg-flag-image-option {
    min-height: 148px;
    padding: 9px;
}

.hitg-mini-flag-frame {
    display: grid;
    height: 125px;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: #f7f5ef;
}

.hitg-mini-flag-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.hitg-option-index {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: rgba(23,21,18,.82);
    color: #fff;
    font-size: .76rem;
    font-weight: 900;
}

@media (hover:hover) and (pointer:fine) {
    .hitg-flag-name-option:hover,
    .hitg-flag-image-option:hover {
        transform: translateY(-3px);
        border-color: #b78a33;
        box-shadow: 0 10px 24px rgba(69,51,19,.10);
    }
}

.hitg-flag-name-option.is-correct,
.hitg-flag-image-option.is-correct {
    border-color: var(--hitg-success) !important;
    background: var(--hitg-success-soft) !important;
    box-shadow: 0 0 0 3px rgba(40,120,74,.08) !important;
    animation: hitg-answer-correct .45s ease both;
}

.hitg-flag-name-option.is-wrong,
.hitg-flag-image-option.is-wrong {
    border-color: var(--hitg-danger) !important;
    background: var(--hitg-danger-soft) !important;
    animation: hitg-answer-wrong .36s ease both;
}

.hitg-flag-name-option:disabled,
.hitg-flag-image-option:disabled { cursor: default; }

/* Memory */
.hitg-memory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 12px;
    perspective: 1000px;
}

.hitg-memory-card {
    appearance: none;
    min-width: 0;
    aspect-ratio: 1 / .82;
    padding: 0;
    border: 0;
    background: transparent;
    perspective: 800px;
    cursor: pointer;
}

.hitg-memory-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .48s cubic-bezier(.2,.78,.2,1);
}

.hitg-memory-card.is-open .hitg-memory-inner,
.hitg-memory-card.is-matched .hitg-memory-inner { transform: rotateY(180deg); }

.hitg-memory-front,
.hitg-memory-back {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d7c9ab;
    border-radius: 14px;
    backface-visibility: hidden;
}

.hitg-memory-front {
    background:
        radial-gradient(circle at 30% 20%, rgba(212,175,55,.22), transparent 35%),
        linear-gradient(135deg, #201d18, #11100e);
    color: #d9b55f;
    font-size: 2rem;
    font-weight: 900;
}

.hitg-memory-back {
    padding: 9px;
    transform: rotateY(180deg);
    background: #fbf6f2;
    color: var(--hitg-text);
    font-weight: 900;
    line-height: 1.3;
    text-align: center;
}

.hitg-memory-back img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hitg-memory-card.is-matched .hitg-memory-back {
    border-color: var(--hitg-success);
    background: var(--hitg-success-soft);
    animation: hitg-memory-match .45s ease both;
}

.hitg-memory-card.is-wrong .hitg-memory-back { border-color: var(--hitg-danger); }

/* Result ring */
.hitg-result-ring {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: conic-gradient(var(--hitg-gold) var(--hitg-result, 0deg), #ece6da 0);
    animation: hitg-result-in .7s cubic-bezier(.2,.8,.2,1) both;
}

.hitg-result-ring .hitg-result-badge {
    width: 72px;
    height: 72px;
    margin: 0;
    border: 0;
    background: #fbf6f2;
    box-shadow: inset 0 0 0 1px #dfd4c0;
}

.hitg-result-streak {
    margin: 8px 0 0;
    color: var(--hitg-gold-strong);
    font-weight: 800;
}

/* Particle burst */
.hitg-burst {
    position: absolute;
    z-index: 40;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.hitg-burst i {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: #c69a43;
    animation: hitg-particle .78s cubic-bezier(.1,.7,.2,1) forwards;
    animation-delay: var(--delay, 0ms);
}

.hitg-burst i:nth-child(3n) { border-radius: 50%; background: #73531a; }
.hitg-burst i:nth-child(4n) { width: 4px; height: 10px; background: #dfc27c; }

@property --hitg-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes hitg-stage-in {
    from { opacity: 0; transform: translateY(11px) scale(.995); }
    to { opacity: 1; transform: none; }
}
@keyframes hitg-shell-correct {
    0%,100% { box-shadow: 0 18px 48px rgba(34,27,15,.08); }
    45% { box-shadow: 0 18px 52px rgba(40,120,74,.18); }
}
@keyframes hitg-shell-wrong {
    0%,100% { transform: translateX(0); }
    28% { transform: translateX(4px); }
    55% { transform: translateX(-4px); }
    78% { transform: translateX(2px); }
}
@keyframes hitg-emblem-breathe {
    0%,100% { transform: scale(1); box-shadow: 0 9px 28px rgba(95,69,22,.12); }
    50% { transform: scale(1.035); box-shadow: 0 12px 34px rgba(95,69,22,.18); }
}
@keyframes hitg-button-shine { to { transform: translateX(-130%); } }
@keyframes hitg-answer-correct { 0%{transform:scale(.985)} 56%{transform:scale(1.018)} 100%{transform:scale(1)} }
@keyframes hitg-answer-wrong { 0%,100%{transform:translateX(0)} 30%{transform:translateX(4px)} 65%{transform:translateX(-4px)} }
@keyframes hitg-timer-pulse { from{opacity:.72} to{opacity:1} }
@keyframes hitg-orbit-spin { to { transform: rotate(360deg); } }
@keyframes hitg-gold-frame { to { --hitg-angle: 360deg; } }
@keyframes hitg-flag-enter { from { opacity:0; transform:scale(.93) rotate(-.4deg); } to { opacity:1; transform:none; } }
@keyframes hitg-flag-shine { 0%,58%{transform:translateX(125%)} 80%,100%{transform:translateX(-125%)} }
@keyframes hitg-memory-match { 50%{transform:rotateY(180deg) scale(1.04)} 100%{transform:rotateY(180deg) scale(1)} }
@keyframes hitg-result-in { from{opacity:0;transform:scale(.75) rotate(-12deg)} to{opacity:1;transform:none} }
@keyframes hitg-particle { from{opacity:1;transform:translate(0,0) rotate(0)} to{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--rot))} }

@media (max-width: 700px) {
    .hitg-question-form > .hitg-button.hitg-primary,
    .hitg-reveal-button { width: 100% !important; min-width: 0 !important; }
    .hitg-flag-name-options,
    .hitg-flag-image-options { grid-template-columns: 1fr; }
    .hitg-flag-image-option { min-height: 132px; }
    .hitg-memory-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
    .hitg-timeline-item { grid-template-columns: 36px minmax(0,1fr); }
    .hitg-timeline-controls { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 430px) {
    .hitg-memory-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .hitg-flag-frame-inner { min-height: 190px; }
    .hitg-flag-frame img { height: 225px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .hitg-stage-enter,
    .hitg-shell.is-correct-flash,
    .hitg-shell.is-wrong-flash,
    .hitg-start-emblem,
    .hitg-answer-option.is-correct,
    .hitg-answer-option.is-wrong,
    .hitg-earlier-option.is-correct,
    .hitg-earlier-option.is-wrong,
    .hitg-flag-orbit span,
    .hitg-flag-frame,
    .hitg-flag-frame img,
    .hitg-flag-shine,
    .hitg-result-ring,
    .hitg-memory-inner,
    .hitg-memory-card.is-matched .hitg-memory-back,
    .hitg-burst i {
        animation: none !important;
        transition: none !important;
    }
    .hitg-burst { display: none !important; }
}

.hitg-shell, .hitg-result { position: relative; }
.hitg-question-title { max-width: 780px; margin-inline: auto; text-align: center; }
.hitg-year-field { margin: 0 auto 20px; text-align: center; }

/* =========================================================
   HISTORY IS TOLD GAMES 4.0 - LIVE CONTENT ENGINE
   ========================================================= */

.hitg-type-source_excerpt .hitg-shell,
.hitg-type-source_image .hitg-shell,
.hitg-type-source_reverse .hitg-shell,
.hitg-type-source_memory .hitg-shell,
.hitg-type-source_mix .hitg-shell,
.hitg-type-source_blitz .hitg-shell {
    background:
        radial-gradient(circle at 12% 0%, rgba(155,116,39,.055), transparent 28%),
        radial-gradient(circle at 92% 90%, rgba(115,83,26,.035), transparent 24%),
        #fff;
}

.hitg-source-orbit {
    position: relative;
    display: grid;
    width: 110px;
    height: 110px;
    place-items: center;
    margin: 0 auto 18px;
}

.hitg-source-orbit b {
    position: relative;
    z-index: 4;
    display: grid;
    width: 60px;
    height: 60px;
    place-items: center;
    border: 1px solid #d5bd87;
    border-radius: 50%;
    background: #fbf6f2;
    color: var(--hitg-gold-strong);
    font-size: 1.5rem;
    font-weight: 900;
    box-shadow: 0 10px 28px rgba(61,45,17,.13);
}

.hitg-source-orbit span {
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(155,116,39,.24);
    border-radius: 50%;
    animation: hitg-orbit-spin 7s linear infinite;
}

.hitg-source-orbit span:nth-child(2) {
    inset: 17px;
    animation-duration: 5s;
    animation-direction: reverse;
}

.hitg-source-orbit span:nth-child(3) {
    inset: 30px;
    animation-duration: 3.6s;
}

.hitg-source-orbit span::after {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b88a31;
    box-shadow: 0 0 0 4px rgba(184,138,49,.09);
}

.hitg-source-image-frame {
    --rx: 0deg;
    --ry: 0deg;
    position: relative;
    width: min(100%, 720px);
    margin: 0 auto 24px;
    padding: 3px;
    overflow: hidden;
    border-radius: 20px;
    background: conic-gradient(from var(--hitg-angle, 0deg), #73531a, #d4af37, #f6e2a8, #997024, #52370f, #d4af37, #73531a);
    box-shadow: 0 15px 38px rgba(68,49,17,.13);
    transform: perspective(950px) rotateX(var(--rx)) rotateY(var(--ry));
    transform-style: preserve-3d;
    transition: transform .15s ease;
    animation: hitg-gold-frame 6s linear infinite;
}

.hitg-source-image-frame::after {
    content: "";
    position: absolute;
    inset: 3px;
    pointer-events: none;
    border-radius: 17px;
    background: linear-gradient(115deg, transparent 28%, rgba(255,255,255,.46) 48%, transparent 68%);
    transform: translateX(130%);
    animation: hitg-source-shine 4.5s ease-in-out infinite 1.2s;
}

.hitg-source-image-frame img {
    display: block;
    width: 100%;
    height: clamp(240px, 44vw, 430px);
    object-fit: contain;
    padding: clamp(10px, 2vw, 20px);
    border-radius: 17px;
    background: linear-gradient(145deg, #fbf6f2, #f2e7df);
    animation: hitg-flag-enter .5s cubic-bezier(.16,.84,.34,1) both;
}

.hitg-source-excerpt {
    position: relative;
    max-width: 780px;
    margin: 0 auto 25px;
    padding: clamp(22px, 4vw, 34px) clamp(20px, 5vw, 42px);
    border: 1px solid #ded4c1;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(244,234,211,.55), rgba(255,255,255,.92));
    color: var(--hitg-text);
    font-size: clamp(1rem, 2.2vw, 1.16rem);
    font-weight: 650;
    line-height: 1.85;
    text-align: center;
    quotes: none;
    box-shadow: 0 10px 28px rgba(46,35,15,.055);
}

.hitg-source-excerpt::before {
    content: "“";
    position: absolute;
    top: 1px;
    inset-inline-start: 14px;
    color: rgba(155,116,39,.24);
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 1;
}

.hitg-source-name-options,
.hitg-source-image-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 820px;
    margin-inline: auto;
}

.hitg-source-name-option,
.hitg-source-image-option {
    appearance: none;
    position: relative;
    min-width: 0;
    border: 1px solid #d8d0c2;
    border-radius: 15px;
    background: #fbf6f2;
    color: var(--hitg-text);
    font: inherit;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.hitg-source-name-option {
    display: flex;
    min-height: 76px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 18px;
    text-align: center;
}

.hitg-source-name-option strong {
    display: block;
    font-size: .98rem;
    line-height: 1.45;
}

.hitg-source-name-option small {
    color: var(--hitg-muted);
    font-size: .76rem;
    font-weight: 700;
}

.hitg-source-image-option {
    min-height: 160px;
    overflow: hidden;
    padding: 7px;
}

.hitg-source-image-option img {
    display: block;
    width: 100%;
    height: 145px;
    object-fit: contain;
    padding: 6px;
    border-radius: 10px;
    background: #f7f5ef;
}

.hitg-source-image-option > span {
    position: absolute;
    top: 13px;
    inset-inline-start: 13px;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: rgba(22,20,17,.86);
    color: #fff;
    font-size: .78rem;
    font-weight: 900;
    box-shadow: 0 2px 9px rgba(0,0,0,.15);
}

.hitg-source-name-option:focus-visible,
.hitg-source-image-option:focus-visible {
    outline: 3px solid rgba(155,116,39,.32);
    outline-offset: 3px;
}

@media (hover:hover) and (pointer:fine) {
    .hitg-source-name-option:hover,
    .hitg-source-image-option:hover {
        transform: translateY(-3px);
        border-color: #b78a33;
        box-shadow: 0 10px 26px rgba(69,51,19,.10);
    }
}

.hitg-source-name-option.is-correct,
.hitg-source-image-option.is-correct {
    border-color: var(--hitg-success) !important;
    background: var(--hitg-success-soft) !important;
    box-shadow: 0 0 0 3px rgba(40,120,74,.08) !important;
    animation: hitg-answer-correct .45s ease both;
}

.hitg-source-name-option.is-wrong,
.hitg-source-image-option.is-wrong {
    border-color: var(--hitg-danger) !important;
    background: var(--hitg-danger-soft) !important;
    animation: hitg-answer-wrong .36s ease both;
}

.hitg-source-name-option:disabled,
.hitg-source-image-option:disabled {
    cursor: default;
}

@keyframes hitg-source-shine {
    0%, 60% { transform: translateX(130%); }
    82%, 100% { transform: translateX(-130%); }
}

@media (max-width: 700px) {
    .hitg-source-name-options,
    .hitg-source-image-options {
        grid-template-columns: 1fr;
    }
    .hitg-source-image-option { min-height: 138px; }
    .hitg-source-image-option img { height: 125px; }
    .hitg-source-excerpt { line-height: 1.72; }
}

@media (prefers-reduced-motion: reduce) {
    .hitg-source-orbit span,
    .hitg-source-image-frame,
    .hitg-source-image-frame::after,
    .hitg-source-image-frame img,
    .hitg-source-name-option.is-correct,
    .hitg-source-name-option.is-wrong,
    .hitg-source-image-option.is-correct,
    .hitg-source-image-option.is-wrong {
        animation: none !important;
        transition: none !important;
    }
}

/* =========================================================
   V4.1 - HARD THEME ISOLATION FOR TIMELINE CONTROLS
   Prevents theme button colors (including pink/magenta) from leaking in.
   ========================================================= */
.hitg-game button.hitg-mini-button,
.hitg-game .hitg-mini-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: grid !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    place-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #b99755 !important;
    border-radius: 10px !important;
    background: #fbf6f2 !important;
    background-image: none !important;
    color: var(--hitg-gold-strong) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    font: inherit !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: transform .16s ease, background-color .16s ease, color .16s ease, border-color .16s ease !important;
}
.hitg-game button.hitg-mini-button:hover:not(:disabled),
.hitg-game button.hitg-mini-button:focus-visible:not(:disabled),
.hitg-game .hitg-mini-button:hover:not(:disabled),
.hitg-game .hitg-mini-button:focus-visible:not(:disabled) {
    border-color: var(--hitg-gold-strong) !important;
    background: var(--hitg-gold) !important;
    background-image: none !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(155,116,39,.16) !important;
    transform: translateY(-1px) !important;
}
.hitg-game button.hitg-mini-button:active:not(:disabled),
.hitg-game .hitg-mini-button:active:not(:disabled) {
    background: var(--hitg-gold-strong) !important;
    color: #fff !important;
    transform: translateY(0) scale(.97) !important;
}
.hitg-game button.hitg-mini-button:disabled,
.hitg-game .hitg-mini-button:disabled {
    border-color: #ddd6c8 !important;
    background: #f4f1ea !important;
    color: #918a7f !important;
    opacity: .58 !important;
    cursor: default !important;
}
.hitg-game .hitg-timeline-controls {
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}
@media (max-width: 700px) {
    .hitg-game .hitg-timeline-controls {
        justify-content: center !important;
    }
}

/* =========================
   V4.2 CARD COVERS
   ========================= */
.hitg-card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #1b1915;
}
.hitg-card-media .hitg-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    transition: transform .55s cubic-bezier(.2,.7,.2,1), filter .35s ease;
}
.hitg-card-media-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 56%, rgba(18,16,12,.28));
}
.hitg-card-cover {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #1d1a15;
    color: #ead9b6;
}
.hitg-card-cover::before,
.hitg-card-cover::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.hitg-card-cover::before {
    width: 62%;
    aspect-ratio: 1;
    inset-inline-start: -12%;
    top: -34%;
    border: 1px solid rgba(214,177,94,.42);
    border-radius: 50%;
}
.hitg-card-cover::after {
    inset: 18px;
    border: 1px solid rgba(255,255,255,.10);
}
.hitg-cover-rule {
    position: absolute;
    inset-inline: 13%;
    top: 50%;
    height: 1px;
    background: rgba(215,178,96,.72);
}
.hitg-cover-mark {
    position: absolute;
    inset-inline-start: 12%;
    bottom: 10%;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: .8;
    color: rgba(233,207,151,.92);
}
.hitg-cover-type {
    position: absolute;
    inset-inline-end: 10%;
    top: 12%;
    max-width: 55%;
    color: rgba(255,255,255,.84);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-align: end;
}
.hitg-cover-v2 { background: #20231e; }
.hitg-cover-v3 { background: #1f1d22; }
.hitg-cover-v4 { background: #20201b; }
.hitg-cover-v5 { background: #182023; }
.hitg-cover-v6 { background: #242018; }
.hitg-cover-v7 { background: #1c201c; }
.hitg-cover-v8 { background: #211d1a; }
@media (hover:hover) and (pointer:fine) {
    .hitg-card:hover .hitg-card-image { transform: scale(1.035); filter: saturate(1.03) contrast(1.02); }
}
@media (prefers-reduced-motion: reduce) {
    .hitg-card-media .hitg-card-image { transition: none; }
}

/* =========================================================
   V4.3 - COMPLETE FRONT-END THEME ISOLATION
   Keeps History Is Told Games independent from theme button/radio colors.
   ========================================================= */
.hitg-game button.hitg-button,
.hitg-game button.hitg-source-name-option,
.hitg-game button.hitg-source-image-option,
.hitg-game button.hitg-flag-name-option,
.hitg-game button.hitg-flag-image-option,
.hitg-game button.hitg-memory-card,
.hitg-game button.hitg-mini-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: none !important;
    text-shadow: none !important;
    font-family: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.hitg-game button.hitg-button {
    border: 1px solid var(--hitg-gold) !important;
    box-shadow: none !important;
}
.hitg-game button.hitg-button.hitg-primary {
    background: var(--hitg-gold) !important;
    background-color: var(--hitg-gold) !important;
    color: #fff !important;
}
.hitg-game button.hitg-button.hitg-primary:hover:not(:disabled),
.hitg-game button.hitg-button.hitg-primary:focus-visible:not(:disabled) {
    border-color: var(--hitg-gold-strong) !important;
    background: var(--hitg-gold-strong) !important;
    background-color: var(--hitg-gold-strong) !important;
    color: #fff !important;
}
.hitg-game button.hitg-button.hitg-secondary {
    background: #fbf6f2 !important;
    background-color: #fbf6f2 !important;
    color: var(--hitg-gold-strong) !important;
}

.hitg-game .hitg-answer-option,
.hitg-game .hitg-earlier-option {
    border-color: #d8d1c5 !important;
    background: #fbf6f2 !important;
    background-color: #fbf6f2 !important;
    color: var(--hitg-text) !important;
    box-shadow: none !important;
}
.hitg-game .hitg-answer-option:has(input:checked),
.hitg-game .hitg-earlier-option:has(input:checked) {
    border-color: var(--hitg-gold) !important;
    background: #fbf7ee !important;
    background-color: #fbf7ee !important;
    color: var(--hitg-text) !important;
    box-shadow: 0 0 0 2px rgba(155,116,39,.08) !important;
}
.hitg-game .hitg-answer-option input[type="radio"],
.hitg-game .hitg-earlier-option input[type="radio"] {
    accent-color: var(--hitg-gold) !important;
}

.hitg-game button.hitg-source-name-option,
.hitg-game button.hitg-source-image-option,
.hitg-game button.hitg-flag-name-option,
.hitg-game button.hitg-flag-image-option {
    border: 1px solid #d8d0c2 !important;
    background: #fbf6f2 !important;
    background-color: #fbf6f2 !important;
    color: var(--hitg-text) !important;
    box-shadow: none !important;
}
@media (hover:hover) and (pointer:fine) {
    .hitg-game button.hitg-source-name-option:hover:not(:disabled),
    .hitg-game button.hitg-source-image-option:hover:not(:disabled),
    .hitg-game button.hitg-flag-name-option:hover:not(:disabled),
    .hitg-game button.hitg-flag-image-option:hover:not(:disabled) {
        border-color: var(--hitg-gold) !important;
        background: #fbf7ee !important;
        background-color: #fbf7ee !important;
        color: var(--hitg-text) !important;
        box-shadow: 0 10px 26px rgba(69,51,19,.10) !important;
    }
}
.hitg-game button.hitg-source-name-option.is-correct,
.hitg-game button.hitg-source-image-option.is-correct,
.hitg-game button.hitg-flag-name-option.is-correct,
.hitg-game button.hitg-flag-image-option.is-correct {
    border-color: var(--hitg-success) !important;
    background: var(--hitg-success-soft) !important;
    background-color: var(--hitg-success-soft) !important;
    color: var(--hitg-text) !important;
}
.hitg-game button.hitg-source-name-option.is-wrong,
.hitg-game button.hitg-source-image-option.is-wrong,
.hitg-game button.hitg-flag-name-option.is-wrong,
.hitg-game button.hitg-flag-image-option.is-wrong {
    border-color: var(--hitg-danger) !important;
    background: var(--hitg-danger-soft) !important;
    background-color: var(--hitg-danger-soft) !important;
    color: var(--hitg-text) !important;
}

.hitg-game button.hitg-memory-card {
    border: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.hitg-game button:focus-visible,
.hitg-game input:focus-visible,
.hitg-game a:focus-visible {
    outline-color: #c9a14d !important;
}

/* Native radio reset: prevents theme accent/pseudo styling from appearing pink. */
.hitg-game .hitg-answer-option input[type="radio"],
.hitg-game .hitg-earlier-option input[type="radio"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
    border: 2px solid #b99755 !important;
    border-radius: 50% !important;
    background: #fbf6f2 !important;
    background-color: #fbf6f2 !important;
    background-image: none !important;
    box-shadow: inset 0 0 0 4px #fff !important;
}
.hitg-game .hitg-answer-option input[type="radio"]:checked,
.hitg-game .hitg-earlier-option input[type="radio"]:checked {
    border-color: var(--hitg-gold) !important;
    background: var(--hitg-gold) !important;
    background-color: var(--hitg-gold) !important;
    box-shadow: inset 0 0 0 4px #fff !important;
}

/* =========================================================
   V4.4 - POLISHED GAME SURFACE
   Fixes long Hebrew copy, entity leaks and theme bleed while
   making single-game screens feel deliberate and editorial.
   ========================================================= */
.hitg-game {
    max-width: 980px;
}

.hitg-game .hitg-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid #d8cfbe;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(249,247,242,.92) 0, #fff 130px);
    box-shadow: 0 22px 58px rgba(37,29,16,.10);
}

.hitg-game .hitg-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 3;
    height: 3px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, #8a6420 18%, #d3ad59 50%, #8a6420 82%, transparent);
}

.hitg-game .hitg-topbar {
    min-height: 58px;
    background:
        radial-gradient(circle at 18% 0%, rgba(201,156,66,.22), transparent 30%),
        linear-gradient(135deg, #171512, #242018);
}

.hitg-game .hitg-stage {
    width: 100%;
    max-width: 880px;
    margin-inline: auto;
    padding-inline: clamp(18px, 5vw, 48px);
}

.hitg-game .hitg-question-form {
    width: 100%;
    max-width: 820px;
    margin-inline: auto;
}

.hitg-game .hitg-question-title {
    max-width: 760px;
    margin: 0 auto 24px;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}

.hitg-game .hitg-start {
    max-width: 720px;
}

.hitg-game .hitg-start h2,
.hitg-game .hitg-start-description,
.hitg-game .hitg-feedback,
.hitg-game .hitg-result,
.hitg-game .hitg-source-excerpt,
.hitg-game .hitg-timeline-text,
.hitg-game .hitg-source-name-option strong,
.hitg-game .hitg-source-name-option small,
.hitg-game .hitg-flag-name-option,
.hitg-game .hitg-memory-back,
.hitg-game .hitg-related-link,
.hitg-game .hitg-button {
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    white-space: normal !important;
}

.hitg-game .hitg-start-description {
    max-width: 580px;
    font-size: 1rem;
    line-height: 1.7;
}

/* A small chronology dial instead of the generic H emblem. */
.hitg-game .hitg-start-emblem {
    position: relative;
    width: 78px;
    height: 78px;
    margin-bottom: 18px;
    border: 1px solid #cdb57e;
    background:
        radial-gradient(circle at center, #fff 0 9px, transparent 10px),
        radial-gradient(circle at center, rgba(183,139,54,.14), transparent 62%),
        #fbf8f1;
    box-shadow: 0 12px 30px rgba(91,67,23,.10);
    animation: none;
}

.hitg-game .hitg-start-emblem::before,
.hitg-game .hitg-start-emblem::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 2px;
    height: 25px;
    border-radius: 99px;
    background: #87631f;
    transform-origin: 50% 100%;
}

.hitg-game .hitg-start-emblem::before {
    transform: translate(-50%, -100%) rotate(38deg);
    animation: hitg-dial-hand 8s linear infinite;
}

.hitg-game .hitg-start-emblem::after {
    height: 19px;
    background: #c69a43;
    transform: translate(-50%, -100%) rotate(-54deg);
}

@keyframes hitg-dial-hand {
    from { transform: translate(-50%, -100%) rotate(38deg); }
    to { transform: translate(-50%, -100%) rotate(398deg); }
}

/* Answer cards: no native/theme radio appearance, clearer hierarchy. */
.hitg-game .hitg-answers,
.hitg-game .hitg-earlier-grid {
    max-width: 820px;
    margin: 0 auto 24px !important;
}

.hitg-game .hitg-answer-option,
.hitg-game .hitg-earlier-option {
    position: relative;
    min-width: 0;
    min-height: 78px;
    gap: 13px;
    padding: 14px 16px;
    border: 1px solid #d8d0c2 !important;
    border-radius: 15px;
    background: linear-gradient(180deg, #fbf6f2, #f2e7df) !important;
    text-align: start;
    overflow: hidden;
}

.hitg-game .hitg-earlier-option {
    min-height: 106px;
    justify-content: flex-start;
    text-align: start;
}

.hitg-game .hitg-answer-option::after,
.hitg-game .hitg-earlier-option::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: rgba(155,116,39,.07);
    transition: width .18s ease;
    pointer-events: none;
}

.hitg-game .hitg-answer-option:has(input:checked)::after,
.hitg-game .hitg-earlier-option:has(input:checked)::after {
    width: 5px;
}

.hitg-game .hitg-answer-option input[type="radio"],
.hitg-game .hitg-earlier-option input[type="radio"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    min-height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
}

.hitg-game .hitg-choice-key {
    position: relative;
    z-index: 1;
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid #cdbb97;
    border-radius: 10px;
    background: #f8f3e8;
    color: #6e501c;
    font-size: .84rem;
    font-weight: 900;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.hitg-game .hitg-choice-text {
    position: relative;
    z-index: 1;
    min-width: 0;
    flex: 1 1 auto;
    color: var(--hitg-text);
    font-weight: 780;
    line-height: 1.48;
    overflow-wrap: anywhere;
}

.hitg-game .hitg-answer-option:has(input:checked) .hitg-choice-key,
.hitg-game .hitg-earlier-option:has(input:checked) .hitg-choice-key {
    border-color: var(--hitg-gold) !important;
    background: var(--hitg-gold) !important;
    color: #fff !important;
    transform: scale(1.04);
}

.hitg-game .hitg-answer-option.is-correct .hitg-choice-key,
.hitg-game .hitg-earlier-option.is-correct .hitg-choice-key {
    border-color: var(--hitg-success) !important;
    background: var(--hitg-success) !important;
    color: #fff !important;
}

.hitg-game .hitg-answer-option.is-wrong .hitg-choice-key,
.hitg-game .hitg-earlier-option.is-wrong .hitg-choice-key {
    border-color: var(--hitg-danger) !important;
    background: var(--hitg-danger) !important;
    color: #fff !important;
}

/* Hard isolation from theme button sizing/backgrounds and long-label overflow. */
.hitg-game button,
.hitg-game .hitg-button,
.hitg-game .hitg-related-link,
.hitg-game .hitg-source-name-option,
.hitg-game .hitg-source-image-option,
.hitg-game .hitg-flag-name-option,
.hitg-game .hitg-flag-image-option,
.hitg-game .hitg-mini-button,
.hitg-game .hitg-memory-card {
    max-width: 100% !important;
    min-width: 0;
    height: auto !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    background-image: none !important;
    text-indent: 0 !important;
}

.hitg-game button.hitg-button {
    min-width: min(220px, 100%) !important;
    padding: 12px 22px !important;
    border-radius: 12px !important;
    line-height: 1.35 !important;
    text-align: center !important;
}

.hitg-game .hitg-question-form > .hitg-button.hitg-primary,
.hitg-game .hitg-reveal-button {
    width: fit-content !important;
    max-width: 100% !important;
    margin-inline: auto !important;
}

.hitg-game .hitg-feedback-actions,
.hitg-game .hitg-result-actions {
    align-items: center;
    justify-content: center;
}

.hitg-game .hitg-related-link {
    text-align: center;
    line-height: 1.35 !important;
}

/* Source/flag answer buttons with long titles. */
.hitg-game .hitg-source-name-option,
.hitg-game .hitg-flag-name-option {
    min-height: 82px;
    padding: 15px 16px !important;
    line-height: 1.45 !important;
    text-align: center !important;
}

.hitg-game .hitg-source-name-option strong,
.hitg-game .hitg-source-name-option small {
    max-width: 100%;
}

.hitg-game .hitg-timeline-item {
    min-width: 0;
}

.hitg-game .hitg-timeline-controls {
    flex: 0 0 auto;
}

.hitg-game .hitg-mini-button {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border: 1px solid #cbb98f !important;
    border-radius: 10px !important;
    background: #fbf6f2 !important;
    color: #6e501c !important;
}

.hitg-game .hitg-mini-button:hover:not(:disabled),
.hitg-game .hitg-mini-button:focus-visible:not(:disabled) {
    border-color: var(--hitg-gold) !important;
    background: var(--hitg-gold-soft) !important;
    color: var(--hitg-gold-strong) !important;
}

/* Feedback is cleaner and less text-heavy visually. */
.hitg-game .hitg-feedback {
    max-width: 820px;
    margin: 26px auto 0;
    padding: 18px 20px;
    border-radius: 15px;
}

.hitg-game .hitg-feedback p {
    max-width: 720px;
    margin-inline: auto;
}

@media (hover: hover) and (pointer: fine) {
    .hitg-game .hitg-answer-option:hover,
    .hitg-game .hitg-earlier-option:hover {
        border-color: #b68a36 !important;
        background: #fbf7ef !important;
        box-shadow: 0 9px 24px rgba(68,49,17,.075) !important;
        transform: translateY(-2px);
    }
}

@media (max-width: 620px) {
    .hitg-game .hitg-shell {
        border-radius: 17px;
    }
    .hitg-game .hitg-question-title {
        font-size: clamp(1.35rem, 7vw, 1.85rem);
        text-align: start;
        text-wrap: pretty;
    }
    .hitg-game .hitg-answer-option,
    .hitg-game .hitg-earlier-option {
        min-height: 68px;
        padding: 12px 13px;
    }
    .hitg-game .hitg-choice-key {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }
    .hitg-game button.hitg-button,
    .hitg-game .hitg-related-link {
        width: 100% !important;
    }
    .hitg-game .hitg-timeline-item {
        grid-template-columns: 36px minmax(0,1fr);
    }
    .hitg-game .hitg-timeline-controls {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hitg-game .hitg-start-emblem::before {
        animation: none !important;
    }
}

/* =========================================================
   V4.6 - UNCROPPED IN-GAME MEDIA + END-ONLY LEARNING LINKS
   Images inside a game must always remain fully visible.
   Directory card thumbnails are intentionally not affected.
   ========================================================= */
.hitg-game .hitg-media-frame {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    place-items: center !important;
    overflow: hidden !important;
    padding: clamp(8px, 1.8vw, 14px) !important;
    background: linear-gradient(145deg, #fbf6f2, #f2e7df) !important;
}

.hitg-game .hitg-media-frame > img.hitg-question-image,
.hitg-game img.hitg-question-image {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(68vh, 520px) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: transparent !important;
}

/* Reveal games may blur the image, but never enlarge/crop it. */
.hitg-game .hitg-reveal-frame.reveal-0 img,
.hitg-game .hitg-reveal-frame.reveal-1 img,
.hitg-game .hitg-reveal-frame.reveal-2 img,
.hitg-game .hitg-reveal-frame.reveal-3 img {
    transform: none !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.hitg-game .hitg-flag-frame-inner {
    display: grid !important;
    width: 100% !important;
    height: clamp(230px, 42vw, 410px) !important;
    min-height: 0 !important;
    place-items: center !important;
    overflow: hidden !important;
    padding: clamp(10px, 2vw, 20px) !important;
    background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,245,238,.99)) !important;
}

.hitg-game .hitg-flag-frame-inner > img,
.hitg-game .hitg-flag-frame img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.hitg-game .hitg-mini-flag-frame {
    display: grid !important;
    width: 100% !important;
    height: 132px !important;
    place-items: center !important;
    overflow: hidden !important;
    padding: 8px !important;
    background: #f7f5ef !important;
}

.hitg-game .hitg-mini-flag-frame > img,
.hitg-game .hitg-memory-back > img,
.hitg-game .hitg-source-image-frame > img,
.hitg-game .hitg-source-image-option img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.hitg-result-learning {
    width: min(100%, 720px);
    margin: 24px auto 0;
    padding: 19px;
    border-top: 1px solid var(--hitg-border);
    text-align: center;
}

.hitg-result-learning h3 {
    margin: 0 0 12px;
    color: var(--hitg-ink);
    font-size: 1rem;
    font-weight: 900;
}

.hitg-result-learning-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
}

.hitg-result-learning .hitg-related-link {
    margin: 0 !important;
}

@media (max-width: 620px) {
    .hitg-game .hitg-flag-frame-inner {
        height: clamp(190px, 68vw, 300px) !important;
    }
    .hitg-game .hitg-mini-flag-frame {
        height: 112px !important;
    }
}

/* =========================================================
   V4.7 - CLEAR LEARNING LINKS + FULL-FRAME FLAGS
   ========================================================= */
.hitg-game .hitg-answer-explanation,
.hitg-game .hitg-context-note {
    max-width: 760px;
    margin: 10px auto 0;
    color: var(--hitg-text);
    line-height: 1.75;
    text-align: right;
}
.hitg-game .hitg-context-note {
    margin-top: 8px;
    padding-top: 9px;
    border-top: 1px solid rgba(155,116,39,.14);
    color: #625c53;
}

.hitg-game .hitg-result-learning {
    width: min(100%, 780px);
    margin: 26px auto 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--hitg-border);
    text-align: right;
}
.hitg-game .hitg-result-learning h3 {
    margin: 0 0 12px;
    color: var(--hitg-ink);
    font-size: 1.05rem;
    font-weight: 900;
    text-align: center;
}
.hitg-game .hitg-result-learning-links {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
}
.hitg-game .hitg-learning-card,
.hitg-game a.hitg-learning-card {
    display: flex !important;
    min-width: 0 !important;
    min-height: 74px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    border: 1px solid #d9d0c1 !important;
    border-radius: 12px !important;
    background: #fbf6f2 !important;
    color: var(--hitg-text) !important;
    text-align: right !important;
    text-decoration: none !important;
    box-shadow: none !important;
}
.hitg-game .hitg-learning-kind {
    color: var(--hitg-gold-strong);
    font-size: .75rem;
    font-weight: 850;
    line-height: 1.25;
}
.hitg-game .hitg-learning-title {
    display: block;
    max-width: 100%;
    color: var(--hitg-ink);
    font-size: .92rem;
    font-weight: 850;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
@media (hover:hover) and (pointer:fine) {
    .hitg-game a.hitg-learning-card:hover {
        border-color: var(--hitg-gold) !important;
        background: #fbf7ee !important;
        transform: translateY(-1px);
    }
}

/* Flag imagery: preserve intrinsic aspect ratio even against aggressive theme CSS. */
.hitg-game .hitg-flag-frame-inner,
.hitg-game .hitg-mini-flag-frame,
.hitg-game .hitg-memory-back {
    box-sizing: border-box !important;
}
.hitg-game .hitg-flag-frame-inner {
    display: flex !important;
    width: 100% !important;
    height: clamp(250px, 43vw, 430px) !important;
    min-height: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: clamp(14px, 2.5vw, 24px) !important;
}
.hitg-game .hitg-flag-frame-inner > img,
.hitg-game .hitg-flag-frame img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: auto !important;
    padding: 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: 50% 50% !important;
    transform: none !important;
    scale: 1 !important;
    clip-path: none !important;
    -webkit-mask: none !important;
    mask: none !important;
}
.hitg-game button.hitg-flag-image-option {
    display: grid !important;
    grid-template-rows: minmax(0,1fr) auto !important;
    min-height: 178px !important;
    overflow: hidden !important;
    padding: 10px !important;
}
.hitg-game .hitg-mini-flag-frame {
    display: flex !important;
    width: 100% !important;
    height: 148px !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 10px !important;
    border-radius: 10px !important;
    background: #f7f5ef !important;
}
.hitg-game .hitg-mini-flag-frame > img,
.hitg-game button.hitg-flag-image-option img,
.hitg-game .hitg-memory-back > img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: auto !important;
    padding: 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: 50% 50% !important;
    transform: none !important;
    scale: 1 !important;
    clip-path: none !important;
    -webkit-mask: none !important;
    mask: none !important;
}

@media (max-width:620px) {
    .hitg-game .hitg-result-learning-links { grid-template-columns: 1fr; }
    .hitg-game .hitg-flag-frame-inner { height: clamp(220px, 72vw, 330px) !important; }
    .hitg-game button.hitg-flag-image-option { min-height: 158px !important; }
    .hitg-game .hitg-mini-flag-frame { height: 128px !important; }
}


/* 4.7.1 - game header is navigation only; no English wordmark in the player. */
.hitg-game .hitg-topbar-nav {
    justify-content: flex-start !important;
}


/* 4.7.2 - lossless flag rendering.
   Dynamic flag games use CSS background-size: contain instead of <img>,
   so theme image rules, transforms and intrinsic sizing cannot crop the flag. */
.hitg-game .hitg-flag-frame-inner,
.hitg-game .hitg-mini-flag-frame,
.hitg-game .hitg-memory-back {
    background-color: #f8f6f1 !important;
    background-image: none !important;
}
.hitg-game .hitg-flag-visual {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background-color: #f2e7df !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: contain !important;
    background-origin: content-box !important;
    background-clip: content-box !important;
    box-sizing: border-box !important;
    transform: none !important;
    clip-path: none !important;
    -webkit-mask: none !important;
    mask: none !important;
    overflow: visible !important;
}
.hitg-game .hitg-flag-visual-main {
    min-height: 100% !important;
    padding: clamp(8px, 1.8vw, 16px) !important;
}
.hitg-game .hitg-flag-visual-mini {
    min-height: 100% !important;
    padding: 6px !important;
}
.hitg-game .hitg-flag-visual-memory {
    min-height: 100% !important;
    padding: 5px !important;
}
.hitg-game .hitg-flag-frame-inner {
    overflow: visible !important;
}
.hitg-game .hitg-mini-flag-frame {
    overflow: visible !important;
}
.hitg-game button.hitg-flag-image-option {
    overflow: visible !important;
}
.hitg-game .hitg-flag-shine {
    border-radius: 14px !important;
    overflow: hidden !important;
}
/* Keep a generous neutral margin around every flag, including very wide and very tall ratios. */
.hitg-game .hitg-flag-frame-inner {
    height: clamp(290px, 46vw, 455px) !important;
    padding: 10px !important;
}
.hitg-game .hitg-mini-flag-frame {
    height: 162px !important;
    padding: 8px !important;
}
.hitg-game button.hitg-flag-image-option {
    min-height: 192px !important;
    padding: 10px !important;
}
@media (max-width:620px) {
    .hitg-game .hitg-flag-frame-inner { height: clamp(245px, 76vw, 350px) !important; }
    .hitg-game .hitg-mini-flag-frame { height: 142px !important; }
    .hitg-game button.hitg-flag-image-option { min-height: 172px !important; }
}


/* V4.9 instant-answer interaction */
.hitg-game .hitg-answer-option,
.hitg-game .hitg-earlier-option {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.hitg-game .hitg-answer-option:has(input:disabled),
.hitg-game .hitg-earlier-option:has(input:disabled) {
    cursor: default;
}
.hitg-game .hitg-flag-name-option {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   HISTORICAL RPG — cinematic narrative engine
   ========================================================= */
.hitg-type-historical_rpg .hitg-shell{background:#140f11;border-color:rgba(212,175,55,.26);box-shadow:0 30px 80px rgba(18,10,12,.28);color:#f7f0eb;overflow:hidden}
.hitg-type-historical_rpg .hitg-topbar{position:relative;z-index:12;background:rgba(20,15,17,.92);border-bottom:1px solid rgba(242,231,223,.09);backdrop-filter:blur(12px)}
.hitg-type-historical_rpg .hitg-all-games-link{color:#f2e7df!important}
.hitg-type-historical_rpg .hitg-status{position:relative;z-index:11;background:#1b1316;color:#f2e7df;border-bottom-color:rgba(242,231,223,.08)}
.hitg-type-historical_rpg .hitg-progress{position:relative;z-index:11;background:#2a1d21}
.hitg-type-historical_rpg .hitg-progress>span{background:linear-gradient(90deg,#8a6a35,#d4af37,#f2d99b)}
.hitg-type-historical_rpg .hitg-stage{min-height:min(760px,82vh);padding:0;background:#140f11}
.hitg-rpg-start,.hitg-rpg-scene,.hitg-rpg-ending{position:relative;min-height:min(760px,82vh);overflow:hidden;isolation:isolate;background:#171012;color:#f8f2ee}
.hitg-rpg-backdrop{--rpg-image:none;position:absolute;inset:0;z-index:-3;background-image:linear-gradient(90deg,rgba(14,9,11,.97) 0%,rgba(14,9,11,.77) 45%,rgba(14,9,11,.36) 100%),var(--rpg-image);background-position:center;background-size:cover;filter:saturate(.68) contrast(1.08)}
.hitg-rpg-backdrop::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 72% 36%,rgba(212,175,55,.14),transparent 24%),linear-gradient(180deg,transparent 55%,rgba(0,0,0,.66));box-shadow:inset 0 0 130px rgba(0,0,0,.68)}
.hitg-rpg-backdrop[data-visual="admiralty"]::after{background:linear-gradient(90deg,rgba(25,62,72,.34),transparent 42%),radial-gradient(circle at 80% 22%,rgba(212,175,55,.16),transparent 25%),linear-gradient(180deg,transparent,rgba(0,0,0,.72))}
.hitg-rpg-backdrop[data-visual="radio"]::after{background:repeating-radial-gradient(circle at 73% 46%,transparent 0 56px,rgba(212,175,55,.08) 57px 58px),linear-gradient(180deg,rgba(10,9,12,.18),rgba(0,0,0,.76))}
.hitg-rpg-backdrop[data-visual="attack"]::after{background:radial-gradient(circle at 72% 42%,rgba(165,57,37,.25),transparent 20%),linear-gradient(180deg,rgba(36,13,10,.16),rgba(0,0,0,.82))}
.hitg-rpg-backdrop[data-visual="aftermath"]{filter:grayscale(.38) saturate(.48) contrast(1.12)}
.hitg-rpg-fog{position:absolute;inset:-20%;background:radial-gradient(ellipse at 30% 60%,rgba(242,231,223,.09),transparent 35%),radial-gradient(ellipse at 75% 32%,rgba(242,231,223,.06),transparent 30%);filter:blur(18px);animation:hitg-rpg-fog 16s ease-in-out infinite alternate}
.hitg-rpg-grid{position:absolute;inset:0;background-image:linear-gradient(rgba(242,231,223,.032) 1px,transparent 1px),linear-gradient(90deg,rgba(242,231,223,.032) 1px,transparent 1px);background-size:56px 56px;mask-image:linear-gradient(90deg,transparent 40%,#000)}
.hitg-rpg-sweep{position:absolute;top:-30%;right:12%;width:2px;height:150%;background:linear-gradient(transparent,rgba(212,175,55,.38),transparent);transform:rotate(23deg);box-shadow:0 0 28px rgba(212,175,55,.18);animation:hitg-rpg-sweep 7s linear infinite}
.hitg-rpg-start-body,.hitg-rpg-scene-content,.hitg-rpg-ending-content{position:relative;z-index:3;width:min(760px,92%);padding:clamp(46px,7vw,88px) clamp(24px,6vw,76px)}
.hitg-rpg-start-body{min-height:min(760px,82vh);display:flex;flex-direction:column;justify-content:center}
.hitg-rpg-kicker{display:inline-flex;align-items:center;gap:10px;width:max-content;margin-bottom:14px;color:#e0c88e;font-size:.74rem;font-weight:850;letter-spacing:.08em;text-transform:uppercase}
.hitg-rpg-kicker::before{content:"";width:38px;height:1px;background:linear-gradient(90deg,#d4af37,transparent)}
.hitg-rpg-start h2,.hitg-rpg-ending h2{max-width:720px;margin:0 0 14px;color:#fff;font-size:clamp(2.2rem,6vw,5.2rem);font-weight:900;line-height:.98;letter-spacing:-.035em;text-shadow:0 12px 34px rgba(0,0,0,.38)}
.hitg-rpg-role{margin:0 0 22px;color:#d9c7bd;font-size:clamp(1rem,1.5vw,1.16rem);font-weight:750}
.hitg-rpg-intro{max-width:690px;margin:0 0 22px;color:#f2e7df;font-size:clamp(1rem,1.5vw,1.13rem);line-height:1.78}
.hitg-rpg-history-notice{max-width:660px;margin:0 0 24px;padding:15px 18px;border:1px solid rgba(212,175,55,.24);background:rgba(20,15,17,.56);backdrop-filter:blur(8px)}
.hitg-rpg-history-notice strong{display:block;margin-bottom:4px;color:#f2d99b;font-size:.86rem}.hitg-rpg-history-notice p{margin:0;color:#d9c9c1;font-size:.88rem;line-height:1.62}
.hitg-rpg-meta{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 28px}.hitg-rpg-meta span{padding:7px 11px;border:1px solid rgba(242,231,223,.14);background:rgba(20,15,17,.58);color:#e9ddd7;border-radius:4px;font-size:.78rem;font-weight:700;backdrop-filter:blur(8px)}
.hitg-rpg-start-actions,.hitg-rpg-end-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.hitg-type-historical_rpg .hitg-button{appearance:none!important;background-image:none!important;border-radius:4px!important;min-height:48px;padding:12px 20px;font-weight:850;box-shadow:none}
.hitg-type-historical_rpg .hitg-primary{background:#d4af37!important;border-color:#d4af37!important;color:#281a1e!important}.hitg-type-historical_rpg .hitg-primary:hover{background:#e3c76b!important;border-color:#e3c76b!important;transform:translateY(-1px)}
.hitg-type-historical_rpg .hitg-secondary{background:rgba(20,15,17,.65)!important;border-color:rgba(242,231,223,.28)!important;color:#f2e7df!important}
.hitg-rpg-hud{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;position:relative;z-index:5;background:rgba(242,231,223,.1);border-bottom:1px solid rgba(242,231,223,.09)}
.hitg-rpg-stat{padding:12px 14px;background:rgba(18,12,14,.86);backdrop-filter:blur(10px)}.hitg-rpg-stat-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;color:#d7c7c0;font-size:.7rem;font-weight:700}.hitg-rpg-stat-top strong{color:#f2d99b;font-size:.78rem}.hitg-rpg-stat-track{display:block;height:3px;background:rgba(242,231,223,.1);overflow:hidden}.hitg-rpg-stat-track>span{display:block;height:100%;background:linear-gradient(90deg,#806333,#d4af37);transition:width .4s ease}
.hitg-rpg-scene-content{padding-top:clamp(42px,6vw,72px);padding-bottom:50px}.hitg-rpg-scene-meta{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.hitg-rpg-scene-meta span{padding:5px 8px;border:1px solid rgba(242,231,223,.15);color:#d8cac3;background:rgba(15,10,12,.45);font-size:.7rem;font-weight:750}.hitg-rpg-speaker{display:block;margin-bottom:8px;color:#d4af37;font-size:.78rem;font-weight:850;letter-spacing:.06em}.hitg-rpg-scene-title{max-width:720px;margin:0 0 18px!important;color:#fff!important;font-size:clamp(2rem,4.6vw,3.8rem)!important;font-weight:900!important;line-height:1.02!important;letter-spacing:-.03em}.hitg-rpg-story{max-width:720px;margin-bottom:28px}.hitg-rpg-story p{margin:0 0 13px;color:#eaded8;font-size:clamp(.97rem,1.4vw,1.08rem);line-height:1.78}.hitg-rpg-prompt{margin:0 0 13px;color:#f5eee9;font-size:1rem;font-weight:850}
.hitg-rpg-choices{display:grid;gap:9px;max-width:760px}.hitg-rpg-choice{appearance:none!important;display:grid;grid-template-columns:42px 1fr 28px;align-items:center;gap:12px;width:100%;min-height:72px;padding:12px 14px;border:1px solid rgba(242,231,223,.16)!important;border-radius:5px!important;background:linear-gradient(90deg,rgba(30,20,23,.92),rgba(30,20,23,.68))!important;background-image:none!important;color:#f7f0eb!important;text-align:right!important;cursor:pointer;transition:transform .18s ease,border-color .18s ease,background .18s ease}.hitg-rpg-choice:hover:not(:disabled){transform:translateX(-4px);border-color:rgba(212,175,55,.7)!important;background:rgba(53,34,39,.94)!important}.hitg-rpg-choice:focus-visible{outline:3px solid #d4af37!important;outline-offset:3px}.hitg-rpg-choice:disabled{cursor:default;opacity:.72}.hitg-rpg-choice-num{display:grid;place-items:center;width:34px;height:34px;border:1px solid rgba(212,175,55,.42);color:#d4af37;font-size:.7rem;font-weight:900}.hitg-rpg-choice-copy{display:flex;flex-direction:column;gap:3px}.hitg-rpg-choice-copy strong{color:#fff;font-size:.94rem;line-height:1.35}.hitg-rpg-choice-copy span{color:#baa9a1;font-size:.78rem;line-height:1.5}.hitg-rpg-choice-arrow{color:#d4af37;font-size:1.2rem}
.hitg-rpg-journal{max-width:760px;margin-top:24px;border-top:1px solid rgba(242,231,223,.1);padding-top:15px;color:#d6c8c1}.hitg-rpg-journal summary{width:max-content;cursor:pointer;color:#dfcfca;font-size:.78rem;font-weight:800}.hitg-rpg-journal p{font-size:.8rem}.hitg-rpg-journal ol{margin:10px 0 0;padding:0 21px 0 0}.hitg-rpg-journal li{margin-bottom:7px;font-size:.78rem}.hitg-rpg-journal li strong{display:block;color:#f0e6e1}.hitg-rpg-journal li span{color:#b9aaa4}
.hitg-rpg-consequence{min-height:min(650px,75vh);display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:clamp(36px,8vw,90px);background:radial-gradient(circle at 75% 20%,rgba(212,175,55,.09),transparent 25%),#171012;color:#f5eee9}.hitg-rpg-consequence-symbol{margin-bottom:14px;color:#d4af37;font-size:2rem}.hitg-rpg-consequence h2{margin:0 0 12px!important;color:#fff!important;font-size:clamp(1.8rem,4vw,3.2rem)!important}.hitg-rpg-consequence>p{max-width:660px;margin:0 0 20px;color:#cfbeb7;line-height:1.75}.hitg-rpg-changes{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:26px}.hitg-rpg-changes span{padding:7px 10px;border:1px solid rgba(242,231,223,.12);background:#22171a;font-size:.78rem;font-weight:800}.hitg-rpg-changes .is-positive{color:#a9dfb2}.hitg-rpg-changes .is-negative{color:#f0aaa0}
.hitg-rpg-ending-content{min-height:min(760px,82vh);display:flex;flex-direction:column;justify-content:center}.hitg-rpg-ending-summary{max-width:690px;color:#e5d8d2;font-size:1.04rem;line-height:1.78}.hitg-rpg-ending .hitg-rpg-hud{max-width:760px;margin:18px 0;background:transparent;border:1px solid rgba(242,231,223,.09)}.hitg-rpg-reality{max-width:740px;margin:18px 0 24px;padding:18px 20px;border:1px solid rgba(212,175,55,.24);background:rgba(18,12,14,.72);backdrop-filter:blur(10px)}.hitg-rpg-reality h3{margin:0 0 8px;color:#f2d99b;font-size:1rem}.hitg-rpg-reality p{margin:0;color:#e5d8d2;line-height:1.72}.hitg-rpg-end-actions .hitg-related-link{display:inline-flex;align-items:center;min-height:48px;padding:11px 16px;border:1px solid rgba(242,231,223,.25);border-radius:4px;color:#f2e7df!important;background:rgba(18,12,14,.55);text-decoration:none!important;font-weight:800}
@keyframes hitg-rpg-fog{from{transform:translate3d(-2%,0,0) scale(1)}to{transform:translate3d(3%,-2%,0) scale(1.05)}}@keyframes hitg-rpg-sweep{from{transform:translateX(55vw) rotate(23deg)}to{transform:translateX(-95vw) rotate(23deg)}}
@media(max-width:760px){.hitg-type-historical_rpg .hitg-stage{min-height:680px}.hitg-rpg-start,.hitg-rpg-scene,.hitg-rpg-ending{min-height:680px}.hitg-rpg-backdrop{background-image:linear-gradient(180deg,rgba(14,9,11,.42) 0%,rgba(14,9,11,.9) 50%,#140f11 100%),var(--rpg-image);background-position:center top}.hitg-rpg-start-body,.hitg-rpg-scene-content,.hitg-rpg-ending-content{width:100%;padding:38px 18px 34px}.hitg-rpg-start-body{justify-content:flex-end;padding-top:180px}.hitg-rpg-hud{grid-template-columns:repeat(2,minmax(0,1fr))}.hitg-rpg-scene-title{font-size:clamp(1.85rem,9vw,2.75rem)!important}.hitg-rpg-choice{grid-template-columns:34px 1fr 18px;gap:9px;padding:11px 10px}.hitg-rpg-choice-num{width:30px;height:30px}.hitg-rpg-grid{background-size:38px 38px}.hitg-rpg-consequence{padding:34px 18px;min-height:580px}}
@media(max-width:430px){.hitg-rpg-stat{padding:9px 10px}.hitg-rpg-stat-top{font-size:.64rem}.hitg-rpg-meta span{font-size:.7rem}.hitg-rpg-start h2,.hitg-rpg-ending h2{font-size:clamp(2rem,13vw,3.3rem)}.hitg-rpg-choice-copy strong{font-size:.88rem}.hitg-rpg-choice-copy span{font-size:.73rem}}
@media(prefers-reduced-motion:reduce){.hitg-rpg-fog,.hitg-rpg-sweep{animation:none!important}.hitg-rpg-choice,.hitg-rpg-stat-track>span{transition:none!important}.hitg-rpg-choice:hover:not(:disabled){transform:none}}
@media(forced-colors:active){.hitg-rpg-start,.hitg-rpg-scene,.hitg-rpg-ending,.hitg-rpg-consequence{forced-color-adjust:auto}.hitg-rpg-choice,.hitg-rpg-history-notice,.hitg-rpg-reality,.hitg-rpg-stat{border:2px solid CanvasText!important}.hitg-rpg-backdrop{display:none}.hitg-rpg-choice-num{border:1px solid CanvasText}}

/* =========================================================
   V5.1 — cream game surfaces + RPG polish
   ========================================================= */
:root {
    --hitg-cream: #f2e7df;
    --hitg-paper: #fbf6f2;
}

/* Main game surfaces are cream rather than stark white. */
.hitg-game:not(.hitg-type-historical_rpg) .hitg-shell,
.hitg-game:not(.hitg-type-historical_rpg) .hitg-stage {
    background: var(--hitg-cream) !important;
}

.hitg-game:not(.hitg-type-historical_rpg) .hitg-answer-option:not(.is-correct):not(.is-wrong),
.hitg-game:not(.hitg-type-historical_rpg) .hitg-earlier-option:not(.is-correct):not(.is-wrong),
.hitg-game:not(.hitg-type-historical_rpg) .hitg-timeline-item:not(.is-correct):not(.is-wrong),
.hitg-game:not(.hitg-type-historical_rpg) .hitg-source-name-option:not(.is-correct):not(.is-wrong),
.hitg-game:not(.hitg-type-historical_rpg) .hitg-source-image-option:not(.is-correct):not(.is-wrong),
.hitg-game:not(.hitg-type-historical_rpg) .hitg-flag-name-option:not(.is-correct):not(.is-wrong),
.hitg-game:not(.hitg-type-historical_rpg) .hitg-flag-image-option:not(.is-correct):not(.is-wrong),
.hitg-game:not(.hitg-type-historical_rpg) .hitg-year-field input:not(.is-correct):not(.is-wrong),
.hitg-game:not(.hitg-type-historical_rpg) .hitg-question-image,
.hitg-game:not(.hitg-type-historical_rpg) button.hitg-button.hitg-secondary {
    background: var(--hitg-paper) !important;
    background-color: var(--hitg-paper) !important;
}

.hitg-game:not(.hitg-type-historical_rpg) .hitg-start-context,
.hitg-game:not(.hitg-type-historical_rpg) .hitg-feedback,
.hitg-game:not(.hitg-type-historical_rpg) .hitg-result-learning,
.hitg-game:not(.hitg-type-historical_rpg) .hitg-share-fallback {
    background-color: rgba(251, 246, 242, .72) !important;
}

/* The flag itself keeps a neutral paper surface so white areas of flags remain visible. */
.hitg-game:not(.hitg-type-historical_rpg) .hitg-flag-frame-inner,
.hitg-game:not(.hitg-type-historical_rpg) .hitg-flag-image-option {
    background: #fbf8f4 !important;
    background-color: #fbf8f4 !important;
}

/* Larger, touch-friendly controls without changing desktop density. */
.hitg-game button,
.hitg-game input,
.hitg-game select,
.hitg-game textarea {
    touch-action: manipulation;
}
.hitg-game button:not(.hitg-timeline-move) {
    min-height: 44px;
}

/* RPG utility bar */
.hitg-rpg-toolbar {
    position: relative;
    z-index: 14;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(242,231,223,.09);
    background: rgba(9,13,16,.88);
    backdrop-filter: blur(14px);
}
.hitg-rpg-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.hitg-rpg-control {
    appearance: none !important;
    min-height: 36px !important;
    padding: 7px 10px !important;
    border: 1px solid rgba(242,231,223,.22) !important;
    border-radius: 4px !important;
    background: rgba(19,26,31,.86) !important;
    background-image: none !important;
    color: #f2e7df !important;
    font: inherit !important;
    font-size: .72rem !important;
    font-weight: 800 !important;
    cursor: pointer;
}
.hitg-rpg-control:hover {
    border-color: rgba(212,175,55,.72) !important;
    background: rgba(54,40,44,.94) !important;
}
.hitg-rpg-control:focus-visible,
.hitg-rpg-volume input:focus-visible {
    outline: 3px solid #d4af37 !important;
    outline-offset: 3px !important;
}
.hitg-rpg-volume {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}
.hitg-rpg-volume input {
    width: 96px;
    accent-color: #d4af37;
}
.hitg-rpg-audio-note {
    max-width: 650px;
    margin: -8px 0 20px;
    color: #d8c9c2;
    font-size: .82rem;
    line-height: 1.55;
}
.hitg-rpg-audio-note::before {
    content: "◉ ";
    color: #d4af37;
}
.hitg-rpg-ghost {
    background: transparent !important;
    border-color: rgba(242,231,223,.2) !important;
    color: #d8c9c2 !important;
}

/* Cinematic visual layers. */
.hitg-rpg-backdrop > span {
    position: absolute;
    pointer-events: none;
}
.hitg-rpg-sky,
.hitg-rpg-sea,
.hitg-rpg-wave,
.hitg-rpg-ships,
.hitg-rpg-radar,
.hitg-rpg-radio-lines,
.hitg-rpg-tracers,
.hitg-rpg-vignette {
    inset: 0;
}
.hitg-rpg-sky {
    z-index: 1;
    background: linear-gradient(180deg, rgba(128,158,168,.13), transparent 52%);
}
.hitg-rpg-sea {
    z-index: 3;
    top: 53%;
    background:
        repeating-linear-gradient(176deg, rgba(205,225,230,.08) 0 1px, transparent 1px 17px),
        linear-gradient(180deg, rgba(13,30,38,.08), rgba(2,10,14,.58));
    transform: perspective(520px) rotateX(62deg) scale(1.45);
    transform-origin: 50% 0;
}
.hitg-rpg-wave {
    z-index: 4;
    top: 58%;
    height: 16%;
    border-top: 1px solid rgba(202,225,231,.14);
    filter: blur(.2px);
    opacity: .7;
    animation: hitgRpgWave 8s ease-in-out infinite alternate;
}
.hitg-rpg-wave-b { top: 66%; opacity: .45; animation-duration: 11s; animation-direction: alternate-reverse; }
.hitg-rpg-wave-c { top: 76%; opacity: .32; animation-duration: 14s; }
.hitg-rpg-ships {
    z-index: 7;
    top: 43%;
    height: 25%;
}
.hitg-rpg-ships i {
    position: absolute;
    width: 9%;
    min-width: 48px;
    height: 12px;
    border-radius: 2px 7px 1px 1px;
    background: #091116;
    box-shadow: 0 10px 14px rgba(0,0,0,.42);
    opacity: .86;
}
.hitg-rpg-ships i::before {
    content: "";
    position: absolute;
    right: 28%;
    bottom: 8px;
    width: 22%;
    height: 8px;
    background: #091116;
    clip-path: polygon(18% 100%, 32% 0, 76% 0, 100% 100%);
}
.hitg-rpg-ships i:nth-child(1){right:10%;top:20%;transform:scale(.66)}
.hitg-rpg-ships i:nth-child(2){right:30%;top:51%;transform:scale(1.05)}
.hitg-rpg-ships i:nth-child(3){right:51%;top:13%;transform:scale(.55)}
.hitg-rpg-ships i:nth-child(4){right:68%;top:60%;transform:scale(.82)}
.hitg-rpg-ships i:nth-child(5){right:84%;top:31%;transform:scale(.42)}

.hitg-rpg-radar {
    display: none;
    z-index: 7;
    top: 20%;
    right: auto;
    bottom: auto;
    left: 64%;
    width: min(260px,34vw);
    aspect-ratio: 1;
    border: 1px solid rgba(143,203,157,.28);
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle, transparent 0 35px, rgba(143,203,157,.13) 36px 37px),
        linear-gradient(90deg, transparent 49.5%, rgba(143,203,157,.12) 50%, transparent 50.5%),
        linear-gradient(0deg, transparent 49.5%, rgba(143,203,157,.12) 50%, transparent 50.5%);
}
.hitg-rpg-radar::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(from 0deg, rgba(128,210,149,.35), transparent 17%);
    animation: hitgRpgRadar 4.2s linear infinite;
}
.hitg-rpg-radar i {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9fe0ae;
    box-shadow: 0 0 14px #9fe0ae;
}
.hitg-rpg-radar i:nth-child(1){right:27%;top:34%}
.hitg-rpg-radar i:nth-child(2){left:29%;bottom:31%}
.hitg-rpg-radar i:nth-child(3){right:48%;bottom:18%}

.hitg-rpg-radio-lines {
    display: none;
    z-index: 7;
    inset: 20% 58% auto 8%;
    height: 33%;
    border: 1px solid rgba(214,185,120,.16);
    background: rgba(2,8,11,.24);
}
.hitg-rpg-radio-lines i {
    position: absolute;
    right: 8%;
    left: 8%;
    height: 1px;
    background: linear-gradient(90deg,transparent,#d3b66f,transparent);
    opacity: .72;
    animation: hitgRpgSignal 1.6s ease-in-out infinite;
}
.hitg-rpg-radio-lines i:nth-child(1){top:18%}
.hitg-rpg-radio-lines i:nth-child(2){top:40%;animation-duration:2.1s;animation-direction:reverse}
.hitg-rpg-radio-lines i:nth-child(3){top:62%;animation-duration:1.2s}
.hitg-rpg-radio-lines i:nth-child(4){top:80%;animation-duration:2.7s;animation-direction:reverse}

.hitg-rpg-tracers {
    display: none;
    z-index: 11;
}
.hitg-rpg-tracers i {
    position: absolute;
    width: 34%;
    height: 2px;
    background: linear-gradient(90deg,transparent,#e5ad54,#fff1bd);
    box-shadow: 0 0 9px rgba(246,197,105,.7);
    transform: rotate(-27deg);
    opacity: 0;
    animation: hitgRpgTracer 3.2s linear infinite;
}
.hitg-rpg-tracers i:nth-child(1){right:5%;top:22%}
.hitg-rpg-tracers i:nth-child(2){right:40%;top:31%;animation-delay:.8s}
.hitg-rpg-tracers i:nth-child(3){right:18%;top:47%;animation-delay:1.5s}
.hitg-rpg-tracers i:nth-child(4){right:54%;top:18%;animation-delay:2.2s}
.hitg-rpg-vignette {
    z-index: 18;
    box-shadow: inset 0 0 140px rgba(0,0,0,.76);
}

.hitg-rpg-backdrop[data-visual="radio"] .hitg-rpg-radio-lines,
.hitg-rpg-backdrop[data-visual="admiralty"] .hitg-rpg-radio-lines { display:block; }
.hitg-rpg-backdrop[data-visual="attack"] .hitg-rpg-tracers { display:block; }
.hitg-rpg-backdrop[data-visual="radio"] .hitg-rpg-radar { display:block; }
.hitg-rpg-backdrop[data-visual="admiralty"] .hitg-rpg-sea,
.hitg-rpg-backdrop[data-visual="admiralty"] .hitg-rpg-wave,
.hitg-rpg-backdrop[data-visual="admiralty"] .hitg-rpg-ships { opacity:.18; }
.hitg-rpg-backdrop[data-visual="attack"]::before {
    content:"";
    position:absolute;
    inset:0;
    z-index:10;
    background:radial-gradient(circle at 72% 31%,rgba(201,78,42,.35),transparent 15%);
    animation:hitgRpgBlast 3.6s ease-in-out infinite;
}

.hitg-rpg-consequence { position:relative; overflow:hidden; isolation:isolate; padding:0; }
.hitg-rpg-consequence .hitg-rpg-backdrop { z-index:-2; }
.hitg-rpg-consequence-content {
    position:relative;
    z-index:3;
    display:flex;
    min-height:min(650px,75vh);
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;
    width:min(780px,92%);
    padding:clamp(36px,8vw,90px);
}
.hitg-rpg-choice.is-selected {
    border-color:#d4af37 !important;
    box-shadow:0 0 0 2px rgba(212,175,55,.16) !important;
}

.hitg-type-historical_rpg:fullscreen,
.hitg-type-historical_rpg:-webkit-full-screen {
    width:100vw;
    max-width:none;
    height:100vh;
    margin:0;
    background:#090d10;
    overflow:auto;
}
.hitg-type-historical_rpg:fullscreen .hitg-shell,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-shell {
    min-height:100vh;
    border:0;
    border-radius:0;
}

@keyframes hitgRpgWave { from{transform:translateX(-1.5%) scaleY(.92)} to{transform:translateX(1.5%) scaleY(1.08)} }
@keyframes hitgRpgRadar { to{transform:rotate(360deg)} }
@keyframes hitgRpgSignal { 0%,100%{opacity:.2;transform:scaleX(.62)} 50%{opacity:.9;transform:scaleX(1)} }
@keyframes hitgRpgTracer { 0%,72%{opacity:0;transform:translate(20%,20%) rotate(-27deg)} 76%{opacity:1} 89%{opacity:.7} 100%{opacity:0;transform:translate(-55%,-42%) rotate(-27deg)} }
@keyframes hitgRpgBlast { 0%,74%,100%{opacity:.05} 78%{opacity:.72} 82%{opacity:.12} }

@media (max-width:760px) {
    .hitg-rpg-toolbar { align-items:flex-start; flex-direction:column; padding:9px 10px; }
    .hitg-rpg-toolbar-group { width:100%; flex-wrap:wrap; }
    .hitg-rpg-volume { flex:1 1 120px; }
    .hitg-rpg-volume input { width:min(150px,100%); }
    .hitg-rpg-radar { left:55%; width:180px; opacity:.7; }
    .hitg-rpg-radio-lines { inset:16% 44% auto 5%; }
    .hitg-rpg-consequence-content { width:100%; padding:34px 18px; }
}

@media (max-width:480px) {
    .hitg-rpg-control { flex:1 1 auto; }
    .hitg-rpg-toolbar-group:last-child .hitg-rpg-control { min-width:calc(50% - 4px); }
    .hitg-rpg-radar { left:48%; width:150px; }
    .hitg-rpg-radio-lines { inset:14% 36% auto 4%; }
}

@media (prefers-reduced-motion: reduce) {
    .hitg-rpg-wave,
    .hitg-rpg-radar::after,
    .hitg-rpg-radio-lines i,
    .hitg-rpg-tracers i,
    .hitg-rpg-backdrop[data-visual="attack"]::before {
        animation:none !important;
    }
}

@media (forced-colors: active) {
    .hitg-rpg-toolbar,
    .hitg-rpg-control,
    .hitg-rpg-volume,
    .hitg-rpg-consequence-content {
        forced-color-adjust:auto;
    }
    .hitg-rpg-control { border:2px solid CanvasText !important; }
}

/* =========================================================
   Historical RPG 5.2 - real-time tactical layer
   ========================================================= */
.hitg-type-historical_rpg .hitg-shell.is-mission{background:#09171d!important}
.hitg-rpg-mission{position:relative;min-height:680px;background:#09171d;color:#f2e7df;overflow:hidden;border-radius:0 0 16px 16px}
.hitg-rpg-mission-brief{position:relative;z-index:5;padding:18px clamp(18px,3vw,34px);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 24px;align-items:end;background:linear-gradient(180deg,rgba(7,16,21,.98),rgba(7,16,21,.72));border-bottom:1px solid rgba(212,175,55,.24)}
.hitg-rpg-mission-brief .hitg-rpg-kicker{grid-column:1/-1;margin:0;color:#d4af37}
.hitg-rpg-mission-brief h2{margin:0!important;color:#fff!important;font-size:clamp(1.45rem,3vw,2.35rem)!important;line-height:1.08!important}
.hitg-rpg-mission-brief p{grid-column:1/2;max-width:780px;margin:4px 0 0;color:#d5e0e1;line-height:1.65}
.hitg-rpg-mission-accessibility{grid-column:2/3!important;grid-row:2/4;max-width:330px!important;padding:10px 12px;border:1px solid rgba(242,231,223,.13);border-radius:10px;background:rgba(242,231,223,.06);font-size:.78rem;color:#bfcacc!important}
.hitg-rpg-mission-host{position:relative;min-height:590px}

.hitg-tactical-host{position:relative;width:100%;height:100%;min-height:590px;background:#0c2732}
.hitg-tactical-frame{position:relative;width:100%;height:min(720px,72vh);min-height:590px;overflow:hidden;isolation:isolate;background:#0b2732;touch-action:none;user-select:none}
.hitg-tactical-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;background:#143744}
.hitg-tactical-top{position:absolute;z-index:10;top:14px;right:14px;left:14px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;pointer-events:none}
.hitg-tactical-objective{max-width:min(570px,62%);padding:11px 14px;border:1px solid rgba(242,231,223,.16);border-radius:10px;background:rgba(4,15,20,.78);backdrop-filter:blur(10px);box-shadow:0 8px 28px rgba(0,0,0,.25)}
.hitg-tactical-objective span{display:block;margin-bottom:3px;color:#d4af37;font-size:.68rem;font-weight:900;letter-spacing:.05em}
.hitg-tactical-objective strong{display:block;color:#fff;font-size:clamp(.92rem,1.7vw,1.15rem);line-height:1.35}
.hitg-tactical-metrics{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;max-width:42%}
.hitg-tactical-metrics span{min-height:34px;padding:8px 11px;border:1px solid rgba(242,231,223,.15);border-radius:8px;background:rgba(4,15,20,.78);color:#e9f2f3;font-size:.72rem;font-weight:850;backdrop-filter:blur(10px)}
.hitg-tactical-alert{position:absolute;z-index:12;top:92px;left:50%;transform:translateX(-50%);max-width:min(86%,520px);padding:9px 14px;border:1px solid rgba(255,177,91,.65);border-radius:8px;background:rgba(39,17,15,.9);color:#ffd69b;font-size:.83rem;font-weight:900;text-align:center;box-shadow:0 12px 30px rgba(0,0,0,.25)}
.hitg-tactical-controls{position:absolute;z-index:11;right:16px;bottom:16px;left:16px;display:flex;align-items:end;justify-content:space-between;gap:16px;pointer-events:none}
.hitg-tactical-pad,.hitg-tactical-actions{display:flex;gap:8px;align-items:center;pointer-events:auto}
.hitg-tactical-pad{display:grid;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(2,48px);grid-template-areas:"left up right" ". down ."}
.hitg-tactical-pad-btn,.hitg-tactical-fire,.hitg-tactical-action{appearance:none!important;border:1px solid rgba(242,231,223,.28)!important;background:rgba(8,22,28,.82)!important;background-image:none!important;color:#fff!important;box-shadow:0 8px 22px rgba(0,0,0,.2);backdrop-filter:blur(9px);font-family:inherit;font-weight:900;cursor:pointer;transition:transform .12s ease,border-color .12s ease,background .12s ease}
.hitg-tactical-pad-btn{width:48px;height:48px;border-radius:50%!important;font-size:1rem;line-height:1}
.hitg-tactical-pad-btn:nth-child(1){grid-area:left}.hitg-tactical-pad-btn:nth-child(2){grid-area:up}.hitg-tactical-pad-btn:nth-child(3){grid-area:right}.hitg-tactical-pad-btn:nth-child(4){grid-area:down}
.hitg-tactical-fire{min-width:72px;height:72px;border-radius:50%!important;border-color:rgba(212,175,55,.72)!important;background:radial-gradient(circle at 35% 30%,#6a4831,#2a1714)!important;color:#ffe6a9!important;font-size:.92rem}
.hitg-tactical-action{min-height:44px;padding:8px 12px;border-radius:8px!important;font-size:.72rem}
.hitg-tactical-pad-btn:is(:hover,.is-active),.hitg-tactical-action:is(:hover,.is-active),.hitg-tactical-fire:is(:hover,.is-active){transform:translateY(-2px);border-color:#d4af37!important;background:rgba(53,42,30,.9)!important}
.hitg-tactical-pad-btn:focus-visible,.hitg-tactical-action:focus-visible,.hitg-tactical-fire:focus-visible{outline:3px solid #f2d27d!important;outline-offset:3px}
.hitg-tactical-actions{flex-wrap:wrap;justify-content:flex-end;max-width:420px}
.hitg-tactical-help{position:absolute;z-index:9;right:50%;bottom:18px;transform:translateX(50%);display:flex;flex-wrap:wrap;justify-content:center;gap:6px 12px;max-width:46%;padding:7px 10px;border-radius:8px;background:rgba(4,15,20,.62);color:#b9c7c9;font-size:.64rem;pointer-events:none}
.hitg-tactical-frame.is-high-contrast .hitg-tactical-objective,.hitg-tactical-frame.is-high-contrast .hitg-tactical-metrics span,.hitg-tactical-frame.is-high-contrast .hitg-tactical-pad-btn,.hitg-tactical-frame.is-high-contrast .hitg-tactical-action{background:#000!important;color:#fff!important;border-color:#fff!important}

.hitg-rpg-mission-debrief{position:relative;min-height:min(680px,76vh);overflow:hidden;background:#101a1f;color:#f2e7df}
.hitg-rpg-mission-debrief>.hitg-rpg-backdrop{z-index:0}
.hitg-rpg-mission-debrief-body{position:relative;z-index:3;display:flex;min-height:min(680px,76vh);flex-direction:column;justify-content:center;align-items:flex-start;width:min(100% - 32px,900px);margin:auto;padding:clamp(44px,8vw,90px) 0}
.hitg-rpg-mission-debrief-body h2{margin:0 0 12px!important;color:#fff!important;font-size:clamp(2rem,5vw,4rem)!important;line-height:1!important}
.hitg-rpg-mission-debrief-body>p{max-width:680px;margin:0 0 20px;color:#d7e0df;font-size:1rem;line-height:1.75}
.hitg-rpg-mission-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:min(100%,720px);margin:8px 0 18px}
.hitg-rpg-mission-result-grid>div{padding:15px;border:1px solid rgba(242,231,223,.12);border-radius:9px;background:rgba(8,18,22,.72)}
.hitg-rpg-mission-result-grid strong{display:block;color:#f0d27a;font-size:1.45rem;line-height:1}
.hitg-rpg-mission-result-grid span{display:block;margin-top:6px;color:#bdc8c8;font-size:.74rem}
.hitg-rpg-mission-strip{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:16px 0 4px;padding:11px 13px;border:1px solid rgba(212,175,55,.24);background:rgba(212,175,55,.08)}
.hitg-rpg-mission-strip strong{color:#f2d486;font-size:.8rem}.hitg-rpg-mission-strip span{color:#d9ceca;font-size:.75rem}

/* Cinematic polish */
.hitg-type-historical_rpg .hitg-rpg-start-body,.hitg-type-historical_rpg .hitg-rpg-scene-content,.hitg-type-historical_rpg .hitg-rpg-ending-content{max-width:920px}
.hitg-type-historical_rpg .hitg-rpg-scene-content{padding-bottom:64px}
.hitg-type-historical_rpg .hitg-rpg-choice{border-radius:10px!important;background:linear-gradient(90deg,rgba(18,26,30,.94),rgba(22,19,22,.78))!important;box-shadow:0 12px 28px rgba(0,0,0,.12)}
.hitg-type-historical_rpg .hitg-rpg-choice:hover:not(:disabled){background:linear-gradient(90deg,rgba(53,50,37,.95),rgba(35,28,30,.94))!important;box-shadow:0 16px 34px rgba(0,0,0,.22)}
.hitg-type-historical_rpg .hitg-rpg-toolbar{background:linear-gradient(90deg,rgba(6,15,19,.92),rgba(16,12,14,.82));border-color:rgba(242,231,223,.12)}

@media(max-width:820px){
 .hitg-rpg-mission-brief{grid-template-columns:1fr}.hitg-rpg-mission-accessibility{grid-column:1!important;grid-row:auto;max-width:none!important}.hitg-tactical-frame{height:68vh;min-height:560px}.hitg-tactical-top{top:10px;right:10px;left:10px}.hitg-tactical-objective{max-width:68%;padding:9px 10px}.hitg-tactical-metrics{max-width:32%;gap:4px}.hitg-tactical-metrics span{padding:6px 8px;font-size:.64rem}.hitg-tactical-help{display:none}.hitg-tactical-controls{right:10px;bottom:10px;left:10px}.hitg-tactical-actions{max-width:230px}.hitg-tactical-action{min-height:42px;padding:7px 9px}.hitg-rpg-mission-result-grid{grid-template-columns:1fr 1fr}.hitg-rpg-mission-result-grid>div:last-child{grid-column:1/-1}
}
@media(max-width:520px){
 .hitg-rpg-mission{min-height:650px}.hitg-rpg-mission-host{min-height:520px}.hitg-tactical-frame{height:66vh;min-height:520px}.hitg-tactical-objective{max-width:64%}.hitg-tactical-objective strong{font-size:.83rem}.hitg-tactical-metrics{max-width:36%;flex-direction:column;align-items:flex-end}.hitg-tactical-metrics span{min-height:28px;padding:5px 7px}.hitg-tactical-pad{grid-template-columns:repeat(3,42px);grid-template-rows:repeat(2,42px)}.hitg-tactical-pad-btn{width:42px;height:42px}.hitg-tactical-fire{width:62px;min-width:62px;height:62px}.hitg-tactical-actions{gap:5px;max-width:180px}.hitg-tactical-action{font-size:.65rem;min-height:38px}.hitg-rpg-mission-result-grid{grid-template-columns:1fr}.hitg-rpg-mission-result-grid>div:last-child{grid-column:auto}
}
@media(prefers-reduced-motion:reduce){
 .hitg-tactical-pad-btn,.hitg-tactical-fire,.hitg-tactical-action{transition:none!important}.hitg-tactical-pad-btn:is(:hover,.is-active),.hitg-tactical-action:is(:hover,.is-active),.hitg-tactical-fire:is(:hover,.is-active){transform:none!important}
}
@media(forced-colors:active){
 .hitg-tactical-frame,.hitg-rpg-mission,.hitg-rpg-mission-debrief{forced-color-adjust:auto}.hitg-tactical-objective,.hitg-tactical-metrics span,.hitg-tactical-pad-btn,.hitg-tactical-fire,.hitg-tactical-action,.hitg-rpg-mission-result-grid>div{border:2px solid CanvasText!important;background:Canvas!important;color:CanvasText!important}
}

/* =========================================================
   V6.0 COLD WAR OPEN WORLD
   ========================================================= */
.hitg-rpg-world{
    position:relative;
    overflow:hidden;
    min-height:720px;
    padding:clamp(18px,3vw,34px);
    border:1px solid rgba(242,231,223,.16);
    border-radius:24px;
    background:
        radial-gradient(circle at 18% 16%,rgba(184,149,82,.11),transparent 28%),
        linear-gradient(145deg,#121416 0%,#1b2024 52%,#101214 100%);
    color:#f2e7df;
    box-shadow:0 24px 70px rgba(15,10,12,.26);
}
.hitg-rpg-world::before{
    content:"";position:absolute;inset:0;pointer-events:none;opacity:.18;
    background-image:linear-gradient(rgba(242,231,223,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(242,231,223,.035) 1px,transparent 1px);
    background-size:32px 32px;
}
.hitg-rpg-world>*{position:relative;z-index:1}
.hitg-rpg-world-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 28px;align-items:end;margin:14px 0 22px}
.hitg-rpg-world-head .hitg-rpg-kicker{grid-column:1/-1}
.hitg-rpg-world-head h2{margin:0;color:#fffaf5;font-size:clamp(1.8rem,4vw,3.3rem);line-height:1.03}
.hitg-rpg-world-head p{margin:0;max-width:740px;color:rgba(242,231,223,.76);line-height:1.7}
.hitg-rpg-world-score{grid-row:2/4;grid-column:2;display:grid;min-width:150px;padding:14px 18px;border:1px solid rgba(184,149,82,.38);border-radius:16px;background:rgba(12,14,16,.68);text-align:center}
.hitg-rpg-world-score strong{font-size:2rem;color:#e2c487;line-height:1}
.hitg-rpg-world-score span{font-size:.78rem;font-weight:800;color:#fff}
.hitg-rpg-world-score small{margin-top:4px;color:rgba(242,231,223,.65)}
.hitg-rpg-world-map{position:relative;min-height:520px;overflow:hidden;border:1px solid rgba(242,231,223,.12);border-radius:22px;background:radial-gradient(circle at 50% 40%,rgba(64,83,91,.28),transparent 52%),linear-gradient(160deg,#162026,#0d1215)}
.hitg-rpg-world-map::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 49.8%,rgba(184,149,82,.08) 50%,transparent 50.2%),linear-gradient(transparent 49.8%,rgba(184,149,82,.08) 50%,transparent 50.2%)}
.hitg-rpg-world-svg{position:absolute;inset:0;width:100%;height:100%;fill:rgba(183,198,203,.10);stroke:rgba(226,196,135,.17);stroke-width:1.1;filter:drop-shadow(0 12px 30px rgba(0,0,0,.18))}
.hitg-rpg-world-node{appearance:none;position:absolute;z-index:3;display:flex;align-items:center;gap:10px;max-width:220px;transform:translate(-50%,-50%);padding:0;border:0;background:transparent;color:#f2e7df;text-align:right;cursor:pointer}
.hitg-rpg-world-node:focus-visible{outline:3px solid #e2c487;outline-offset:7px;border-radius:10px}
.hitg-rpg-world-dot{position:relative;width:20px;height:20px;flex:0 0 20px;border:3px solid #e2c487;border-radius:50%;background:#173f4b;box-shadow:0 0 0 7px rgba(125,188,160,.12),0 0 24px rgba(125,188,160,.28)}
.hitg-rpg-world-dot::after{content:"";position:absolute;inset:4px;border-radius:50%;background:#fff4d6}
.hitg-rpg-world-node-copy{display:flex;flex-direction:column;min-width:0;padding:9px 11px;border:1px solid rgba(242,231,223,.14);border-radius:12px;background:rgba(14,18,20,.82);backdrop-filter:blur(10px);box-shadow:0 8px 24px rgba(0,0,0,.16)}
.hitg-rpg-world-node-copy strong{font-size:.92rem;color:#fff;line-height:1.25}
.hitg-rpg-world-node-copy>span{margin-top:3px;font-size:.69rem;color:rgba(242,231,223,.65)}
.hitg-rpg-world-node-copy small{margin-top:4px;color:#d9bc83;font-size:.64rem;line-height:1.35}
.hitg-rpg-world-node.is-complete .hitg-rpg-world-dot{background:#285e4a;border-color:#9ad5b4}
.hitg-rpg-world-node.is-complete .hitg-rpg-world-node-copy{border-color:rgba(154,213,180,.32)}
.hitg-rpg-world-node.is-final .hitg-rpg-world-dot{width:26px;height:26px;flex-basis:26px;border-color:#fff0bd;box-shadow:0 0 0 9px rgba(226,196,135,.12),0 0 38px rgba(226,196,135,.42)}
.hitg-rpg-world-node.is-locked{cursor:not-allowed;opacity:.46;filter:grayscale(.35)}
.hitg-rpg-world-node.is-locked .hitg-rpg-world-dot{border-color:#8c9295;background:#30363a;box-shadow:none}
@media (hover:hover) and (pointer:fine){.hitg-rpg-world-node:not(.is-locked):hover{z-index:6}.hitg-rpg-world-node:not(.is-locked):hover .hitg-rpg-world-node-copy{transform:translateY(-3px);border-color:rgba(226,196,135,.48);box-shadow:0 14px 34px rgba(0,0,0,.24)}.hitg-rpg-world-node-copy{transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}}
.hitg-rpg-world-lower{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:18px;margin-top:20px;align-items:start}
.hitg-rpg-world-library{padding:18px;border:1px solid rgba(242,231,223,.12);border-radius:18px;background:rgba(255,255,255,.035)}
.hitg-rpg-world-library h3{margin:0 0 10px;color:#fff;font-size:1.15rem}
.hitg-rpg-world-library>p{margin:0;color:rgba(242,231,223,.66);line-height:1.65}
.hitg-rpg-world-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hitg-rpg-world-resource{display:flex;flex-direction:column;min-height:108px;padding:13px 14px;border:1px solid rgba(226,196,135,.2);border-radius:14px;background:#f2e7df;color:#372126!important;text-decoration:none!important}
.hitg-rpg-world-resource span{font-size:.66rem;font-weight:850;color:#806333}
.hitg-rpg-world-resource strong{margin-top:5px;font-size:.9rem;line-height:1.35}
.hitg-rpg-world-resource small{margin-top:auto;padding-top:8px;color:#6d6264;font-size:.67rem}
.hitg-rpg-world-resource:focus-visible{outline:3px solid #e2c487;outline-offset:3px}
.hitg-rpg-knowledge-award{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:12px 0;padding:12px 14px;border:1px solid rgba(226,196,135,.28);border-radius:14px;background:rgba(226,196,135,.08)}
.hitg-rpg-knowledge-award strong{color:#f3d99f}.hitg-rpg-knowledge-award span{font-size:.78rem;color:rgba(242,231,223,.72)}
.hitg-rpg-unlocked-article{display:flex;flex-direction:column;margin:10px 0 16px;padding:13px 15px;border:1px solid rgba(242,231,223,.17);border-radius:14px;background:#f2e7df;color:#372126!important;text-decoration:none!important}
.hitg-rpg-unlocked-article span{font-size:.69rem;font-weight:800;color:#806333}.hitg-rpg-unlocked-article strong{margin-top:3px}
.hitg-rpg-backdrop[data-visual="space"] .hitg-rpg-sky{background:radial-gradient(circle at 72% 24%,rgba(255,255,255,.9) 0 1px,transparent 2px),radial-gradient(circle at 22% 38%,rgba(255,255,255,.7) 0 1px,transparent 2px),linear-gradient(#07101b,#151f2f)}
.hitg-rpg-backdrop[data-visual="berlin"] .hitg-rpg-grid{opacity:.45;background:repeating-linear-gradient(90deg,transparent 0 40px,rgba(242,231,223,.11) 41px 43px)}
.hitg-rpg-backdrop[data-visual="coldwar"] .hitg-rpg-sky{background:linear-gradient(135deg,#182127,#173f4b 140%)}

@media(max-width:840px){
 .hitg-rpg-world{padding:16px;min-height:0}.hitg-rpg-world-head{grid-template-columns:1fr}.hitg-rpg-world-score{grid-column:1;grid-row:auto;justify-self:start;min-width:0;grid-template-columns:auto auto auto;align-items:center;gap:8px 12px;text-align:right}.hitg-rpg-world-score strong{font-size:1.4rem}.hitg-rpg-world-map{min-height:660px}.hitg-rpg-world-node{max-width:175px}.hitg-rpg-world-lower{grid-template-columns:1fr}.hitg-rpg-world-library-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
 .hitg-rpg-world-map{min-height:760px}.hitg-rpg-world-svg{opacity:.55}.hitg-rpg-world-node{max-width:150px}.hitg-rpg-world-node-copy{padding:7px 8px}.hitg-rpg-world-node-copy strong{font-size:.78rem}.hitg-rpg-world-node-copy>span{font-size:.61rem}.hitg-rpg-world-library-grid{grid-template-columns:1fr}.hitg-rpg-knowledge-award{align-items:flex-start;flex-direction:column}
}
@media(prefers-reduced-motion:reduce){.hitg-rpg-world-node-copy{transition:none!important}}
@media(forced-colors:active){.hitg-rpg-world,.hitg-rpg-world-map,.hitg-rpg-world-node-copy,.hitg-rpg-world-library,.hitg-rpg-world-resource,.hitg-rpg-unlocked-article{forced-color-adjust:auto;border:1px solid CanvasText}}

/* =========================================================
   V6.1 OPEN-WORLD MICRO-GAMES
   ========================================================= */
.hitg-openworld-mini{position:relative;min-height:620px;overflow:hidden;border:1px solid rgba(242,231,223,.14);border-radius:22px;background:#11191d;box-shadow:0 24px 60px rgba(0,0,0,.24);isolation:isolate}
.hitg-openworld-mini-top{position:absolute;z-index:5;top:14px;right:14px;left:14px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;pointer-events:none}
.hitg-openworld-mini-objective{display:flex;max-width:min(680px,72%);flex-direction:column;padding:10px 13px;border:1px solid rgba(242,231,223,.16);border-radius:13px;background:rgba(9,14,17,.82);backdrop-filter:blur(10px);box-shadow:0 10px 28px rgba(0,0,0,.15)}
.hitg-openworld-mini-objective strong{color:#fff;font-size:.92rem}.hitg-openworld-mini-objective span{margin-top:3px;color:rgba(242,231,223,.72);font-size:.72rem;line-height:1.45}
.hitg-openworld-mini-timer{display:grid;min-width:74px;min-height:48px;place-items:center;padding:8px 12px;border:1px solid rgba(226,196,135,.38);border-radius:13px;background:rgba(9,14,17,.84);color:#f2d89f;font-variant-numeric:tabular-nums;font-size:1.05rem;font-weight:900;backdrop-filter:blur(10px)}
.hitg-openworld-mini-canvas{display:block;width:100%;height:620px;touch-action:none;background:#10181c}
.hitg-openworld-mini-alert{position:absolute;z-index:6;top:95px;left:50%;transform:translateX(-50%);max-width:min(82%,560px);padding:8px 13px;border:1px solid rgba(226,196,135,.34);border-radius:999px;background:rgba(16,30,28,.94);color:#d8f1e5;font-size:.78rem;font-weight:850;text-align:center;box-shadow:0 8px 28px rgba(0,0,0,.2)}
.hitg-openworld-mini-alert.is-bad{border-color:rgba(201,143,76,.5);background:rgba(62,43,24,.95);color:#ffe7bd}
.hitg-openworld-mini-controls{position:absolute;z-index:8;right:14px;bottom:14px;left:14px;display:flex;align-items:flex-end;justify-content:space-between;gap:14px;pointer-events:none}
.hitg-openworld-mini-controls>*{pointer-events:auto}
.hitg-openworld-pad{display:grid;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(2,48px);gap:5px;direction:ltr}
.hitg-openworld-pad .hitg-openworld-mini-btn:nth-child(1){grid-column:2}.hitg-openworld-pad .hitg-openworld-mini-btn:nth-child(2){grid-column:1;grid-row:2}.hitg-openworld-pad .hitg-openworld-mini-btn:nth-child(3){grid-column:2;grid-row:2}.hitg-openworld-pad .hitg-openworld-mini-btn:nth-child(4){grid-column:3;grid-row:2}
.hitg-openworld-mini-btn,.hitg-openworld-crisis-actions button,.hitg-openworld-reform-controls button,.hitg-openworld-suspect-buttons button{appearance:none;min-height:46px;padding:9px 13px;border:1px solid rgba(242,231,223,.2);border-radius:12px;background:rgba(11,18,21,.86)!important;background-image:none!important;color:#f2e7df!important;font:inherit;font-size:.76rem;font-weight:850;cursor:pointer;box-shadow:0 7px 18px rgba(0,0,0,.15);backdrop-filter:blur(9px);touch-action:manipulation}
.hitg-openworld-mini-btn{width:48px;height:48px;padding:0;font-size:1.08rem}.hitg-openworld-mini-btn.is-primary{width:auto;min-width:94px;padding:9px 16px;border-color:rgba(226,196,135,.5);background:#214752!important;color:#fff8ee!important}
.hitg-openworld-mini-btn:focus-visible,.hitg-openworld-crisis-actions button:focus-visible,.hitg-openworld-reform-controls button:focus-visible,.hitg-openworld-suspect-buttons button:focus-visible{outline:3px solid #e2c487;outline-offset:3px}
.hitg-openworld-crisis-actions,.hitg-openworld-reform-controls{display:flex;max-width:720px;flex-wrap:wrap;gap:8px;margin-inline:auto}.hitg-openworld-crisis-actions button,.hitg-openworld-reform-controls button{min-width:145px;flex:1 1 150px}
.hitg-openworld-suspect-buttons{display:grid;grid-template-columns:repeat(8,42px);gap:5px;margin-inline:auto}.hitg-openworld-suspect-buttons button{min-width:42px;width:42px;height:42px;min-height:42px;padding:0;border-radius:50%}.hitg-openworld-suspect-buttons button:disabled{opacity:.38;cursor:not-allowed}
.hitg-rpg-mission-host:has(.hitg-openworld-mini){min-height:620px}
.hitg-rpg-mission:has(.hitg-openworld-mini) .hitg-rpg-mission-brief{background:linear-gradient(135deg,rgba(20,26,30,.96),rgba(25,45,50,.92))}
@media(hover:hover) and (pointer:fine){.hitg-openworld-mini-btn:hover,.hitg-openworld-crisis-actions button:hover,.hitg-openworld-reform-controls button:hover,.hitg-openworld-suspect-buttons button:hover:not(:disabled){border-color:rgba(226,196,135,.5);background:#1d3037!important;transform:translateY(-1px)}}
@media(max-width:760px){.hitg-openworld-mini{min-height:560px;border-radius:16px}.hitg-openworld-mini-canvas{height:560px}.hitg-openworld-mini-objective{max-width:72%;padding:8px 9px}.hitg-openworld-mini-objective span{font-size:.66rem}.hitg-openworld-mini-timer{min-width:62px;min-height:42px;padding:6px 9px}.hitg-openworld-mini-controls{right:9px;bottom:9px;left:9px}.hitg-openworld-pad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px)}.hitg-openworld-mini-btn{width:44px;height:44px;min-height:44px}.hitg-openworld-crisis-actions,.hitg-openworld-reform-controls{width:100%;gap:5px}.hitg-openworld-crisis-actions button,.hitg-openworld-reform-controls button{min-width:0;min-height:42px;padding:7px 8px;font-size:.67rem}.hitg-openworld-suspect-buttons{grid-template-columns:repeat(4,40px);gap:4px}.hitg-rpg-mission-host:has(.hitg-openworld-mini){min-height:560px}}
@media(max-width:440px){.hitg-openworld-mini{min-height:520px}.hitg-openworld-mini-canvas{height:520px}.hitg-openworld-mini-top{top:8px;right:8px;left:8px}.hitg-openworld-mini-alert{top:86px;font-size:.69rem}.hitg-openworld-mini-objective strong{font-size:.78rem}.hitg-openworld-mini-objective span{display:none}.hitg-openworld-crisis-actions,.hitg-openworld-reform-controls{display:grid;grid-template-columns:1fr 1fr}.hitg-openworld-crisis-actions button:first-child{grid-column:1/-1}.hitg-rpg-mission-host:has(.hitg-openworld-mini){min-height:520px}}
@media(prefers-reduced-motion:reduce){.hitg-openworld-mini-btn,.hitg-openworld-crisis-actions button,.hitg-openworld-reform-controls button{transition:none!important;transform:none!important}}
@media(forced-colors:active){.hitg-openworld-mini,.hitg-openworld-mini-objective,.hitg-openworld-mini-timer,.hitg-openworld-mini-btn,.hitg-openworld-crisis-actions button,.hitg-openworld-reform-controls button,.hitg-openworld-suspect-buttons button{forced-color-adjust:auto;border:2px solid CanvasText!important;background:Canvas!important;color:CanvasText!important}}
.hitg-rpg-world-node-game{margin-top:5px!important;color:#e2c487!important;font-size:.62rem!important;font-weight:850;line-height:1.3}

/* V6.2 - geographically grounded world map and stronger cinematic motion. */
.hitg-rpg-world-map{
    direction:ltr;
    background:
        radial-gradient(circle at 54% 35%,rgba(86,112,121,.22),transparent 46%),
        linear-gradient(160deg,#101a20,#090e12 72%);
}
.hitg-rpg-world-map::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:0;
    pointer-events:none;
    background:url('../images/world-map.svg') center/100% 100% no-repeat;
    opacity:.98;
    filter:drop-shadow(0 14px 30px rgba(0,0,0,.2));
}
.hitg-rpg-world-map::after{
    z-index:1;
    background:
        radial-gradient(circle at 50% 45%,transparent 0 40%,rgba(5,10,13,.18) 78%,rgba(4,8,10,.52) 100%),
        linear-gradient(90deg,transparent 49.9%,rgba(226,196,135,.035) 50%,transparent 50.1%),
        linear-gradient(transparent 49.9%,rgba(226,196,135,.035) 50%,transparent 50.1%);
}
.hitg-rpg-world-routes{position:absolute;inset:0;z-index:2;width:100%;height:100%;overflow:visible;pointer-events:none}
.hitg-rpg-world-route{fill:none;stroke:rgba(226,196,135,.46);stroke-width:1.6;stroke-dasharray:7 7;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 5px rgba(226,196,135,.12));animation:hitgWorldRoute 8s linear infinite}
.hitg-rpg-world-route.is-complete{stroke:rgba(154,213,180,.55)}
.hitg-rpg-world-site{position:absolute;z-index:3;width:10px;height:10px;transform:translate(-50%,-50%);border:2px solid #e2c487;border-radius:50%;background:#173f4b;box-shadow:0 0 0 5px rgba(125,188,160,.10),0 0 18px rgba(125,188,160,.24);pointer-events:none}
.hitg-rpg-world-site.is-primary{width:13px;height:13px}
.hitg-rpg-world-site.is-primary::after{content:"";position:absolute;inset:-8px;border:1px solid rgba(226,196,135,.34);border-radius:50%;animation:hitgWorldPulse 2.5s ease-out infinite}
.hitg-rpg-world-site.is-complete{border-color:#9ad5b4;background:#285e4a;box-shadow:0 0 0 5px rgba(154,213,180,.10),0 0 18px rgba(154,213,180,.2)}
.hitg-rpg-world-site.is-locked{border-color:#7f898d;background:#2b3336;box-shadow:none;opacity:.58}
.hitg-rpg-world-site.is-final{width:16px;height:16px;border-color:#fff0bd;box-shadow:0 0 0 7px rgba(226,196,135,.12),0 0 28px rgba(226,196,135,.34)}
.hitg-rpg-world-node{z-index:5;display:block;min-width:150px;max-width:215px;transform:translate(-50%,-50%);direction:rtl}
.hitg-rpg-world-node-copy{position:relative;direction:rtl;text-align:right;background:rgba(10,15,18,.90);box-shadow:0 12px 30px rgba(0,0,0,.24);border-color:rgba(242,231,223,.18)}
.hitg-rpg-world-node-copy::before{content:"";position:absolute;top:10px;right:10px;width:5px;height:calc(100% - 20px);border-radius:99px;background:#e2c487;opacity:.78}
.hitg-rpg-world-node-copy strong,.hitg-rpg-world-node-copy>span,.hitg-rpg-world-node-copy small{padding-right:9px}
.hitg-rpg-world-node.is-complete .hitg-rpg-world-node-copy::before{background:#9ad5b4}
.hitg-rpg-world-node.is-locked .hitg-rpg-world-node-copy::before{background:#7f898d}
.hitg-rpg-world-node.is-final .hitg-rpg-world-node-copy{border-color:rgba(255,240,189,.42);box-shadow:0 12px 36px rgba(0,0,0,.28),0 0 34px rgba(226,196,135,.08)}
.hitg-rpg-world-map-legend{position:absolute;z-index:7;bottom:12px;left:12px;display:flex;gap:12px;align-items:center;padding:7px 10px;border:1px solid rgba(242,231,223,.11);border-radius:10px;background:rgba(7,11,13,.76);color:rgba(242,231,223,.68);font-size:.64rem;backdrop-filter:blur(8px);direction:rtl}
.hitg-rpg-world-map-legend span{display:flex;align-items:center;gap:6px}.hitg-rpg-world-map-legend i{display:block;width:8px;height:8px;border:2px solid #e2c487;border-radius:50%;background:#173f4b}.hitg-rpg-world-map-legend i.is-route{width:22px;height:0;border:0;border-top:1px dashed #e2c487;border-radius:0;background:transparent}
@keyframes hitgWorldRoute{to{stroke-dashoffset:-56}}
@keyframes hitgWorldPulse{0%{transform:scale(.55);opacity:.75}70%,100%{transform:scale(1.65);opacity:0}}

/* Extra cinematic layers use only transform/opacity so they stay GPU-friendly. */
.hitg-rpg-particles,.hitg-rpg-depth-light{position:absolute;inset:0;pointer-events:none}
.hitg-rpg-particles{z-index:8;overflow:hidden;opacity:.5}
.hitg-rpg-particles i{position:absolute;top:-8%;width:3px;height:3px;border-radius:50%;background:rgba(230,239,240,.65);box-shadow:0 0 8px rgba(230,239,240,.22);animation:hitgRpgParticle 8s linear infinite}
.hitg-rpg-particles i:nth-child(1){left:7%;animation-duration:9s;animation-delay:-2s}.hitg-rpg-particles i:nth-child(2){left:16%;animation-duration:12s;animation-delay:-8s}.hitg-rpg-particles i:nth-child(3){left:28%;animation-duration:10s;animation-delay:-3s}.hitg-rpg-particles i:nth-child(4){left:39%;animation-duration:14s;animation-delay:-11s}.hitg-rpg-particles i:nth-child(5){left:51%;animation-duration:11s;animation-delay:-5s}.hitg-rpg-particles i:nth-child(6){left:63%;animation-duration:13s;animation-delay:-7s}.hitg-rpg-particles i:nth-child(7){left:72%;animation-duration:8s;animation-delay:-1s}.hitg-rpg-particles i:nth-child(8){left:81%;animation-duration:15s;animation-delay:-12s}.hitg-rpg-particles i:nth-child(9){left:90%;animation-duration:10s;animation-delay:-4s}.hitg-rpg-particles i:nth-child(10){left:96%;animation-duration:13s;animation-delay:-9s}
.hitg-rpg-depth-light{z-index:6;background:radial-gradient(ellipse at 75% 28%,rgba(226,196,135,.14),transparent 24%),linear-gradient(110deg,transparent 0 48%,rgba(226,196,135,.04) 51%,transparent 54%);mix-blend-mode:screen;animation:hitgRpgLight 9s ease-in-out infinite alternate}
.hitg-rpg-backdrop[data-visual="space"] .hitg-rpg-particles{opacity:.9}.hitg-rpg-backdrop[data-visual="space"] .hitg-rpg-particles i{background:#fff;box-shadow:0 0 8px #fff}
.hitg-rpg-backdrop[data-visual="radio"] .hitg-rpg-particles,.hitg-rpg-backdrop[data-visual="admiralty"] .hitg-rpg-particles{opacity:.28}
.hitg-rpg-backdrop[data-visual="attack"]{animation:hitgRpgImpact 3.6s ease-in-out infinite}
.hitg-rpg-backdrop[data-visual="attack"] .hitg-rpg-depth-light{background:radial-gradient(circle at 72% 32%,rgba(255,128,70,.25),transparent 22%),linear-gradient(110deg,transparent 0 50%,rgba(255,213,142,.06) 52%,transparent 54%)}
.hitg-rpg-scene-content,.hitg-rpg-start-body,.hitg-rpg-ending-content{animation:hitgRpgContentIn .55s cubic-bezier(.2,.8,.2,1) both}
@keyframes hitgRpgParticle{0%{transform:translate3d(0,-8vh,0);opacity:0}12%{opacity:.8}100%{transform:translate3d(34px,112vh,0);opacity:0}}
@keyframes hitgRpgLight{from{transform:translate3d(-2%,0,0) scale(1);opacity:.55}to{transform:translate3d(3%,-1%,0) scale(1.05);opacity:.95}}
@keyframes hitgRpgImpact{0%,74%,100%{transform:translate3d(0,0,0)}78%{transform:translate3d(-2px,1px,0)}80%{transform:translate3d(2px,-1px,0)}82%{transform:translate3d(0,0,0)}}
@keyframes hitgRpgContentIn{from{opacity:0;transform:translateY(13px)}to{opacity:1;transform:translateY(0)}}

@media(max-width:760px){
    .hitg-rpg-world-map{min-height:620px;background-position:center}.hitg-rpg-world-node{min-width:118px;max-width:145px}.hitg-rpg-world-node-copy{padding:7px 8px}.hitg-rpg-world-node-copy strong{font-size:.76rem}.hitg-rpg-world-node-copy>span{font-size:.59rem}.hitg-rpg-world-node-copy small{font-size:.57rem}.hitg-rpg-world-map-legend{right:10px;left:10px;justify-content:center}.hitg-rpg-world-site{width:9px;height:9px}.hitg-rpg-world-site.is-primary{width:11px;height:11px}
}
@media(max-width:480px){.hitg-rpg-world-map{min-height:700px}.hitg-rpg-world-node{min-width:105px;max-width:126px}.hitg-rpg-world-node-game{display:none}}
@media(prefers-reduced-motion:reduce){.hitg-rpg-world-route,.hitg-rpg-world-site.is-primary::after,.hitg-rpg-particles i,.hitg-rpg-depth-light,.hitg-rpg-backdrop[data-visual="attack"],.hitg-rpg-scene-content,.hitg-rpg-start-body,.hitg-rpg-ending-content{animation:none!important}}
@media(forced-colors:active){.hitg-rpg-world-map::before,.hitg-rpg-world-routes,.hitg-rpg-world-site,.hitg-rpg-world-map-legend{display:none}.hitg-rpg-world-node{position:relative!important;left:auto!important;top:auto!important;transform:none!important;display:block;margin:8px}.hitg-rpg-world-map{display:grid;min-height:0;gap:8px;padding:12px}}
.hitg-rpg-mission-context{display:inline-flex;align-self:flex-start;margin:4px 0 0;padding:7px 10px;border:1px solid rgba(226,196,135,.25);border-radius:999px;background:rgba(26,57,65,.42);color:#d7e8e3;font-size:.72rem;font-weight:800;line-height:1.35}
@media(max-width:560px){.hitg-rpg-mission-context{border-radius:10px;font-size:.66rem}}


/* V6.2.1 visual refinement: cooler palette, cleaner world map, and richer mini-game framing. */
.hitg-rpg-toolbar{justify-content:flex-end}
.hitg-rpg-toolbar-group:only-child{margin-inline-start:auto}
.hitg-rpg-audio-note{max-width:620px;background:rgba(16,24,28,.58);border-color:rgba(125,188,160,.4);color:#d6e4e6}

.hitg-rpg-world{
    background:
        radial-gradient(circle at 20% 16%,rgba(101,142,156,.10),transparent 24%),
        radial-gradient(circle at 78% 14%,rgba(226,196,135,.08),transparent 22%),
        linear-gradient(145deg,#10161a 0%,#141d22 46%,#0b1013 100%);
}
.hitg-rpg-world-map{
    background:
        radial-gradient(circle at 50% 34%,rgba(48,98,111,.24),transparent 42%),
        linear-gradient(160deg,#0e1b22,#0a1014 74%);
}
.hitg-rpg-world-node-copy{background:rgba(9,17,21,.92)}
.hitg-rpg-world-node-copy::before{background:#88c7a5}
.hitg-rpg-world-node-copy small{color:#b8d9c8}
.hitg-rpg-world-node.is-final .hitg-rpg-world-node-copy::before{background:#e2c487}
.hitg-rpg-world-map-legend{background:rgba(8,14,18,.82);color:rgba(230,236,237,.74)}
.hitg-rpg-world-route{stroke:rgba(136,199,165,.42);filter:drop-shadow(0 0 5px rgba(136,199,165,.12))}
.hitg-rpg-world-route.is-complete{stroke:rgba(226,196,135,.56)}

.hitg-openworld-mini{background:
    radial-gradient(circle at 18% 15%,rgba(226,196,135,.08),transparent 24%),
    radial-gradient(circle at 82% 22%,rgba(83,143,160,.08),transparent 26%),
    linear-gradient(180deg,#121a1f 0%,#0e1519 100%)}
.hitg-openworld-mini::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.16;background-image:linear-gradient(rgba(242,231,223,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(242,231,223,.04) 1px,transparent 1px);background-size:28px 28px}
.hitg-openworld-mini::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 110px rgba(0,0,0,.55);z-index:2}
.hitg-openworld-mini-top,.hitg-openworld-mini-alert,.hitg-openworld-mini-controls{z-index:9}
.hitg-openworld-mini-objective,.hitg-openworld-mini-timer{border-color:rgba(125,188,160,.22);background:rgba(8,14,18,.84)}
.hitg-openworld-mini-alert{border-color:rgba(125,188,160,.34);background:rgba(13,31,31,.94);color:#dff4eb}
.hitg-openworld-mini-btn,.hitg-openworld-crisis-actions button,.hitg-openworld-reform-controls button,.hitg-openworld-suspect-buttons button{border-color:rgba(141,200,183,.24);background:rgba(10,17,20,.9)!important}
.hitg-openworld-mini-btn.is-primary{border-color:rgba(125,188,160,.55);background:#214752!important}
@media(hover:hover) and (pointer:fine){.hitg-openworld-mini-btn:hover,.hitg-openworld-crisis-actions button:hover,.hitg-openworld-reform-controls button:hover,.hitg-openworld-suspect-buttons button:hover:not(:disabled){border-color:rgba(125,188,160,.52);background:#1d3037!important}}


/* V6.2.2 - premium visual pass */
.hitg-rpg-world-map{box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),inset 0 -80px 120px rgba(0,0,0,.18),0 18px 44px rgba(0,0,0,.18)}
.hitg-rpg-world-map::before{opacity:.92;filter:drop-shadow(0 14px 30px rgba(0,0,0,.24)) saturate(.78)}
.hitg-rpg-world-node{filter:none!important}
.hitg-rpg-world-node-copy{overflow:hidden;padding:10px 12px 11px;border-color:rgba(151,183,188,.18);background:linear-gradient(145deg,rgba(10,20,24,.96),rgba(13,24,28,.88));box-shadow:0 10px 26px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.025)}
.hitg-rpg-world-node-copy::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(125deg,rgba(255,255,255,.035),transparent 28%,transparent 72%,rgba(125,188,160,.025))}
.hitg-rpg-world-node-status{display:inline-flex!important;align-self:flex-start;margin:0 9px 7px 0!important;padding:3px 7px!important;border:1px solid rgba(136,199,165,.26);border-radius:999px;background:rgba(29,74,81,.36);color:#bfe0d2!important;font-size:.56rem!important;font-weight:900!important;letter-spacing:.025em;line-height:1.1}
.hitg-rpg-world-node.is-complete .hitg-rpg-world-node-status{border-color:rgba(154,213,180,.36);background:rgba(40,94,74,.32);color:#d6f4e3!important}
.hitg-rpg-world-node.is-locked .hitg-rpg-world-node-status{border-color:rgba(147,158,163,.2);background:rgba(47,56,60,.44);color:#aeb8bc!important}
.hitg-rpg-world-node[data-mode="orbit"] .hitg-rpg-world-node-copy::before{background:#83b5c7}
.hitg-rpg-world-node[data-mode="stealth"] .hitg-rpg-world-node-copy::before,.hitg-rpg-world-node[data-mode="intel"] .hitg-rpg-world-node-copy::before{background:#88c7a5}
.hitg-rpg-world-node[data-mode="surveillance"] .hitg-rpg-world-node-copy::before{background:#9fb8c3}
.hitg-rpg-world-node[data-mode="crisis"] .hitg-rpg-world-node-copy::before{background:#d2b36f}
.hitg-rpg-world-node[data-mode="reform"] .hitg-rpg-world-node-copy::before{background:#b2c5a2}
.hitg-rpg-world-node.is-final .hitg-rpg-world-node-status{border-color:rgba(226,196,135,.4);background:rgba(92,74,35,.3);color:#f3ddaa!important}
.hitg-rpg-world-site{border-color:#88c7a5;background:#173f4b;box-shadow:0 0 0 4px rgba(125,188,160,.10),0 0 16px rgba(125,188,160,.18)}
.hitg-rpg-world-site.is-primary::after{border-color:rgba(136,199,165,.34)}
.hitg-rpg-world-route{stroke-width:1.35;stroke-dasharray:5 8;opacity:.84}
.hitg-rpg-world-score{border-color:rgba(125,188,160,.24);background:linear-gradient(145deg,rgba(12,22,26,.78),rgba(12,16,19,.7));box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
.hitg-rpg-world-score strong{color:#d9c48d}
.hitg-rpg-world-library{background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.018));box-shadow:inset 0 1px 0 rgba(255,255,255,.02)}
.hitg-rpg-world-resource{background:linear-gradient(145deg,#f1ede4,#e7dfd2);box-shadow:0 8px 18px rgba(0,0,0,.08)}
.hitg-openworld-mini{border-color:rgba(126,164,174,.18);box-shadow:0 24px 60px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.025)}
.hitg-openworld-mini[data-mode="surveillance"]{background:linear-gradient(180deg,#131d21,#0c1215)}
.hitg-openworld-mini[data-mode="stealth"],.hitg-openworld-mini[data-mode="intel"]{background:linear-gradient(180deg,#10191e,#0b1115)}
.hitg-openworld-mini[data-mode="orbit"]{background:linear-gradient(180deg,#07121f,#0b1723)}
.hitg-openworld-mini[data-mode="crisis"],.hitg-openworld-mini[data-mode="reform"]{background:linear-gradient(180deg,#141a1d,#0d1215)}
.hitg-openworld-mini-objective{box-shadow:0 12px 30px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.025)}
.hitg-openworld-mini-timer{font-size:1rem;letter-spacing:.04em;box-shadow:0 10px 24px rgba(0,0,0,.2)}
.hitg-openworld-mini-controls{filter:drop-shadow(0 8px 18px rgba(0,0,0,.18))}
.hitg-openworld-mini-btn{border-radius:11px!important}
.hitg-openworld-pad .hitg-openworld-mini-btn{background:linear-gradient(145deg,rgba(18,32,37,.94),rgba(10,18,22,.94))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 7px 18px rgba(0,0,0,.18)}
.hitg-openworld-suspect-buttons button{border-radius:9px!important;background:linear-gradient(145deg,rgba(24,38,43,.94),rgba(11,19,23,.94))!important}
.hitg-openworld-suspect-buttons button:not(:disabled):hover{box-shadow:0 0 0 2px rgba(136,199,165,.15),0 9px 18px rgba(0,0,0,.22)}
@media(max-width:560px){.hitg-rpg-world-node-status{margin-bottom:5px!important;font-size:.52rem!important}.hitg-rpg-world-node-copy{padding:8px 9px 9px}}


/* =========================================================
   V6.2.3 - stability, progression and visual correction
   ========================================================= */
/* Exact requested canvas tone for all non-RPG games. Theme CSS must not turn it white. */
.hitg-game:not(.hitg-type-historical_rpg),
.hitg-game:not(.hitg-type-historical_rpg) .hitg-shell,
.hitg-game:not(.hitg-type-historical_rpg) .hitg-stage,
.hitg-game:not(.hitg-type-historical_rpg) .hitg-start,
.hitg-game:not(.hitg-type-historical_rpg) .hitg-question-form,
.hitg-game:not(.hitg-type-historical_rpg) .hitg-result {
    background:#f2e7df !important;
    background-color:#f2e7df !important;
}
.hitg-games-browser .hitg-card{background:#f2e7df !important;background-color:#f2e7df !important}

/* The geographic map now contains only real pins/routes. Mission cards live below it,
   so Europe no longer becomes an inaccessible pile of overlapping buttons. */
.hitg-rpg-world-map{min-height:500px !important;overflow:hidden !important}
.hitg-rpg-world-site-button{
    appearance:none !important;
    -webkit-appearance:none !important;
    pointer-events:auto !important;
    padding:0 !important;
    margin:0 !important;
    cursor:pointer;
    background:#173f4b !important;
    background-image:none !important;
    outline:0;
}
.hitg-rpg-world-site-button::before,.hitg-rpg-world-site-button::after{content:none !important;display:none !important}
.hitg-rpg-world-site-button:hover:not(:disabled){border-color:#d8c28e !important;transform:translate(-50%,-50%) scale(1.16)}
.hitg-rpg-world-site-button:focus-visible{outline:3px solid #e2c487 !important;outline-offset:5px}
.hitg-rpg-world-site-button:disabled{cursor:not-allowed}

.hitg-rpg-world-missions{margin-top:18px;padding:18px;border:1px solid rgba(136,199,165,.15);border-radius:18px;background:linear-gradient(145deg,rgba(10,20,24,.82),rgba(8,15,18,.72));box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
.hitg-rpg-world-missions-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:13px}
.hitg-rpg-world-missions-head h3{margin:0;color:#fff;font-size:1.12rem}
.hitg-rpg-world-missions-head p{max-width:610px;margin:0;color:rgba(242,231,223,.66);font-size:.76rem;line-height:1.55}
.hitg-rpg-world-mission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.hitg-rpg-world-node,
.hitg-rpg-world-node:hover,
.hitg-rpg-world-node:focus,
.hitg-rpg-world-node:active{
    appearance:none !important;
    -webkit-appearance:none !important;
    position:relative !important;
    inset:auto !important;
    left:auto !important;
    right:auto !important;
    top:auto !important;
    bottom:auto !important;
    z-index:auto !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    min-height:148px;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:14px !important;
    background:transparent !important;
    background-color:transparent !important;
    background-image:none !important;
    box-shadow:none !important;
    filter:none !important;
    transform:none !important;
    color:#f2e7df !important;
    text-align:right !important;
    font:inherit !important;
}
.hitg-rpg-world-node::before,.hitg-rpg-world-node::after{content:none !important;display:none !important;box-shadow:none !important;background:none !important}
.hitg-rpg-world-node .hitg-rpg-world-node-copy{
    display:flex !important;
    height:100%;
    min-height:148px;
    flex-direction:column;
    padding:13px 14px 14px !important;
    border:1px solid rgba(136,199,165,.18) !important;
    border-radius:14px !important;
    background:linear-gradient(145deg,rgba(12,24,29,.97),rgba(9,18,22,.93)) !important;
    box-shadow:0 10px 24px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.025) !important;
}
.hitg-rpg-world-node:not(:disabled){cursor:pointer}
.hitg-rpg-world-node:not(:disabled):hover .hitg-rpg-world-node-copy{border-color:rgba(136,199,165,.48) !important;transform:translateY(-2px);box-shadow:0 15px 30px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.04) !important}
.hitg-rpg-world-node:focus-visible{outline:3px solid #e2c487 !important;outline-offset:4px !important}
.hitg-rpg-world-node:focus-visible .hitg-rpg-world-node-copy{border-color:#e2c487 !important}
.hitg-rpg-world-node.is-locked{opacity:.58 !important;cursor:not-allowed !important}
.hitg-rpg-world-node.is-locked .hitg-rpg-world-node-copy{background:linear-gradient(145deg,rgba(26,32,35,.94),rgba(19,25,28,.92)) !important;border-color:rgba(145,157,162,.18) !important}
.hitg-rpg-world-node.is-complete .hitg-rpg-world-node-copy{border-color:rgba(154,213,180,.30) !important}
.hitg-rpg-world-node.is-final .hitg-rpg-world-node-copy{border-color:rgba(226,196,135,.34) !important}
.hitg-rpg-world-node-copy::before{right:0 !important;top:0 !important;height:100% !important;width:4px !important;border-radius:0 14px 14px 0 !important;background:#88c7a5 !important;opacity:.8 !important}
.hitg-rpg-world-node-copy::after{background:linear-gradient(125deg,rgba(255,255,255,.028),transparent 36%,rgba(125,188,160,.02)) !important}
.hitg-rpg-world-node-copy strong,.hitg-rpg-world-node-copy>span,.hitg-rpg-world-node-copy small{padding-right:7px !important}
.hitg-rpg-world-node-copy strong{font-size:.96rem !important;line-height:1.28}
.hitg-rpg-world-node-copy>span{font-size:.72rem !important}
.hitg-rpg-world-node-copy small{margin-top:auto !important;padding-top:8px !important;color:#b8c9c4 !important;font-size:.65rem !important}
.hitg-rpg-world-node-status{margin:0 7px 8px 0 !important}
.hitg-rpg-world-node-game{margin-top:7px !important;color:#d8c28e !important;font-size:.65rem !important}

/* No magenta/pink states in the RPG UI. Danger uses amber/rust instead. */
.hitg-openworld-mini-alert.is-bad{border-color:rgba(201,143,76,.5) !important;background:rgba(62,43,24,.95) !important;color:#ffe7bd !important}

@media(max-width:900px){.hitg-rpg-world-mission-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hitg-rpg-world-missions-head{align-items:flex-start;flex-direction:column}.hitg-rpg-world-map{min-height:460px !important}}
@media(max-width:560px){.hitg-rpg-world-mission-grid{grid-template-columns:1fr}.hitg-rpg-world-map{min-height:420px !important}.hitg-rpg-world-missions{padding:12px}.hitg-rpg-world-node .hitg-rpg-world-node-copy{min-height:132px}.hitg-rpg-world-map-legend{font-size:.58rem}}
@media(prefers-reduced-motion:reduce){.hitg-rpg-world-site-button:hover:not(:disabled),.hitg-rpg-world-node:not(:disabled):hover .hitg-rpg-world-node-copy{transform:none !important}}
@media(forced-colors:active){.hitg-rpg-world-missions,.hitg-rpg-world-node .hitg-rpg-world-node-copy{forced-color-adjust:auto;border:1px solid CanvasText !important}.hitg-rpg-world-node:focus-visible{outline:3px solid Highlight !important}}

/* =========================================================
   7.12.0 - protected visual baseline for all games
   ========================================================= */
/* Standard games keep the requested parchment background even if the theme injects white. */
.hitg-game:not(.hitg-rpg-active),
.hitg-game:not(.hitg-rpg-active) .hitg-shell,
.hitg-game:not(.hitg-rpg-active) .hitg-stage,
.hitg-game:not(.hitg-rpg-active) .hitg-start,
.hitg-game:not(.hitg-rpg-active) .hitg-question-content,
.hitg-game:not(.hitg-rpg-active) .hitg-result{
    background-color:#f2e7df !important;
}

/* Guard against WordPress/theme magenta and pink button states. */
.hitg-game .hitg-button,
.hitg-game .hitg-rpg-control,
.hitg-game .hitg-openworld-mini-btn,
.hitg-game .hitg-openworld-crisis-actions button,
.hitg-game .hitg-openworld-reform-controls button,
.hitg-game .hitg-openworld-suspect-buttons button,
.hitg-game .hitg-tactical-pad-btn,
.hitg-game .hitg-tactical-action,
.hitg-game .hitg-tactical-fire,
.hitg-games-browser .hitg-filter-button{
    accent-color:#0d5f70 !important;
}
.hitg-game .hitg-button:focus-visible,
.hitg-game .hitg-rpg-control:focus-visible,
.hitg-game .hitg-openworld-mini-btn:focus-visible,
.hitg-game .hitg-openworld-crisis-actions button:focus-visible,
.hitg-game .hitg-openworld-reform-controls button:focus-visible,
.hitg-game .hitg-openworld-suspect-buttons button:focus-visible,
.hitg-game .hitg-tactical-pad-btn:focus-visible,
.hitg-game .hitg-tactical-action:focus-visible,
.hitg-game .hitg-tactical-fire:focus-visible,
.hitg-games-browser .hitg-filter-button:focus-visible{
    outline-color:#0d5f70 !important;
}
.hitg-game .hitg-button:hover,
.hitg-games-browser .hitg-filter-button:hover{
    border-color:#0d5f70 !important;
}

/* Mission-only campaigns use a cleaner debrief, with no legacy decision wording. */
.hitg-rpg-mission-debrief .hitg-rpg-knowledge-award{max-width:680px;width:100%;margin:14px 0 0}
.hitg-rpg-mission-debrief .hitg-rpg-unlocked-article{max-width:680px;width:100%;margin:10px 0 0}

/* =========================================================
   7.13.0 - immersive play, fullscreen, and no-pink controls
   ========================================================= */
.hitg-game,
.hitg-type-historical_rpg{
    background:#f2e7df !important;
}

/* RPG controls use navy/teal/gold only. */
.hitg-type-historical_rpg .hitg-rpg-control,
.hitg-type-historical_rpg .hitg-openworld-mini-btn,
.hitg-type-historical_rpg .hitg-openworld-mini-pause,
.hitg-type-historical_rpg .hitg-openworld-hotline-controls button,
.hitg-type-historical_rpg .hitg-tactical-pad-btn,
.hitg-type-historical_rpg .hitg-tactical-action{
    background:#10242c !important;
    background-image:none !important;
    border-color:rgba(136,199,165,.34) !important;
    color:#f2e7df !important;
    accent-color:#0d5f70 !important;
}
.hitg-type-historical_rpg .hitg-rpg-control:hover,
.hitg-type-historical_rpg .hitg-openworld-mini-btn:hover,
.hitg-type-historical_rpg .hitg-openworld-mini-pause:hover,
.hitg-type-historical_rpg .hitg-openworld-hotline-controls button:hover,
.hitg-type-historical_rpg .hitg-tactical-pad-btn:hover,
.hitg-type-historical_rpg .hitg-tactical-action:hover{
    background:#173844 !important;
    border-color:#88c7a5 !important;
    color:#fff !important;
}
.hitg-type-historical_rpg .hitg-rpg-control:focus-visible,
.hitg-type-historical_rpg .hitg-openworld-mini-btn:focus-visible,
.hitg-type-historical_rpg .hitg-openworld-mini-pause:focus-visible,
.hitg-type-historical_rpg .hitg-openworld-hotline-controls button:focus-visible,
.hitg-type-historical_rpg .hitg-tactical-pad-btn:focus-visible,
.hitg-type-historical_rpg .hitg-tactical-action:focus-visible,
.hitg-type-historical_rpg .hitg-tactical-fire:focus-visible{
    outline:3px solid #88c7a5 !important;
    outline-offset:3px !important;
}
.hitg-type-historical_rpg .hitg-tactical-fire{
    background:radial-gradient(circle at 35% 30%,#b58a39,#4a3515) !important;
    border-color:#d4af37 !important;
    color:#fff4d1 !important;
}
.hitg-type-historical_rpg .hitg-rpg-choice,
.hitg-type-historical_rpg .hitg-rpg-choice:hover:not(:disabled){
    background:linear-gradient(90deg,rgba(13,35,43,.96),rgba(18,48,57,.88)) !important;
    border-color:rgba(136,199,165,.28) !important;
}

/* Mission toolbar stays compact and visible without covering the game. */
.hitg-rpg-toolbar-mission{
    position:relative;
    z-index:18;
    min-height:44px;
    background:#071217 !important;
}

.hitg-openworld-mini-utilities{
    display:flex;
    align-items:center;
    gap:7px;
    pointer-events:auto;
}
.hitg-openworld-mini-pause{
    min-height:48px;
    padding:8px 11px;
    border:1px solid rgba(136,199,165,.28);
    border-radius:11px;
    font:inherit;
    font-size:.7rem;
    font-weight:900;
    cursor:pointer;
}
.hitg-openworld-mini-btn.is-utility{
    width:auto;
    min-width:92px;
    padding:8px 13px;
}
.hitg-openworld-hotline-controls{
    display:flex;
    gap:8px;
    margin-inline:auto;
}
.hitg-openworld-hotline-controls .hitg-openworld-mini-btn{
    width:58px;
    height:48px;
    font-size:1.15rem;
}

/* Tactical HUD has more live information but remains readable. */
.hitg-tactical-metrics{
    max-width:54%;
}
.hitg-tactical-metrics span{
    white-space:nowrap;
}
.hitg-tactical-action:disabled{
    opacity:.48;
    cursor:not-allowed;
    transform:none !important;
}

/* Fullscreen is a genuine play mode, not just a scaled page. */
.hitg-type-historical_rpg:fullscreen,
.hitg-type-historical_rpg:-webkit-full-screen,
.hitg-type-historical_rpg.is-rpg-fullscreen{
    width:100vw !important;
    max-width:none !important;
    height:100dvh !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
    background:#071217 !important;
}
.hitg-type-historical_rpg:fullscreen .hitg-topbar,
.hitg-type-historical_rpg:fullscreen .hitg-status,
.hitg-type-historical_rpg:fullscreen .hitg-progress,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-topbar,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-status,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-progress,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-topbar,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-status,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-progress{
    display:none !important;
}
.hitg-type-historical_rpg:fullscreen .hitg-shell,
.hitg-type-historical_rpg:fullscreen .hitg-stage,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-shell,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-stage,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-shell,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-stage{
    width:100% !important;
    max-width:none !important;
    height:100dvh !important;
    min-height:0 !important;
    margin:0 !important;
    border:0 !important;
    border-radius:0 !important;
    overflow:hidden !important;
}
.hitg-type-historical_rpg:fullscreen .hitg-rpg-mission,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-rpg-mission,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-rpg-mission{
    display:grid !important;
    grid-template-rows:auto auto minmax(0,1fr) !important;
    height:100dvh !important;
    min-height:0 !important;
    border-radius:0 !important;
}
.hitg-type-historical_rpg:fullscreen .hitg-rpg-mission-brief,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-rpg-mission-brief,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-rpg-mission-brief{
    padding:9px 16px !important;
    grid-template-columns:minmax(0,1fr) !important;
}
.hitg-type-historical_rpg:fullscreen .hitg-rpg-mission-brief .hitg-rpg-kicker,
.hitg-type-historical_rpg:fullscreen .hitg-rpg-mission-context,
.hitg-type-historical_rpg:fullscreen .hitg-rpg-mission-accessibility,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-rpg-mission-brief .hitg-rpg-kicker,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-rpg-mission-context,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-rpg-mission-accessibility,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-rpg-mission-brief .hitg-rpg-kicker,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-rpg-mission-context,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-rpg-mission-accessibility{
    display:none !important;
}
.hitg-type-historical_rpg:fullscreen .hitg-rpg-mission-brief h2,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-rpg-mission-brief h2,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-rpg-mission-brief h2{
    font-size:clamp(1rem,2.2vw,1.5rem) !important;
}
.hitg-type-historical_rpg:fullscreen .hitg-rpg-mission-brief>p:not(.hitg-rpg-mission-context):not(.hitg-rpg-mission-accessibility),
.hitg-type-historical_rpg:-webkit-full-screen .hitg-rpg-mission-brief>p:not(.hitg-rpg-mission-context):not(.hitg-rpg-mission-accessibility),
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-rpg-mission-brief>p:not(.hitg-rpg-mission-context):not(.hitg-rpg-mission-accessibility){
    margin:2px 0 0 !important;
    font-size:.76rem !important;
    line-height:1.35 !important;
}
.hitg-type-historical_rpg:fullscreen .hitg-rpg-mission-host,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-rpg-mission-host,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-rpg-mission-host{
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
}
.hitg-type-historical_rpg:fullscreen .hitg-tactical-host,
.hitg-type-historical_rpg:fullscreen .hitg-tactical-frame,
.hitg-type-historical_rpg:fullscreen .hitg-openworld-mini,
.hitg-type-historical_rpg:fullscreen .hitg-openworld-mini-canvas,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-tactical-host,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-tactical-frame,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-openworld-mini,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-openworld-mini-canvas,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-tactical-host,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-tactical-frame,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-openworld-mini,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-openworld-mini-canvas{
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;
    border-radius:0 !important;
}
.hitg-type-historical_rpg:fullscreen .hitg-rpg-world,
.hitg-type-historical_rpg:-webkit-full-screen .hitg-rpg-world,
.hitg-type-historical_rpg.is-rpg-fullscreen .hitg-rpg-world{
    height:100dvh !important;
    min-height:0 !important;
    overflow:auto !important;
    border:0 !important;
    border-radius:0 !important;
}

@media(max-width:760px){
    .hitg-tactical-top{gap:7px !important;}
    .hitg-tactical-objective{max-width:58% !important;}
    .hitg-tactical-metrics{max-width:42% !important;display:grid !important;grid-template-columns:1fr !important;gap:3px !important;}
    .hitg-tactical-metrics span{min-height:25px !important;padding:4px 6px !important;font-size:.58rem !important;}
    .hitg-tactical-actions{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:5px !important;max-width:min(56vw,300px) !important;}
    .hitg-tactical-fire{grid-row:1/3 !important;width:58px !important;min-width:58px !important;height:58px !important;}
    .hitg-tactical-action{min-width:0 !important;padding:6px 7px !important;font-size:.61rem !important;}
    .hitg-openworld-mini-utilities{gap:4px;}
    .hitg-openworld-mini-pause{min-height:42px;padding:6px 8px;font-size:.62rem;}
}
@media(max-width:520px){
    .hitg-rpg-toolbar-mission{padding:5px 7px !important;min-height:38px !important;}
    .hitg-rpg-toolbar-mission .hitg-rpg-control{min-height:32px !important;padding:5px 7px !important;font-size:.64rem !important;}
    .hitg-tactical-controls{right:7px !important;left:7px !important;bottom:max(7px,env(safe-area-inset-bottom)) !important;}
    .hitg-tactical-actions{max-width:62vw !important;}
    .hitg-tactical-pad{grid-template-columns:repeat(3,40px) !important;grid-template-rows:repeat(2,40px) !important;}
    .hitg-tactical-pad-btn{width:40px !important;height:40px !important;}
    .hitg-openworld-mini-controls{bottom:max(8px,env(safe-area-inset-bottom)) !important;}
}


/* V7.14.0 — gameplay-only RPG controls and responsive mini-game polish. */
.hitg-openworld-mini[data-mode="orbit"] .hitg-openworld-mini-canvas{background:#07121f}
.hitg-openworld-mini[data-mode="orbit"] .hitg-openworld-pad .hitg-openworld-mini-btn,
.hitg-openworld-mini[data-mode="stealth"] .hitg-openworld-pad .hitg-openworld-mini-btn,
.hitg-openworld-mini[data-mode="intel"] .hitg-openworld-pad .hitg-openworld-mini-btn{touch-action:none}
.hitg-openworld-mini[data-mode="surveillance"] .hitg-openworld-suspect-buttons{display:grid;grid-template-columns:repeat(8,minmax(38px,1fr));gap:6px;max-width:min(720px,100%);margin-inline:auto}
.hitg-openworld-mini[data-mode="surveillance"] .hitg-openworld-suspect-buttons button{min-width:0;padding-inline:8px}
@media(max-width:760px){
  .hitg-openworld-mini[data-mode="orbit"],.hitg-openworld-mini[data-mode="stealth"],.hitg-openworld-mini[data-mode="intel"],.hitg-openworld-mini[data-mode="surveillance"]{min-height:clamp(520px,72dvh,650px)}
  .hitg-openworld-mini[data-mode="orbit"] .hitg-openworld-mini-canvas,.hitg-openworld-mini[data-mode="stealth"] .hitg-openworld-mini-canvas,.hitg-openworld-mini[data-mode="intel"] .hitg-openworld-mini-canvas,.hitg-openworld-mini[data-mode="surveillance"] .hitg-openworld-mini-canvas{height:clamp(520px,72dvh,650px)}
  .hitg-openworld-mini[data-mode="surveillance"] .hitg-openworld-suspect-buttons{grid-template-columns:repeat(4,minmax(42px,1fr));width:min(250px,72vw);gap:5px}
  .hitg-openworld-mini[data-mode="surveillance"] .hitg-openworld-suspect-buttons button{min-height:44px;font-size:.78rem}
  .hitg-openworld-mini[data-mode="orbit"] .hitg-openworld-mini-controls,.hitg-openworld-mini[data-mode="stealth"] .hitg-openworld-mini-controls,.hitg-openworld-mini[data-mode="intel"] .hitg-openworld-mini-controls{align-items:flex-end}
}
@media(max-width:440px){
  .hitg-openworld-mini[data-mode="orbit"] .hitg-openworld-mini-objective span,.hitg-openworld-mini[data-mode="stealth"] .hitg-openworld-mini-objective span,.hitg-openworld-mini[data-mode="intel"] .hitg-openworld-mini-objective span,.hitg-openworld-mini[data-mode="surveillance"] .hitg-openworld-mini-objective span{display:none}
  .hitg-openworld-mini[data-mode="surveillance"] .hitg-openworld-suspect-buttons{width:min(236px,70vw)}
}

/* =========================================================
   V7.15.24 - Full-width game pages + centered game titles
   Scoped to hit_game screens only. Manual embeds keep their own UI.
   ========================================================= */
body.single-hit_game .entry-header,
body.single-hit_game .wp-block-post-title,
body.single-hit_game h1.entry-title,
body.single-hit_game .entry-title,
body.single-hit_game .post-title,
body.single-hit_game .page-title {
    text-align: center !important;
}

.hitg-card-body h2,
.hitg-card h2 {
    width: 100%;
    text-align: center;
}

body.single-hit_game .hitg-game,
body.single-hit_game .hitg-k26 {
    width: calc(100vw - 24px) !important;
    max-width: none !important;
    margin-inline-start: calc(50% - 50vw + 12px) !important;
    margin-inline-end: calc(50% - 50vw + 12px) !important;
}

@media (max-width: 760px) {
    body.single-hit_game .hitg-game,
    body.single-hit_game .hitg-k26 {
        width: calc(100vw - 12px) !important;
        margin-inline-start: calc(50% - 50vw + 6px) !important;
        margin-inline-end: calc(50% - 50vw + 6px) !important;
    }
}

/* Extra theme-agnostic single-game title centering. */
body.single-hit_game main h1,
body.single-hit_game article > header h1 {
    text-align: center !important;
}


/* =========================================================
   V7.15.25 - Manual embed width safety
   Manual WordPress-content embeds stay inside the theme content
   container; built-in games keep the wide presentation.
   ========================================================= */
body.single-hit_game.hitg-manual-game .hitg-game,
body.single-hit_game.hitg-manual-game .hitg-k26 {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
}

body.single-hit_game.hitg-manual-game main,
body.single-hit_game.hitg-manual-game article,
body.single-hit_game.hitg-manual-game .entry-content {
    min-width: 0;
}

body.single-hit_game.hitg-manual-game .entry-content > * {
    max-width: 100%;
}

/* =========================================================
   V7.15.26 - Balanced width for manual embeds
   Wider than the theme content column, but capped so it never
   becomes a near-full-viewport strip on large desktop screens.
   ========================================================= */
body.single-hit_game.hitg-manual-game .hitg-game,
body.single-hit_game.hitg-manual-game .hitg-k26 {
    position: relative;
    left: 50%;
    width: min(1320px, calc(100vw - 40px)) !important;
    max-width: none !important;
    margin-inline: 0 !important;
    transform: translateX(-50%);
}

@media (max-width: 760px) {
    body.single-hit_game.hitg-manual-game .hitg-game,
    body.single-hit_game.hitg-manual-game .hitg-k26 {
        width: calc(100vw - 16px) !important;
        left: 50%;
        transform: translateX(-50%);
    }
}


/* =========================================================
   V7.15.27 - Manual embed width relative to site content
   Keeps manual embeds wide without centering against the full viewport.
   ========================================================= */
body.single-hit_game.hitg-manual-game .hitg-game,
body.single-hit_game.hitg-manual-game .hitg-k26 {
    position: relative;
    left: 50%;
    width: min(1180px, calc(100% + 240px)) !important;
    max-width: none !important;
    margin-inline: 0 !important;
    transform: translateX(-50%);
}

@media (max-width: 980px) {
    body.single-hit_game.hitg-manual-game .hitg-game,
    body.single-hit_game.hitg-manual-game .hitg-k26 {
        width: min(100%, 980px) !important;
        left: 0;
        transform: none;
        margin-inline: auto !important;
    }
}

@media (max-width: 760px) {
    body.single-hit_game.hitg-manual-game .hitg-game,
    body.single-hit_game.hitg-manual-game .hitg-k26 {
        width: 100% !important;
        left: 0;
        transform: none;
        margin-inline: auto !important;
    }
}

/* =========================================================
   V7.15.28 - Unified single-game page background
   Keep the theme chrome/header/footer untouched; only the main
   hit_game content surface uses the plugin's warm background.
   ========================================================= */
body.single-hit_game {
    background-color: #f2e7df !important;
}

body.single-hit_game #content,
body.single-hit_game .site-content,
body.single-hit_game .content-area,
body.single-hit_game #primary,
body.single-hit_game main,
body.single-hit_game .site-main,
body.single-hit_game article.hit_game,
body.single-hit_game article.type-hit_game,
body.single-hit_game .entry-content {
    background-color: #f2e7df !important;
}

/* Optional, per-game untimed mode: visually quiet control, keyboard and screen-reader usable. */
.hitg-game .hitg-a11y-no-timer{display:flex;align-items:center;justify-content:center;gap:9px;max-width:100%;margin:10px auto 8px;font-size:.88rem;line-height:1.45;cursor:pointer;color:inherit}
.hitg-game .hitg-a11y-no-timer input{width:18px;height:18px;flex:0 0 18px;accent-color:#7b4754;cursor:pointer}
.hitg-game .hitg-a11y-no-timer input:focus-visible{outline:3px solid #d4af37;outline-offset:3px}


/* Consistent, screen-width-safe notifications across quiz, memory, flags,
   source games and RPG missions. These styles do not change game state. */
.hitg-game .hitg-feedback{
  box-sizing:border-box;
  width:min(100%,820px);
  margin-inline:auto!important;
  max-width:100%;
  box-shadow:none!important;
}
.hitg-game .hitg-feedback-heading{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  min-width:0;
  text-align:center;
}
.hitg-game .hitg-feedback-heading h3{max-width:100%;overflow-wrap:anywhere;text-align:center}
.hitg-game .hitg-feedback-actions{
  display:flex;
  align-items:center;
  justify-content:center!important;
  flex-wrap:wrap;
  max-width:100%;
}
.hitg-game .hitg-feedback p{max-width:680px;margin-inline:auto;overflow-wrap:anywhere}
.hitg-game .hitg-result{box-sizing:border-box;width:min(100%,690px);max-width:100%;margin-inline:auto;text-align:center}
.hitg-tactical-frame .hitg-tactical-alert,
.hitg-openworld-mini .hitg-openworld-mini-alert{
  box-sizing:border-box;
  inset-inline:auto;
  left:50%!important;
  right:auto!important;
  transform:translateX(-50%)!important;
  width:max-content;
  max-width:calc(100% - 24px);
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:center!important;
  border-radius:10px;
  box-shadow:none!important;
  pointer-events:none;
}
@media(max-width:540px){
  .hitg-game .hitg-feedback{padding:14px 12px}
  .hitg-game .hitg-feedback-heading{gap:7px}
  .hitg-game .hitg-feedback-actions{gap:9px}
  .hitg-tactical-frame .hitg-tactical-alert,
  .hitg-openworld-mini .hitg-openworld-mini-alert{font-size:clamp(12px,3.3vw,14px);padding:8px 10px}
}
@media(forced-colors:active){
  .hitg-game .hitg-feedback,
  .hitg-tactical-frame .hitg-tactical-alert,
  .hitg-openworld-mini .hitg-openworld-mini-alert{
    forced-color-adjust:auto;
    background:Canvas!important;
    color:CanvasText!important;
    border:2px solid CanvasText!important;
    box-shadow:none!important;
  }
}

/* ===============================================================
   Games editorial directory v1.7: clean, accessible cover treatment.
   Only directory cards are affected. Game engines, boards, alerts,
   individual featured images and article templates are untouched.
   No number badges, ribbon stripes, pseudo-decorations or card labels.
   =============================================================== */
.hitg-games-browser .hitg-card {
    background: #f8f2ea !important;
    background-color: #f8f2ea !important;
    border: 1px solid #dacabe !important;
    border-radius: 17px !important;
    box-shadow: none !important;
    transition: border-color .18s ease, transform .18s ease !important;
}
.hitg-games-browser .hitg-card::before,
.hitg-games-browser .hitg-card::after,
.hitg-games-browser .hitg-card-media::before,
.hitg-games-browser .hitg-card-media::after {
    content: none !important;
    display: none !important;
}
.hitg-games-browser .hitg-card-media {
    aspect-ratio: 16/9 !important;
    width: 100%;
    overflow: hidden;
    border: 0 !important;
    background: #481f31;
}
.hitg-games-browser .hitg-card-media .hitg-card-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16/9 !important;
    object-fit: cover;
    object-position: center;
    filter: none !important;
    border: 0 !important;
}
.hitg-games-browser .hitg-card-media-shade,
.hitg-games-browser .hitg-card-meta,
.hitg-games-browser .hitg-card-count,
.hitg-games-browser .hitg-card-type {
    display: none !important;
}
.hitg-games-browser .hitg-card-body {
    min-width: 0;
    padding: clamp(16px, 2vw, 23px);
    align-items: flex-start;
    gap: 0;
}
.hitg-games-browser .hitg-card-body h2 {
    margin: 0 0 9px !important;
    width: 100%;
    text-align: right !important;
    color: #381e28 !important;
    font-size: clamp(1.1rem, 1.2vw, 1.35rem);
    font-weight: 800;
    line-height: 1.4;
}
.hitg-games-browser .hitg-card-body p {
    width: 100%;
    margin: 0 0 19px;
    color: #655854 !important;
    line-height: 1.62;
    overflow-wrap: anywhere;
}
.hitg-games-browser .hitg-card .hitg-card-cta,
.hitg-games-browser .hitg-card:hover .hitg-card-cta {
    align-self: flex-start;
    min-height: 44px !important;
    margin-top: auto !important;
    padding: 10px 18px !important;
    background: #61273d !important;
    background-color: #61273d !important;
    border: 1px solid #61273d !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    color: #fffaf2 !important;
    font-size: .95rem;
    font-weight: 750;
    text-decoration: none !important;
}
.hitg-games-browser .hitg-card-link:focus-visible {
    outline: 3px solid #ad7734 !important;
    outline-offset: -4px !important;
    border-radius: 17px;
}
@media (hover:hover) and (pointer:fine) {
    .hitg-games-browser .hitg-card:hover {
        border-color: #af8876 !important;
        transform: translateY(-2px) !important;
        box-shadow: none !important;
    }
    .hitg-games-browser .hitg-card:hover .hitg-card-image {
        transform: none !important;
    }
}
@media (prefers-reduced-motion:reduce) {
    .hitg-games-browser .hitg-card,
    .hitg-games-browser .hitg-card * {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}
@media (forced-colors:active) {
    .hitg-games-browser .hitg-card { border: 1px solid CanvasText !important; }
    .hitg-games-browser .hitg-card-link:focus-visible { outline: 3px solid Highlight !important; }
    .hitg-games-browser .hitg-card .hitg-card-cta { border-color: ButtonText !important; color: ButtonText !important; background: ButtonFace !important; }
}


/* Games directory v1.9 - balanced layout and accessible search.
   Applies ONLY to game-directory shortcode, never to an active game. */
.hitg-games-browser {
    width: 100% !important;
    max-width: 1250px !important;
    margin-inline: auto !important;
}
.hitg-games-browser .hitg-browser-tools {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 18px !important;
    margin: 0 0 25px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.hitg-games-browser .hitg-game-search {
    display: block !important;
    flex: none !important;
    order: -1;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    color: #38242b;
    font-size: 1rem;
}
.hitg-games-browser .hitg-search-caption {
    display: block;
    margin: 0 0 9px;
    font-size: 1.02rem;
    font-weight: 750;
    line-height: 1.35;
}
.hitg-games-browser .hitg-game-search input {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 54px !important;
    padding: 14px 18px !important;
    border: 1px solid #bfa9a3 !important;
    border-radius: 13px !important;
    background: #fffdfb !important;
    color: #2d2024 !important;
    font: inherit !important;
    font-size: max(17px,1.03rem) !important;
    font-weight: 450 !important;
    line-height: 1.45 !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}
.hitg-games-browser .hitg-game-search input::placeholder {
    color: #766965 !important;
    opacity: 1 !important;
}
.hitg-games-browser .hitg-game-search input:focus-visible {
    outline: 3px solid #9c6e35 !important;
    outline-offset: 3px !important;
    border-color: #743c4e !important;
}
.hitg-games-browser .hitg-filter-buttons {
    display: flex !important;
    flex: none !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 9px !important;
    min-width: 0 !important;
    overflow: visible !important;
}
.hitg-games-browser .hitg-filter-button {
    min-height: 44px !important;
    padding: 9px 17px !important;
    border-radius: 11px !important;
    font-size: .93rem !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.hitg-games-browser .hitg-filter-button:focus-visible {
    outline: 3px solid #9c6e35 !important;
    outline-offset: 3px !important;
}
.hitg-games-browser .hitg-grid {
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    gap: clamp(17px,1.7vw,25px) !important;
    width: 100% !important;
}
.hitg-games-browser .hitg-card {
    min-width: 0 !important;
    border-radius: 15px !important;
    background: #fffbf7 !important;
    border-color: #dfd2cb !important;
    box-shadow: none !important;
}
.hitg-games-browser .hitg-card-media {
    aspect-ratio: 16/9 !important;
    background: #f5eae1 !important;
}
.hitg-games-browser .hitg-card-media .hitg-card-image {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16/9 !important;
    object-fit: cover !important;
    object-position: 50% 50% !important;
    filter: none !important;
    transform: none !important;
}
.hitg-games-browser .hitg-card-body {
    padding: 19px 20px 21px !important;
}
.hitg-games-browser .hitg-card-body h2 {
    font-size: clamp(1.07rem,1.18vw,1.28rem) !important;
    line-height: 1.4 !important;
    color: #372128 !important;
}
.hitg-games-browser .hitg-card-body p {
    margin-bottom: 15px !important;
    color: #655855 !important;
    line-height: 1.62 !important;
}
.hitg-games-browser .hitg-card .hitg-card-cta {
    min-height: 44px !important;
    padding: 10px 17px !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-weight: 750 !important;
}
@media (max-width: 1320px) {
    .hitg-games-browser .hitg-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width: 940px) {
    .hitg-games-browser .hitg-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width: 600px) {
    .hitg-games-browser .hitg-grid { grid-template-columns: 1fr !important; gap: 17px !important; }
    .hitg-games-browser .hitg-browser-tools { gap: 14px !important; }
    .hitg-games-browser .hitg-game-search input { min-height: 56px !important; }
    .hitg-games-browser .hitg-filter-button { min-height: 44px !important; padding-inline: 13px !important; }
    .hitg-games-browser .hitg-card-body { padding: 17px 18px 19px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .hitg-games-browser .hitg-card,
    .hitg-games-browser .hitg-card * { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
    .hitg-games-browser .hitg-game-search input { border: 1px solid CanvasText !important; color: CanvasText !important; background: Canvas !important; }
    .hitg-games-browser .hitg-game-search input:focus-visible,
    .hitg-games-browser .hitg-filter-button:focus-visible { outline: 3px solid Highlight !important; }
}


/* Games landing page 7.15.46: entirely plugin-owned, stays inside the theme's
   actual content column (including when the theme has a sidebar). */
.hitg-games-hub,
.hitg-games-hub *,
.hitg-games-hub *::before,
.hitg-games-hub *::after { box-sizing: border-box; }
.hitg-games-hub {
    direction: rtl;
    position: static;
    transform: none;
    width: 100%;
    max-width: min(100%, var(--hitg-hub-max-width, 1080px));
    min-width: 0;
    margin: 0 auto 30px;
    padding-inline: clamp(14px, 2vw, 26px);
    color: #35262a;
    font-family: inherit;
    container-type: inline-size;
}
.hitg-games-hub .hitg-hub-hero {
    display: grid;
    grid-template-columns: minmax(115px, 190px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    min-width: 0;
    min-height: 200px;
    padding: clamp(23px, 3vw, 42px);
    border: 1px solid #623c49;
    border-radius: 20px;
    background: #462832;
    color: #fff9f2;
    box-shadow: none;
}
.hitg-games-hub .hitg-hub-hero-no-logo { grid-template-columns: minmax(0, 1fr); }
.hitg-games-hub .hitg-hub-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.hitg-games-hub .hitg-hub-brand img {
    display: block;
    width: min(175px, 100%);
    height: auto;
    max-height: 135px;
    object-fit: contain;
    margin: 0;
}
.hitg-games-hub .hitg-hub-copy { min-width: 0; }
.hitg-games-hub .hitg-hub-title {
    margin: 0 !important;
    color: #fff8f2 !important;
    font-size: clamp(2.25rem, 4.5cqi, 3.9rem) !important;
    line-height: 1.15 !important;
    font-weight: 850 !important;
    letter-spacing: -.025em !important;
    text-align: right !important;
}
.hitg-games-hub .hitg-hub-lead {
    max-width: 650px;
    margin: 11px 0 0;
    color: #f1e5dc;
    font-size: clamp(1rem, 1.6cqi, 1.22rem);
    line-height: 1.65;
    text-align: right;
}
.hitg-games-hub .hitg-hub-list-head { margin: 28px 0 15px; scroll-margin-top: 24px; }
.hitg-games-hub .hitg-hub-list-head h2 {
    margin: 0 !important;
    color: #35242b !important;
    font-size: clamp(1.45rem, 2.5cqi, 2.1rem) !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    text-align: right !important;
}
/* Never apply viewport-relative breakout positioning to the games browser. */
.hitg-games-hub .hitg-games-browser {
    position: static !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
}
.hitg-games-hub .hitg-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)) !important; }
@container (max-width: 850px) {
    .hitg-games-hub .hitg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .hitg-games-hub .hitg-hub-hero { grid-template-columns: minmax(100px, 145px) minmax(0, 1fr); gap: 22px; }
}
@container (max-width: 560px) {
    .hitg-games-hub .hitg-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .hitg-games-hub .hitg-hub-hero {
        display: flex;
        flex-direction: column;
        gap: 10px;
        min-height: auto;
        padding: 23px 18px 25px;
        border-radius: 16px;
    }
    .hitg-games-hub .hitg-hub-brand img { width: min(128px, 45vw); max-height: 90px; }
    .hitg-games-hub .hitg-hub-copy { text-align: center; }
    .hitg-games-hub .hitg-hub-title { font-size: clamp(2.1rem, 8vw, 3.1rem) !important; text-align: center !important; }
    .hitg-games-hub .hitg-hub-lead { margin-top: 8px; font-size: 1rem; text-align: center; }
    .hitg-games-hub .hitg-hub-list-head { margin-top: 23px; }
}
@media (max-width: 600px) {
    .hitg-games-hub { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .hitg-games-hub *, .hitg-games-hub *::before, .hitg-games-hub *::after {
        animation: none !important;
        transition: none !important;
    }
}
@media (forced-colors: active) {
    .hitg-games-hub .hitg-hub-hero { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
    .hitg-games-hub .hitg-hub-title, .hitg-games-hub .hitg-hub-lead { color: CanvasText !important; }
}

/* 7.15.48: no generated cover for classics. Their actual WP featured image
   is respected; without one, show a straightforward text-only directory card. */
.hitg-games-browser .hitg-card[data-classic-key] .hitg-card-body { min-height:190px;display:flex;flex-direction:column;justify-content:center; }
.hitg-games-browser .hitg-card[data-classic-key] .hitg-card-body h2 { font-size:clamp(1.25rem,1.7vw,1.55rem); }
.hitg-games-browser .hitg-card[data-classic-key] .hitg-card-body p { margin-bottom:20px; }
/* Uniform game typography: scoped to HITG content, not theme/navigation.
   The site's existing Heebo font loading is reused without external APIs. */
:where(.hitg-games-browser,.hitg-games-hub,.hitg-game,.hitg-k26,.hitg-mini,.hitg-classics-app,.hitg-board-app,.hit-chess-app,.hitg-tactical-frame,.hitg-openworld-mini,body.single-hit_game .hitg-page) {
    font-family:"Heebo",Arial,sans-serif !important;
}
:where(.hitg-games-browser,.hitg-games-hub,.hitg-game,.hitg-k26,.hitg-mini,.hitg-classics-app,.hitg-board-app,.hit-chess-app,.hitg-tactical-frame,.hitg-openworld-mini,body.single-hit_game .hitg-page) :is(h1,h2,h3,h4,h5,p,button,select,input,textarea,label,blockquote) {
    font-family:inherit !important;
}
