/* ============================================================
   Game modal — the "activity poster" a game opens into.
   Built client-side by static/js/game_modal.js (.game-infographic-*
   markup), so every page that hosts the modal needs these styles:
   the games studio, the home page and the session pages. Split out of
   games_studio.css (which stays scoped to #games-studio-page) so
   public pages don't have to ship the whole studio bundle.
   ============================================================ */

.modal-dialog.game-infographic-dialog {
    /* Fall back to neutral palette; theme classes (home-apq-card-alphabet,
       home-apq-card-action, …) override these via the wrapper rule in
       hero.css so the modal accent matches the game's primary topic. */
    --apq-theme-from: rgba(124, 121, 184, 0.18);
    --apq-theme-to: rgba(196, 232, 219, 0.30);
    --apq-theme-accent: rgba(124, 121, 184, 0.35);
    width: min(1120px, 100%);
    padding: 24px;
    background:
        radial-gradient(circle at top right, var(--apq-theme-from), transparent 32%),
        radial-gradient(circle at 0% 100%, var(--apq-theme-to), transparent 38%),
        linear-gradient(180deg, #ffffff 0%, #f8f9fe 100%);
}

/* ── Game modal chrome: sticky top bar + scrollable body ──────────────────
   Scoped to #game-modal so the shared .modal-* system (calendar, profile,
   evaluation dialogs) stays untouched. The close (×) used to float absolutely
   over the scrolling content and cover it; it now lives in a fixed top bar
   with the game title, and only the body scrolls beneath — nothing is ever
   hidden under the button, and the title gives permanent context. */
#game-modal .modal-dialog {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;               /* the body scrolls, not the dialog */
}

#game-modal .game-modal-topbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 8px 12px 8px 22px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    border-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

#game-modal .game-modal-topbar-title {
    min-width: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#game-modal .modal-close {
    position: static;               /* no longer absolutely positioned */
    flex: 0 0 auto;
    box-shadow: none;
}

#game-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 22px;
}

/* The × no longer floats over the hero, so reclaim its reserved right pad. */
#game-modal .game-infographic-hero {
    padding-right: 22px;
}

/* Visible keyboard-focus ring on the interactive controls. */
#game-modal .modal-close:focus-visible,
#game-modal .game-infographic-edit-button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* WCAG AA contrast: the shared --muted (rgb 109,116,135) only reaches ~3.9–4.3:1
   on the modal's light pastel chips/cards — below the 4.5:1 minimum for normal
   text. Use a slightly darker muted gray (>=5:1 on every pastel here) for the
   labels and the step body text that sit on pastel. Scoped to #game-modal. */
#game-modal .game-infographic-quick-label,
#game-modal .game-infographic-hero-topics-label,
#game-modal .game-infographic-step p {
    color: #5c6274;
}

.game-infographic-modal {
    color: var(--text);
}

.game-infographic-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 20px 62px 22px 22px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 94% 10%, var(--apq-theme-from), transparent 30%),
        radial-gradient(circle at 6% 90%, var(--apq-theme-to), transparent 38%),
        linear-gradient(135deg, #ffffff 0%, #f3f5fb 100%);
    border: 1px solid rgba(226, 230, 240, 0.95);
}

.game-infographic-title-area h2 {
    margin: 10px 0 0;
    max-width: 760px;
    font-size: clamp(2.2rem, 3.8vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.game-infographic-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.game-infographic-subtitle {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.5;
}

.game-infographic-hero-side {
    --hero-side-width: 134px;
    display: grid;
    gap: 12px;
    width: var(--hero-side-width);
    justify-items: stretch;
    align-content: center;
}

.game-infographic-duration {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-height: 124px;
    padding: 14px 12px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 18px 34px rgba(34, 42, 70, 0.08);
}

.game-infographic-duration strong {
    font-size: 2.3rem;
    line-height: 1;
}

.game-infographic-duration span {
    margin-top: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.game-infographic-admin-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

.game-infographic-edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(124, 121, 184, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.game-infographic-edit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(124, 121, 184, 0.28);
}

.game-infographic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 18px;
}

.game-infographic-pills-compact {
    margin: 0;
}

.game-infographic-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f1f2fb;
    border: 1px solid #dfe3f2;
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 800;
}

.game-infographic-pill-strong {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* Quick-info chips in the modal hero (group, space, difficulty, type) */
.game-infographic-quickinfo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.game-infographic-quick {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 18px rgba(34, 42, 70, 0.05);
}

.game-infographic-quick-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
    background: var(--accent);
    font-size: 1.5rem;
    line-height: 1;
    /* These badges now hold SVG line-icons (.lm-icon), centred by the flex box
       above — so NO optical padding-top. The old `padding-top: 0.28em` was an
       emoji-glyph hack; on an SVG it just pushes the icon off-centre (low). */
    text-align: center;
    overflow: hidden;
}

.game-infographic-quick-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.game-infographic-quick-label {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.game-infographic-quick strong {
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.game-infographic-quick-difficulty {
    background: linear-gradient(180deg, #f4eefc 0%, #ece2f8 100%);
    border-color: #d8c9ee;
}

.game-infographic-quick-difficulty .game-infographic-quick-emoji {
    background: rgba(139, 127, 191, 0.18);
}

.game-infographic-quick-difficulty strong { color: #5a4a96; }

.game-infographic-quick-group {
    background: linear-gradient(180deg, #eaf0fc 0%, #dde6f8 100%);
    border-color: #c8d4ef;
}

.game-infographic-quick-group .game-infographic-quick-emoji {
    background: rgba(106, 143, 212, 0.18);
}

.game-infographic-quick-group strong { color: #3a558f; }

.game-infographic-quick-space {
    background: linear-gradient(180deg, #e7f4ec 0%, #d8ecdf 100%);
    border-color: #bcdfca;
}

.game-infographic-quick-space .game-infographic-quick-emoji {
    background: rgba(107, 179, 142, 0.18);
}

.game-infographic-quick-space strong { color: #2f7256; }

.game-infographic-quick-type {
    background: linear-gradient(180deg, #fdeef3 0%, #fbe1eb 100%);
    border-color: #f4cad9;
}

.game-infographic-quick-type .game-infographic-quick-emoji {
    background: rgba(217, 106, 142, 0.18);
}

.game-infographic-quick-type strong { color: #a83562; }

.game-infographic-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 20px;
}

.game-infographic-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 196px;
    padding: 22px 16px 18px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 10px 22px rgba(34, 42, 70, 0.05);
    text-align: center;
}

.game-infographic-step-order {
    position: absolute;
    top: -14px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-weight: 900;
    font-size: 0.95rem;
    box-shadow: 0 8px 18px rgba(34, 42, 70, 0.14);
    border: 3px solid #ffffff;
}

.game-infographic-step-emoji {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.9);
    font-size: 2rem;
    line-height: 1;
    text-align: center;
    box-shadow: 0 10px 22px rgba(34, 42, 70, 0.06);
}

.game-infographic-step-text {
    width: 100%;
}

.game-infographic-step h4 {
    margin: 0 0 6px;
    font-size: 1rem;
    line-height: 1.25;
}

.game-infographic-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.92rem;
}

.game-infographic-step-arrow {
    position: absolute;
    top: 50%;
    right: -14px;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--muted);
    font-weight: 900;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(34, 42, 70, 0.08);
}

@media (max-width: 1180px) {
    .game-infographic-step-arrow {
            display: none;
        }
}

/* Phase: Set up — soft rose */
.game-infographic-step-setup {
    background: linear-gradient(180deg, #fdeef3 0%, #fbe1eb 100%);
    border-color: #f4cad9;
}

.game-infographic-step-setup .game-infographic-step-order {
    background: #d96a8e;
    box-shadow: 0 8px 18px rgba(217, 106, 142, 0.32);
}

.game-infographic-step-setup h4 { color: #a83562; }

/* Phase: Explain — soft blue */
.game-infographic-step-explain {
    background: linear-gradient(180deg, #eaf0fc 0%, #dde6f8 100%);
    border-color: #c8d4ef;
}

.game-infographic-step-explain .game-infographic-step-order {
    background: #6a8fd4;
    box-shadow: 0 8px 18px rgba(106, 143, 212, 0.32);
}

.game-infographic-step-explain h4 { color: #3a558f; }

/* Phase: Play — lavender (site primary family) */
.game-infographic-step-play {
    background: linear-gradient(180deg, #f1ecfa 0%, #e6dff5 100%);
    border-color: #d6cbef;
}

.game-infographic-step-play .game-infographic-step-order {
    background: #8b7fbf;
    box-shadow: 0 8px 18px rgba(139, 127, 191, 0.32);
}

.game-infographic-step-play h4 { color: #5a4a96; }

/* Phase: Repeat — soft green */
.game-infographic-step-repeat {
    background: linear-gradient(180deg, #e7f4ec 0%, #d8ecdf 100%);
    border-color: #bcdfca;
}

.game-infographic-step-repeat .game-infographic-step-order {
    background: #6bb38e;
    box-shadow: 0 8px 18px rgba(107, 179, 142, 0.32);
}

.game-infographic-step-repeat h4 { color: #2f7256; }

/* Phase: Wrap up — soft teal */
.game-infographic-step-wrapup {
    background: linear-gradient(180deg, #e1f3f1 0%, #d1ebe7 100%);
    border-color: #b9d8d3;
}

.game-infographic-step-wrapup .game-infographic-step-order {
    background: #5fb6a8;
    box-shadow: 0 8px 18px rgba(95, 182, 168, 0.32);
}

.game-infographic-step-wrapup h4 { color: #226761; }

/* On-field diagram (visual_representation) */
.game-infographic-visual {
    margin: 4px 0 18px;
    padding: 18px 18px 22px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(217, 106, 142, 0.10), transparent 32%),
        radial-gradient(circle at bottom left, rgba(106, 143, 212, 0.10), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f7f6fd 100%);
    border: 1px solid var(--border);
    box-shadow: 0 14px 32px rgba(34, 42, 70, 0.06);
    text-align: center;
}

.game-infographic-visual-caption {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--primary-dark);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.game-infographic-visual-caption strong {
    font-weight: 900;
}

.game-infographic-visual img {
    display: block;
    width: 100%;
    max-height: 520px;
    margin: 0 auto;
    border-radius: 20px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid rgba(226, 230, 240, 0.6);
}

.game-infographic-bridge {
    display: none;
}

.game-infographic-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.game-infographic-section-title span {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--accent);
    font-size: 1.15rem;
    line-height: 1;
    text-align: center;
}

.game-infographic-section-title h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.game-infographic-hero-topics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(124, 121, 184, 0.22);
}

.game-infographic-hero-topics-label {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-right: 4px;
}

.game-infographic-topic-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(106, 143, 212, 0.14);
    border: 1px solid rgba(106, 143, 212, 0.22);
    color: #3a558f;
    font-size: 0.84rem;
    font-weight: 700;
}

.game-infographic-extras {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.game-infographic-extras .game-infographic-panel {
    margin: 0;
}

/* An odd last panel (e.g. Setup | Instructions, then Adaptation) would leave a
   dead empty cell in the 2-col grid — let it span the full width instead. */
.game-infographic-extras .game-infographic-panel:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* Honest "content is in another language" notice at the top of the modal. */
.game-infographic-langnote {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 11px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff6e8 0%, #fdeecd 100%);
    border: 1px solid #f3d79a;
    color: #8a5a12;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
}

.game-infographic-langnote span[aria-hidden] {
    font-size: 1.05rem;
    line-height: 1;
}

.game-infographic-materials-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    padding: 14px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fef0f5 0%, #fce5ed 100%);
    border: 1px solid #f7d0dd;
}

.game-infographic-materials-emoji {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(217, 106, 142, 0.18);
    font-size: 1.35rem;
    line-height: 1;
    text-align: center;
    flex-shrink: 0;
}

/* Keep every chip/panel badge's icon the same visual size (20px), regardless of
   the size each call site passes to ic(). Without this the modal mixes 16/18/20
   px icons across identically-sized badges, so e.g. MATERIALS/GAME PLAN look
   smaller than the SETUP/INSTRUCTIONS icons sitting right next to them. The big
   round-flow step badges are a separate tier and keep their own larger icon. */
.game-infographic-quick-emoji .lm-icon,
.game-infographic-materials-emoji .lm-icon,
.game-infographic-panel-emoji .lm-icon,
.game-infographic-step-emoji .lm-icon {
    /* display:block opts the SVG out of inline text-baseline layout, so the
       flex/grid centering of the badge is the ONLY thing positioning it —
       no line-height or vertical-align rule can nudge it off-centre. */
    display: block;
    vertical-align: 0;
}

.game-infographic-quick-emoji .lm-icon,
.game-infographic-materials-emoji .lm-icon,
.game-infographic-panel-emoji .lm-icon {
    width: 20px;
    height: 20px;
}

.game-infographic-materials-text {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.game-infographic-materials-label {
    color: #a83562;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.game-infographic-materials-text p {
    margin: 0;
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.5;
}

@media (max-width: 860px) {
    .game-infographic-extras {
            grid-template-columns: 1fr;
        }
}

.game-infographic-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
    gap: 16px;
}

.game-infographic-side-stack {
    display: grid;
    gap: 16px;
    align-content: start;
}

.game-infographic-panel {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    padding: 22px;
    box-shadow: 0 12px 28px rgba(34, 42, 70, 0.05);
}

.game-infographic-panel-main {
    background:
        radial-gradient(circle at bottom right, rgba(124, 121, 184, 0.10), transparent 34%),
        #ffffff;
}

.game-infographic-panel-soft {
    background: linear-gradient(180deg, #fbfcff 0%, #f4f6fc 100%);
}

.game-infographic-panel-action {
    margin-top: 16px;
    background:
        radial-gradient(circle at top left, rgba(124, 121, 184, 0.14), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f7f8fd 100%);
}

.game-infographic-panel-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.game-infographic-panel-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
    background: rgba(124, 121, 184, 0.14);
    font-size: 1.5rem;
    line-height: 1;
    text-align: center;
    overflow: hidden;
}

.game-infographic-panel-heading > div {
    min-width: 0;
}

/* The kicker line only. Keep this scoped to the heading's inner text <div>:
   a bare `.game-infographic-panel-heading span` also matches the icon badge
   (`.game-infographic-panel-emoji` is a <span> too) and its `display: block`
   out-specifies the badge's flex centering — which is exactly the bug that
   kept the panel icons pinned to the top of their boxes for so long. */
.game-infographic-panel-heading > div > span {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.game-infographic-panel-heading h3 {
    margin: 0;
    font-size: 1.18rem;
}

/* Colored panel variants */
.game-infographic-panel-rose {
    background: linear-gradient(180deg, #fef0f5 0%, #fce5ed 100%);
    border-color: #f7d0dd;
}

.game-infographic-panel-rose .game-infographic-panel-emoji {
    background: rgba(217, 106, 142, 0.18);
}

.game-infographic-panel-rose .game-infographic-panel-emoji { color: #a83562; }
.game-infographic-panel-rose .game-infographic-panel-heading > div > span { color: #a83562; }

.game-infographic-panel-blue {
    background: linear-gradient(180deg, #edf2fc 0%, #e3eafa 100%);
    border-color: #cdd8f1;
}

.game-infographic-panel-blue .game-infographic-panel-emoji {
    background: rgba(106, 143, 212, 0.18);
}

.game-infographic-panel-blue .game-infographic-panel-emoji { color: #3a558f; }
.game-infographic-panel-blue .game-infographic-panel-heading > div > span { color: #3a558f; }

.game-infographic-panel-lavender {
    background: linear-gradient(180deg, #f3eefa 0%, #e9e1f6 100%);
    border-color: #d8cbef;
}

.game-infographic-panel-lavender .game-infographic-panel-emoji {
    background: rgba(139, 127, 191, 0.20);
}

.game-infographic-panel-lavender .game-infographic-panel-emoji { color: #5a4a96; }
.game-infographic-panel-lavender .game-infographic-panel-heading > div > span { color: #5a4a96; }

.game-infographic-panel-green {
    background: linear-gradient(180deg, #eaf6ef 0%, #dbeee2 100%);
    border-color: #bedcca;
}

.game-infographic-panel-green .game-infographic-panel-emoji {
    background: rgba(107, 179, 142, 0.20);
}

.game-infographic-panel-green .game-infographic-panel-emoji { color: #2f7256; }
.game-infographic-panel-green .game-infographic-panel-heading > div > span { color: #2f7256; }

.game-infographic-panel-teal {
    background: linear-gradient(180deg, #e3f3f1 0%, #d4ebe7 100%);
    border-color: #bbd9d4;
}

.game-infographic-panel-teal .game-infographic-panel-emoji {
    background: rgba(95, 182, 168, 0.20);
}

.game-infographic-panel-teal .game-infographic-panel-emoji { color: #226761; }
.game-infographic-panel-teal .game-infographic-panel-heading > div > span { color: #226761; }

.game-infographic-panel-amber {
    background: linear-gradient(180deg, #fdf3e2 0%, #fbe9cc 100%);
    border-color: #f0d59b;
}

.game-infographic-panel-amber .game-infographic-panel-emoji {
    background: rgba(216, 150, 47, 0.20);
}

.game-infographic-panel-amber .game-infographic-panel-emoji { color: #8a5a13; }
.game-infographic-panel-amber .game-infographic-panel-heading > div > span { color: #8a5a13; }

.game-infographic-panel-alert {
    background: linear-gradient(180deg, #fdecec 0%, #fadcdc 100%);
    border-color: #f3c0c0;
}

.game-infographic-panel-alert .game-infographic-panel-emoji {
    background: rgba(186, 70, 70, 0.18);
}

.game-infographic-panel-alert .game-infographic-panel-emoji { color: #8a2828; }
.game-infographic-panel-alert .game-infographic-panel-heading > div > span { color: #8a2828; }

@media (max-width: 540px) {
    .game-infographic-quickinfo {
            grid-template-columns: 1fr;
        }
}

@media (max-width: 640px) {
    #game-modal.modal-overlay {
            padding: 0;
            align-items: flex-end;
        }

    #game-modal .modal-dialog {
            width: 100%;
            max-width: 100%;
            max-height: 94vh;
            border-radius: 22px 22px 0 0;
            border-bottom: 0;
        }

    #game-modal .game-modal-topbar {
            border-radius: 22px 22px 0 0;
        }

    #game-modal .modal-body {
            padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
        }

    #game-modal .game-infographic-hero {
            padding: 16px;
        }
}

.game-infographic-panel p {
    margin: 0;
    color: var(--text);
    line-height: 1.75;
}

.game-infographic-muted {
    margin-top: 14px !important;
    color: var(--muted) !important;
}

.game-infographic-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.game-infographic-footer div {
    padding: 16px 18px;
    border-radius: 20px;
    background: #f1f2fb;
    border: 1px solid #dfe3f2;
}

.game-infographic-footer span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.game-infographic-footer strong {
    color: var(--primary-dark);
    font-size: 1rem;
}

@media (max-width: 1180px) {
    .game-infographic-flow {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

    .game-infographic-content-grid {
            grid-template-columns: 1fr;
        }
}

@media (max-width: 860px) {
    .modal-dialog.game-infographic-dialog {
            padding: 18px;
        }

    .game-infographic-hero {
            grid-template-columns: 1fr;
            padding: 18px 58px 18px 18px;
        }

    .game-infographic-hero-side {
            justify-items: start;
        }

    .game-infographic-duration {
            min-width: 104px;
            min-height: 96px;
            border-radius: 24px;
        }

    .game-infographic-flow,
        .game-infographic-footer {
            grid-template-columns: 1fr;
        }

    .game-infographic-bridge {
            align-items: flex-start;
            border-radius: 24px;
            flex-direction: column;
        }
}
