/* Keep public pages in the same single-column layout on desktop and mobile. */
.mobile-layout {
    --public-page-width: 30rem;
}

.mobile-layout .container,
.mobile-layout > main,
.mobile-layout > .site-head,
.mobile-layout > .site-foot,
.mobile-layout > .language-nav {
    max-width: var(--public-page-width);
    margin-inline: auto;
}

.mobile-entry > main,
.mobile-entry > .site-head,
.mobile-entry > .site-foot,
.mobile-entry > .language-nav {
    width: min(var(--public-page-width), calc(100% - 1.5rem));
}

.mobile-entry .hero,
.mobile-entry .entry-auth,
.mobile-entry .cards {
    grid-template-columns: minmax(0, 1fr);
}

.mobile-entry .hero,
.mobile-entry .entry-auth {
    min-height: 0;
    gap: 1.3rem;
    padding: 1.4rem;
}

.mobile-entry h1,
:root:not(:lang(ko)) .mobile-entry h1 {
    font-size: clamp(1.85rem, 8vw, 2.6rem);
    overflow-wrap: anywhere;
}

.mobile-entry .actions .button { flex: 1 1 12rem; }
.mobile-entry .puzzle-sample { width: min(100%, 17rem); }
.mobile-entry .theme-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.mobile-layout :is(.col-md-4, .col-md-6, .col-md-8, .col-lg-4) {
    width: 100%;
    min-width: 0;
}

.mobile-game .grid-container { max-width: 100% !important; }
.mobile-game .grid-row > .puzzle-cell {
    min-width: 0;
    height: auto !important;
    aspect-ratio: 1;
}

.mobile-game .modal-dialog {
    max-width: var(--public-page-width);
}
