@media (max-width: 767.98px) {
    .hub-hide-mobile {
        display: none !important;
    }

    .hub-page-wrapper > .container {
        display: flex;
        flex-direction: column;
    }

    .hub-page-wrapper .hub-block-card,
    .hub-page-wrapper .hub-container-block {
        order: var(--hub-mobile-order, 0);
        --hub-image-fit: var(--hub-mobile-image-fit, cover);
        --hub-image-focus: var(--hub-mobile-image-focus, 50% 50%);
    }

    .hub-hero {
        background-size: var(--hub-mobile-image-fit, var(--hub-image-fit, cover)) !important;
        background-position: var(--hub-mobile-image-focus, var(--hub-image-focus, 50% 50%)) !important;
    }

    .hub-hero-bgimg-cover,
    .hub-hero-fit-image .hub-hero-bgimg {
        object-fit: var(--hub-mobile-image-fit, var(--hub-image-fit, cover)) !important;
        object-position: var(--hub-mobile-image-focus, var(--hub-image-focus, 50% 50%)) !important;
        transform: scale(var(--hub-mobile-image-zoom-scale, var(--hub-image-zoom-scale, 1))) translateZ(0) !important;
        transform-origin: var(--hub-mobile-image-focus, var(--hub-image-focus, 50% 50%)) !important;
    }

    /* Desktop full-image heroes can opt into a bounded mobile crop in either
       contained or full-width layouts. Other full-image heroes remain natural. */
    .hub-hero-fit-image .hub-hero-media:is([data-mobile-image-fit='cover'], [data-mobile-image-fit='fill']) {
        --hub-mobile-hero-artwork-height: clamp(420px, 68svh, 560px);
    }

    .hub-hero-fit-image .hub-hero-bgimg {
        height: var(--hub-mobile-hero-artwork-height, auto) !important;
    }

    .hub-hero:not(.hub-hero-fullscreen-image) {
        max-height: none !important;
    }

    /* Fit-image heroes are excluded: their height must track the banner
       image (min-height: 0 + img in flow). Forcing the svh min-height here
       left wide banners with a huge empty area under them on phones. */
    .hub-hero:not(.hub-hero-fullscreen-image):not(.hub-hero-fit-image) {
        min-height: clamp(420px, 68svh, 560px) !important;
        border-radius: 0 0 var(--hub-radius, 14px) var(--hub-radius, 14px) !important;
        margin-bottom: 0.75rem !important;
    }

    .hub-hero-fullscreen-image {
        min-height: clamp(460px, 82svh, 640px) !important;
        max-height: none !important;
    }

    .hub-hero-content {
        min-height: inherit !important;
        padding: clamp(2.25rem, 10svh, 4rem) clamp(1rem, 5vw, 1.35rem) 2rem !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .hub-hero-fullscreen-image .hub-hero-content {
        min-height: inherit !important;
        padding: clamp(2.5rem, 12svh, 4.5rem) clamp(1rem, 5vw, 1.35rem) 2rem !important;
    }

    .hub-hero-content h1,
    .hub-page-wrapper .hub-hero h1,
    .hub-page-wrapper .hub-hero__title {
        font-size: clamp(1.85rem, 9vw, 2.45rem) !important;
        line-height: 0.95 !important;
        max-width: 100% !important;
        margin-bottom: 0.85rem !important;
    }

    .hub-hero-content .lead,
    .hub-page-wrapper .hub-hero__subtitle {
        font-size: clamp(1rem, 4.8vw, 1.35rem) !important;
        line-height: 1.2 !important;
        max-width: min(100%, 22rem) !important;
        margin-bottom: 1.25rem !important;
    }

    .hub-hero-content .d-flex.flex-wrap.gap-3 {
        gap: 0.75rem !important;
    }

    .hub-hero .btn {
        width: min(100%, 22rem);
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.78rem 1.1rem !important;
        font-size: 1rem !important;
        line-height: 1.15 !important;
        white-space: normal;
    }

    .hub-page-wrapper .hub-image-text-card__media img {
        object-fit: var(--itc-mobile-image-fit, var(--itc-image-fit, contain)) !important;
        object-position: var(--hub-mobile-image-focus, var(--hub-image-focus, 50% 50%)) !important;
    }

    /* MOBILE HOMEPAGE BLOCK HARDENING */
    .hub-page-wrapper,
    .hub-page-wrapper .hub-block-card,
    .hub-page-wrapper .hub-container-block,
    .hub-page-wrapper .hub-mobile-block {
        max-width: 100%;
        min-width: 0;
    }

    .hub-page-wrapper .hub-block-card,
    .hub-page-wrapper .hub-container-block {
        overflow-wrap: anywhere;
    }

    .hub-page-wrapper .hub-image-text-block--wide,
    .hub-page-wrapper .hub-image-text-block--full {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: none;
    }

    .hub-page-wrapper .hub-image-text-card__media,
    .hub-page-wrapper .hub-image-text-card__content {
        flex: 0 0 auto !important;
        max-width: 100%;
    }

    .hub-page-wrapper img,
    .hub-page-wrapper video,
    .hub-page-wrapper iframe,
    .hub-page-wrapper table {
        max-width: 100%;
    }

    .hub-page-wrapper .standings-table-wrap,
    .hub-page-wrapper .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .hub-page-wrapper .standings-table {
        min-width: max(480px, 100%);
    }

    .hub-page-wrapper .standings-table tbody td:nth-child(2) .d-flex {
        min-width: 0;
    }

    .hub-page-wrapper .standings-table tbody td:nth-child(2) span.fw-semibold {
        display: block;
        min-width: 0;
        max-width: 12rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hub-page-wrapper .match-row,
    .hub-page-wrapper .match-team,
    .hub-page-wrapper .match-team-info,
    .hub-page-wrapper .match-center {
        max-width: 100%;
        min-width: 0;
    }

    .hub-page-wrapper .match-team-name,
    .hub-page-wrapper .match-team-record,
    .hub-page-wrapper .match-time,
    .hub-page-wrapper .match-venue {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hub-page-wrapper .match-team-name {
        white-space: normal;
    }

    .hub-page-wrapper .match-team-record,
    .hub-page-wrapper .match-time,
    .hub-page-wrapper .match-venue {
        white-space: nowrap;
    }

    .hub-page-wrapper .leaderboard-featured,
    .hub-page-wrapper .leaderboard-row,
    .hub-page-wrapper .leaderboard-featured-info,
    .hub-page-wrapper .leaderboard-row-info {
        max-width: 100%;
        min-width: 0;
    }

    .hub-page-wrapper .leaderboard-featured-name,
    .hub-page-wrapper .leaderboard-featured-team,
    .hub-page-wrapper .leaderboard-row-name,
    .hub-page-wrapper .leaderboard-row-team {
        display: block;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hub-page-wrapper .leaderboard-featured-stat,
    .hub-page-wrapper .leaderboard-row-stat {
        max-width: 5rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hub-page-wrapper .awards-featured-body,
    .hub-page-wrapper .awards-featured-main,
    .hub-page-wrapper .awards-featured-info,
    .hub-page-wrapper .awards-stat-stack {
        max-width: 100%;
        min-width: 0;
    }

    .hub-page-wrapper .awards-player-name,
    .hub-page-wrapper .awards-team-name,
    .hub-page-wrapper .awards-stat-card__label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hub-page-wrapper .hub-news-card,
    .hub-page-wrapper .hub-news-card__content,
    .hub-page-wrapper .hub-news-card__meta,
    .hub-page-wrapper .hub-news-card--list {
        max-width: 100%;
        min-width: 0;
    }

    .hub-page-wrapper .hub-news-card__meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .hub-page-wrapper .hub-news-card--list {
        display: flex !important;
        flex-direction: column !important;
    }

    .hub-page-wrapper .hub-news-carousel,
    .hub-page-wrapper .hub-news-slideshow,
    .hub-page-wrapper .hub-news-carousel .carousel-inner,
    .hub-page-wrapper .hub-news-carousel .carousel-item {
        max-width: 100%;
        overflow: hidden;
    }

    .hub-page-wrapper .hub-news-carousel .carousel-inner,
    .hub-page-wrapper .hub-news-carousel .carousel-item {
        height: clamp(260px, 72vw, 380px) !important;
    }

    .hub-page-wrapper .hub-news-carousel .carousel-control-prev,
    .hub-page-wrapper .hub-news-carousel .carousel-control-next {
        width: 2.5rem;
        height: 2.5rem;
        opacity: 1;
    }

    .hub-page-wrapper .hub-news-carousel .carousel-control-prev {
        left: 0.5rem;
    }

    .hub-page-wrapper .hub-news-carousel .carousel-control-next {
        right: 0.5rem;
    }

    .hub-page-wrapper [data-block-type="slideshow"] .carousel-inner {
        max-height: clamp(260px, 70svh, 480px) !important;
    }

    /* "Show full image" frames keep fitting the tallest photo on phones too. */
    .hub-page-wrapper [data-block-type="slideshow"] .hub-slideshow-composition[data-fit-to-photo] .carousel-inner {
        max-height: min(clamp(260px, 70svh, 480px), calc(100cqw * var(--hub-slideshow-fit-ratio, 100))) !important;
    }

    .hub-page-wrapper [data-block-type="slideshow"] .carousel-control-prev,
    .hub-page-wrapper [data-block-type="slideshow"] .carousel-control-next {
        width: 2.75rem;
    }

    .hub-page-wrapper .hub-profile-card__meta,
    .hub-page-wrapper .hub-download-meta,
    .hub-page-wrapper .hub-registration-card__body,
    .hub-page-wrapper .hub-sponsor-spotlight-card__body,
    .hub-page-wrapper .hub-profile-card__chips,
    .hub-page-wrapper .hub-download-meta__chips,
    .hub-page-wrapper .hub-registration-card__actions,
    .hub-page-wrapper .hub-sponsor-spotlight-card__actions,
    .hub-page-wrapper .hub-image-text-card__actions {
        max-width: 100%;
        min-width: 0;
    }

    .hub-page-wrapper .hub-download-meta__chips,
    .hub-page-wrapper .hub-registration-card__actions,
    .hub-page-wrapper .hub-sponsor-spotlight-card__actions,
    .hub-page-wrapper .hub-image-text-card__actions,
    .hub-page-wrapper .hub-profile-card__chips {
        align-items: stretch;
        width: 100%;
    }

    .hub-page-wrapper .hub-cta-block .btn,
    .hub-page-wrapper .hub-registration-card__actions .btn,
    .hub-page-wrapper .hub-sponsor-spotlight-card__actions .btn,
    .hub-page-wrapper .hub-download-meta__chips .btn,
    .hub-page-wrapper .hub-profile-card__chips .btn,
    .hub-page-wrapper .hub-registration-banner .btn,
    .hub-page-wrapper .hub-announcement-cta,
    .hub-page-wrapper .hub-video-cta,
    .hub-page-wrapper .hub-image-text-card__actions .btn,
    .hub-page-wrapper [data-block-type="season_cards"] .btn,
    .hub-page-wrapper .social-cta-btn,
    .hub-page-wrapper .hub-lead-form .btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: 100%;
        text-align: center;
        white-space: normal;
    }

    .hub-page-wrapper .hub-lead-form-shell,
    .hub-page-wrapper .hub-lead-form-shell--inline {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .hub-page-wrapper .hub-lead-form-grid {
        grid-template-columns: 1fr !important;
    }

    .hub-page-wrapper .hub-block-card .form-control,
    .hub-page-wrapper .hub-block-card .form-select,
    .hub-page-wrapper .hub-block-card textarea {
        width: 100%;
        min-width: 0;
    }

    .hub-page-wrapper .social-links-grid {
        grid-template-columns: 1fr !important;
    }

    .hub-page-wrapper .social-link-card,
    .hub-page-wrapper .social-cta-card,
    .hub-page-wrapper .social-link-handle {
        max-width: 100%;
        min-width: 0;
    }

    .hub-page-wrapper .hub-profile-card__top,
    .hub-page-wrapper .hub-event-card__top,
    .hub-page-wrapper .hub-sponsor-spotlight-card__top {
        align-items: flex-start;
    }

    .hub-page-wrapper .hub-profile-card__name,
    .hub-page-wrapper .hub-sponsor-spotlight-card__title {
        overflow-wrap: anywhere;
    }

    .hub-page-wrapper .countdown-timer,
    .hub-page-wrapper [data-countdown-target] {
        gap: 0.5rem !important;
    }

    .hub-page-wrapper .countdown-unit {
        flex: 1 1 calc(33.333% - 0.5rem) !important;
        min-width: 0 !important;
        padding: 0.75rem 0.5rem !important;
    }

    .hub-page-wrapper .countdown-unit .countdown-value {
        font-size: clamp(1.5rem, 9vw, 2.25rem) !important;
    }
}

@media (max-width: 575.98px) {
    .hub-page-wrapper .match-center {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .hub-page-wrapper .match-center .match-venue {
        max-width: 100%;
    }

    .hub-page-wrapper .hub-profile-card__top,
    .hub-page-wrapper .hub-sponsor-spotlight-card__top {
        flex-direction: column;
    }

    /* Events keep the date tile beside the title: a compact agenda row rather
       than a full-width date bar above every event. */
    .hub-page-wrapper .hub-event-card__top {
        align-items: flex-start;
        flex-direction: row;
        gap: .85rem;
    }

    .hub-page-wrapper .hub-event-card__date {
        min-width: 52px;
        padding: .55rem .4rem;
    }

    /* Countdown: one row of equal units, as on larger screens, instead of a
       tall stack. Each unit sizes its number to its own width so up to four
       units (and long day counts) still fit on a small phone. */
    .hub-page-wrapper .countdown-unit {
        container-type: inline-size;
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    .hub-page-wrapper .countdown-unit .countdown-value {
        font-size: clamp(1.25rem, 30cqi, 2.25rem) !important;
    }

    .hub-page-wrapper .countdown-unit .countdown-label {
        font-size: .65rem !important;
        letter-spacing: .08em !important;
    }
}

/* ===== Mobile tightening ===== */
@media (max-width: 768px) {
    .hub-page-wrapper .hub-block-card {
        padding: 1rem !important;
        border-radius: 12px !important;
    }
    .hub-page-wrapper .hub-cta-block {
        padding: 1.5rem !important;
        border-radius: 12px !important;
    }
    .hub-page-wrapper .hub-cta-block.hub-cta-block--image-fit {
        padding: 0 !important;
    }
    .hub-hero .hub-hero-cta {
        width: min(100%, 22rem);
        min-height: 48px;
        padding: 0.78rem 1.1rem !important;
        font-size: 1rem !important;
        white-space: normal;
    }
}

/* ===== Mobile public-page composition =====
   The homepage lives inside the public shell's container, and its hero and
   block canvas each add another Bootstrap container. On a phone that used to
   turn a 390px viewport into a 294–310px canvas, while the 105px fixed nav was
   given only 80px of page clearance. Keep one deliberate gutter, reserve the
   real header height, and let wide promotional artwork remain unobstructed. */
@media (max-width: 767.98px) {
    body.public-page .navbar.app-navbar {
        height: auto !important;
        min-height: 72px !important;
        padding: 0 !important;
    }

    body.public-page .navbar.app-navbar > .d-lg-none,
    body.public-page .navbar.app-navbar > .d-lg-none > .container {
        height: auto;
        min-height: 72px;
    }

    body.public-page .navbar.app-navbar > .d-lg-none > .container {
        padding: 12px 16px !important;
    }

    body.public-page .navbar.app-navbar .navbar-brand {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 56px);
    }

    body.public-page .navbar.app-navbar .navbar-brand .brand-avatar {
        flex: 0 0 36px;
        width: 36px !important;
        height: 36px !important;
        max-width: 36px !important;
        max-height: 36px !important;
    }

    body.public-page .navbar.app-navbar .navbar-brand > span {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.2;
    }

    body.public-page .navbar.app-navbar .navbar-toggler {
        flex: 0 0 44px;
        width: 44px !important;
        height: 44px !important;
        margin-left: 12px !important;
    }

    body.public-page:not(.has-ticker):not(.preview-chrome-hidden) #main-content {
        padding-top: var(--navbar-real-height, 72px) !important;
    }

    body.public-page .public-main-container {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }

    body.public-page .public-main-container > .container {
        width: 100%;
        max-width: none !important;
        padding: 8px 0 0 !important;
    }

    body.public-page .hub-page-wrapper > .container {
        width: 100%;
        max-width: none !important;
        padding: 0 0 24px !important;
    }

    body.public-page .hub-page-wrapper > .container > .hub-block-card:first-child,
    body.public-page .hub-page-wrapper > .container > .hub-container-block:first-child {
        margin-top: 16px !important;
    }

    body.public-page .public-main-container > .container > .hub-hero.hub-hero-fit-image {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 0 !important;
        overflow: visible !important;
        isolation: auto;
        clip-path: none !important;
        transform: none !important;
        border-radius: 0 !important;
    }

    body.public-page .public-main-container > .container > .hub-hero-fit-image .hub-hero-media {
        width: 100%;
        overflow: hidden;
        border-radius: 14px;
        clip-path: inset(0 round 14px);
    }

    body.public-page .public-main-container > .container > .hub-hero-fit-image .hub-hero-bgimg {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        height: var(--hub-mobile-hero-artwork-height, auto) !important;
        flex: 0 0 auto;
        object-fit: var(--hub-mobile-image-fit, contain) !important;
        transform: scale(var(--hub-mobile-image-zoom-scale, 1)) !important;
        border-radius: 14px !important;
    }

    body.public-page .public-main-container > .container > .hub-hero-fit-image .hub-hero-overlay {
        display: none !important;
    }

    body.public-page .public-main-container > .container > .hub-hero-fit-image .hub-hero-content {
        position: static !important;
        inset: auto !important;
        display: block;
        width: 100%;
        min-height: 0 !important;
        padding: 10px 0 0 !important;
        color: var(--hub-text) !important;
        text-align: left !important;
    }

    body.public-page .public-main-container > .container > .hub-hero-fit-image .hub-hero-media--copyless .hub-hero-content {
        display: none !important;
        padding: 0 !important;
    }

    body.public-page .public-main-container > .container > .hub-hero-fit-image .hub-hero-content > :is(.row, .d-flex) {
        width: 100%;
        margin: 0 !important;
    }

    body.public-page .public-main-container > .container > .hub-hero-fit-image .hub-hero-content .col-lg-8 {
        width: 100%;
        padding: 0 !important;
    }

    body.public-page .public-main-container > .container > .hub-hero-fit-image .hub-hero-content :is(h1, .lead) {
        max-width: 100% !important;
        color: var(--hub-text) !important;
        text-align: left !important;
    }

    body.public-page .public-main-container > .container > .hub-hero-fit-image .hub-hero-action-rail {
        width: 100%;
        gap: 0.625rem !important;
        justify-content: center !important;
        padding-inline: 0.6rem;
    }

    body.public-page .public-main-container > .container > .hub-hero-fit-image .hub-hero-action-rail .hub-hero-cta {
        width: min(100%, 17rem);
        min-width: 0;
        max-width: 100%;
        min-height: 3rem;
        margin-inline: auto;
    }

    body.public-page .hub-page-wrapper .hub-image-text-block {
        margin-top: 16px !important;
        margin-bottom: 16px !important;
    }

    body.public-page .hub-page-wrapper .hub-image-text-card__content {
        padding: 20px !important;
    }
}
