/* The single-game launcher is independent of all retired game styles. */
.minigame-page { background: #eaf1eb; color: #17231f; overscroll-behavior: none; }
.minigame-page * { box-sizing: border-box; }
.minigame-shell { width: min(100%, 1180px); }
.minigame-page .topbar .nav-button, .minigame-page .topbar .global-nav a { min-height: 44px; }
.mg-library[hidden] { display: none !important; }
.mg-library {
    --mg-ink: #173b32;
    width: min(100%, 800px);
    margin: 18px auto 30px;
    padding: clamp(18px, 3vw, 34px);
    overflow: hidden;
    color: var(--mg-ink);
    border: 1px solid rgba(30, 86, 67, .14);
    border-radius: 28px;
    background:
        radial-gradient(circle at 8% 12%, rgba(255, 226, 101, .35), transparent 23%),
        linear-gradient(145deg, #f9fff2 0%, #e3f7d7 55%, #d2edca 100%);
    box-shadow: 0 22px 55px rgba(22, 64, 46, .12);
}

.mg-library-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.mg-library-heading span,
.mg-card-copy small {
    color: #4e876c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
}

.mg-library-heading h1 {
    margin: 5px 0 6px;
    font-size: clamp(25px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -.04em;
}

.mg-library-heading p {
    margin: 0;
    color: #5a7469;
}

.mg-library-heading .mg-library-count {
    flex: 0 0 auto;
    padding: 9px 13px;
    color: #fff;
    border-radius: 999px;
    background: #23694e;
    box-shadow: 0 7px 16px rgba(35, 105, 78, .2);
}

.mg-library-grid {
    display: grid;
    grid-template-columns: minmax(0, 520px);
    gap: 18px;
    justify-content: center;
}

.mg-game-card {
    display: grid;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    text-align: left;
    color: inherit;
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 13px 30px rgba(26, 67, 49, .14);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.mg-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 19px 38px rgba(26, 67, 49, .2);
}

.mg-game-card:focus-visible {
    outline: 4px solid #f5bb32;
    outline-offset: 3px;
}


.mg-card-scene { position: relative; display: block; min-height: 250px; overflow: hidden; }
.mg-card-copy {
    display: grid;
    gap: 6px;
    padding: 20px;
}

.mg-card-copy strong {
    font-size: clamp(22px, 3vw, 31px);
    letter-spacing: -.04em;
}

.mg-card-copy em {
    min-height: 42px;
    color: #64736c;
    font-style: normal;
    line-height: 1.45;
}

.mg-card-copy b {
    width: fit-content;
    margin-top: 6px;
    padding: 9px 15px;
    color: #fff;
    border-radius: 999px;
    background: #287653;
}


@media (max-width: 560px) {
    .mg-library { border-radius: 20px; }
    .mg-library-heading { gap: 12px; }
    .mg-library-heading h1 { font-size: 26px; }
    .mg-library-heading .mg-library-count { display: none; }
    .mg-card-scene { min-height: 210px; }
}
@media (prefers-reduced-motion: reduce) {
    .mg-game-card { transition: none; }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
    .mg-library { margin: 8px auto 16px; padding: 14px 18px; border-radius: 20px; }
    .mg-library-heading { margin-bottom: 12px; gap: 12px; }
    .mg-library-heading h1 { font-size: 25px; }
    .mg-library-heading p { font-size: 14px; }
    .mg-library-count { display: none; }
    .mg-library-grid { grid-template-columns: minmax(0, 640px); }
    .mg-game-card { grid-template-columns: minmax(130px, 32%) minmax(0, 1fr); border-radius: 16px; }
    .mg-card-scene { min-height: 160px; }
    .mg-card-copy { padding: 12px 16px; gap: 4px; }
    .mg-card-copy strong { font-size: 22px; }
    .mg-card-copy em { font-size: 14px; min-height: 0; }
    .mg-card-copy b { margin-top: 2px; padding: 7px 14px; }
}
