/* Mobile fixes: kill horizontal page overflow, make wide tables scroll
   inside their own container instead of stretching the viewport. */

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Wide tables scroll within, not the page */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll > table {
    min-width: 560px;
}

/* Calendar grid needs its full width — scroll it horizontally on phones */
.cal-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cal-scroll > table {
    min-width: 640px;
}

@media (max-width: 767px) {
    /* Place-card previews shrink on phones */
    .pcrun-preview { width: 140px; height: 78px; }
    .pcrun-preview .pcrun-name { font-size: 1rem; }
    .pcrun-preview .pcrun-table { font-size: 0.7rem; }

    /* "Aa" popover must never push past the viewport edge */
    details.fstyle .fstyle-body {
        flex-wrap: wrap;
        max-width: calc(100vw - 3rem);
    }

    /* Headroom-fixed navbar overlaps less content */
    .site-section { padding-top: 1rem; }

    h1.page-title { font-size: 1.7rem; }
}
