/* Gallery-only composition; do not change game shells or the lobby grid. */
.gallery-page { overflow-x: visible; }
.gallery-page .achievements-shell {
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.gallery-page .arcade-topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
.gallery-page .arcade-status { line-height: 1.5; text-align: center; }
.gallery-page .arcade-status::before,
.gallery-page .arcade-status::after { display: none; }
.gallery-page .achievement-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 180px); }
.gallery-page .achievement-hero > *,
.gallery-page .achievement-card > * { min-width: 0; }
.gallery-page .achievement-hero h1 { font-size: clamp(2rem, 5vw, 4.5rem); line-height: 1.06; overflow-wrap: anywhere; }
.gallery-page .section-heading { flex-wrap: wrap; align-items: start; }
.gallery-page .section-heading h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.15; }
.gallery-page .section-heading p { font-size: .875rem; max-width: 42rem; }
.gallery-page .achievement-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.gallery-page .achievement-card { min-width: 0; grid-template-rows: auto auto 1fr auto auto; padding: 16px; }
.gallery-page .achievement-card h3 { font-size: 1.2rem; line-height: 1.25; overflow-wrap: anywhere; }
.gallery-page .achievement-card p { font-size: .9375rem; line-height: 1.5; }
.gallery-page .concept-label { color: var(--soft); font-size: .75rem; line-height: 1.5; }
.badge-art { display: grid; min-width: 0; place-items: center; min-height: 180px; }
.gallery-page .badge-art img { width: 160px; height: 180px; max-width: 100%; max-height: none; object-fit: contain; }
.gallery-page .hero-art img { width: 180px; }
.gallery-page .badge-art-fallback { color: var(--soft); font-family: inherit; font-size: .875rem; font-weight: 600; line-height: 1.5; padding: 12px; border: 1px dashed var(--muted); border-radius: 8px; }
.gallery-page [hidden] { display: none !important; }
.badge-play,
.gallery-page .arcade-topbar a {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
    padding: 12px; line-height: 1.4; text-align: center; overflow-wrap: anywhere;
}
.badge-play { border: 1px solid var(--border); border-radius: 7px; color: var(--cyan); font-size: .875rem; font-weight: 700; text-underline-offset: 3px; }
.gallery-page a:focus-visible,
.gallery-page #badgeTitle:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.gallery-footer { margin: 24px 0 0; }
.gallery-skip { position: absolute; left: 16px; top: -200px; z-index: 10; padding: 14px; background: var(--bg); color: var(--cyan); }
.gallery-skip:focus { top: 8px; }
@media (max-width: 600px) {
    .gallery-page .arcade-topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
    .gallery-page .arcade-status { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
    .gallery-page .achievement-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; text-align: left; gap: 16px; }
    .gallery-page .hero-art { display: none; }
    .gallery-page .section-heading p { text-align: left; }
}
@media (forced-colors: active) {
    .badge-play, .gallery-page .achievement-card { border-color: ButtonText; }
}
