/* Public content only. Load after the page styles; desktop layouts stay intact. */
@media (max-width: 900px) {
    .rules-hero h1 { line-height: 1.15; }
    .activities-page .quest-status,
    .dr-page .dr-card-heading > div > span,
    .community-market :is(.cm-hero__brand > span, .cm-sidebar__section > header, .cm-wallet > header),
    .trade-page :is(.trade-hero__stats article > span, .trade-security-note > b) { font-size: 12px; line-height: 1.5; }
    .community-market .cm-wallet > div > strong { font-size: 14px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
    .forum-layout :is(.forum-side-panel__head a, .forum-side-panel__head > span,
        .forum-topic-panel__head > small, .forum-side-empty, .forum-server-card > header > span,
        .forum-server-card__scene small, .forum-latest-item__copy small, .forum-latest-item__count) { font-size: 12px; line-height: 1.5; }
    .forum-layout .forum-side-panel__head a { display: inline-flex; align-items: center; min-height: 44px; }
    .forum-layout .forum-server-card > header { flex-wrap: wrap; }
    .forum-layout :is(.forum-server-card__scene strong, .forum-server-card__scene p, .forum-latest-item__copy strong) { font-size: 14px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
    .forum-layout .forum-server-card > a { min-height: 44px; font-size: 14px; }
    .inventory-page :is(.inventory-owned-state, .inventory-future-actions small,
        .inventory-equipment > header span, .inventory-profile-slots > header span) { font-size: 12px; line-height: 1.5; }
    .inventory-page :is(.inventory-toolbar__submit, .inventory-advanced > summary, .inventory-equipment > header a) { min-height: 44px; font-size: 14px; line-height: 1.5; }
    .inventory-page .inventory-future-actions button { height: auto; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 10px; }
    .inventory-page .inventory-mini-loadout > header > div > span { font-size: 12px; line-height: 1.5; }
    .inventory-page .inventory-mini-loadout > header > a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; line-height: 1.5; }
}
@media (max-width: 900px) {
    .profile-site-main,
    .profile-site-main:has(:is(.shop-page, .market-page, .trade-page)) {
        width: calc(100% - 24px);
        min-width: 0;
    }

    :is(.about-project, .activities-page, .shop-page, .market-page, .trade-page, .community-market,
        .rules-main, .public-news-main, .public-page-main, .forum-layout, .forum-page-head) {
        min-width: 0;
        font-size: 14px;
        overflow-wrap: anywhere;
    }
    :is(.about-project, .activities-page, .shop-page, .market-page, .trade-page, .community-market,
        .rules-main, .public-news-main, .public-page-main, .forum-layout) :is(p, li) {
        font-size: 14px;
        line-height: 1.65;
    }
    :is(.about-project, .activities-page, .shop-page, .market-page, .trade-page, .community-market,
        .rules-main, .public-news-main, .public-page-main, .forum-layout) small {
        font-size: 12px;
        line-height: 1.5;
    }
    :is(.about-project, .activities-page, .shop-page, .market-page, .trade-page, .community-market,
        .forum-layout, .forum-editor-dialog) :is(input, select, textarea) {
        max-width: 100%;
        font-size: 16px;
        box-sizing: border-box;
    }
    :is(.about-project, .activities-page, .shop-page, .market-page, .trade-page, .community-market,
        .forum-layout, .forum-editor-dialog) :is(select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="hidden"])) {
        min-height: 44px;
        min-width: 0;
    }
    :is(.about-project, .activities-page, .shop-page, .market-page, .trade-page, .community-market,
        .forum-layout) :is(button, summary) {
        min-height: 44px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    :is(.about-single-content, .about-section, .quest-card, .dr-today, .dr-calendar-panel,
        .shop-browser, .shop-catalog, .shop-detail, .market-browser, .market-catalog, .market-detail,
        .cm-layout, .cm-browser, .cm-item-layout, .trade-columns, .trade-builder-grid,
        .forum-layout, .forum-main, .forum-post, .rules-content, .public-news-grid) > * {
        min-width: 0;
    }

    /* Give introductions and installation steps a full line at tablet widths. */
    .about-project .about-single-layout,
    .play-guide .about-single-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .about-project .about-sidebar { position: static; }
    .about-project .about-side-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .about-project .about-side-menu a { min-height: 44px; font-size: 14px; }
    .about-project .about-sidebar__head > span,
    .about-project .about-side-menu b,
    .about-project .about-eyebrow { font-size: 12px; letter-spacing: 1px; }
    .about-project .about-features--3 { grid-template-columns: minmax(0, 1fr); }
    .about-project--single .about-story__copy { width: 100%; max-width: 600px; }
    .about-project .about-story__art::after {
        background: linear-gradient(90deg, rgba(5, 7, 16, .92), rgba(5, 7, 16, .74));
    }
    .play-guide .play-guide__heading-copy { width: 100%; max-width: 600px; }
    .play-guide .play-guide__heading::before {
        background: linear-gradient(90deg, rgba(8, 10, 21, .95), rgba(8, 10, 21, .75));
    }
    .play-guide .play-guide__chapter,
    .play-guide .play-guide__option-label,
    .play-guide .play-guide__route,
    .play-guide .play-guide__address span { font-size: 12px; letter-spacing: .7px; }
    .play-guide :is(.button, .play-guide__actions > a, .play-guide__skip, button) {
        min-height: 44px;
        font-size: 14px;
    }
    .play-guide .play-guide__console-bar { flex-wrap: wrap; font-size: 12px; letter-spacing: .4px; }
    .play-guide .play-guide__command code { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

    /* Existing commerce grids have minimum columns wider than a phone. */
    .shop-page .shop-browser,
    .market-page .market-browser { display: block; }
    .shop-page .shop-categories,
    .market-page .market-categories { border-right: 0; border-bottom: 1px solid rgba(130, 140, 190, .2); }
    .shop-page .shop-detail,
    .market-page .market-detail { display: block; border-left: 0; }
    .shop-page .shop-toolbar,
    .market-page .market-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shop-page .shop-search,
    .market-page .market-search { grid-column: 1 / -1; }
    .shop-page .shop-grid,
    .market-page .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shop-page :is(.shop-select > span, .shop-panel-label, .shop-found),
    .market-page :is(.market-select > span, .market-panel-label, .market-found) { font-size: 12px; }
    .shop-page :is(.shop-categories nav a, .shop-currency-tabs a),
    .market-page :is(.market-categories nav a, .market-tabs a) { min-height: 44px; font-size: 14px; }
    .shop-page :is(.shop-card__copy h3, .shop-card__copy strong),
    .market-page .market-card__body strong {
        font-size: 14px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .shop-page :is(.shop-detail__facts dt, .shop-detail__facts dd),
    .market-page :is(.market-detail__facts dt, .market-detail__facts dd) { font-size: 14px; }
    .shop-page :is(.shop-detail__facts > div, .shop-card__bottom),
    .market-page .market-detail__facts > div { flex-wrap: wrap; }
    .community-market .cm-layout,
    .community-market .cm-item-layout,
    .community-market .cm-buy-orders__grid { grid-template-columns: minmax(0, 1fr); }
    .community-market :is(.cm-toolbar, .cm-sidebar) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .community-market :is(.cm-actions, .cm-currency-tabs, .cm-buy-orders > header) { flex-wrap: wrap; }
    .community-market :is(.cm-toolbar label > span, .cm-wallet span, .cm-security-note strong,
        .cm-market-row__offers span, .cm-market-row__prices small, .cm-order-book__head) { font-size: 12px; }
    .community-market :is(.cm-actions a, .cm-sidebar__section nav a, .cm-currency-tabs a) { min-height: 44px; font-size: 14px; }
    .community-market :is(.cm-market-row__item strong, .cm-market-row__item span, .cm-market-row__item small) {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .community-market .cm-order-book__head,
    .community-market .cm-order-book__row {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .65fr);
        gap: 8px;
        padding: 10px;
        overflow-wrap: anywhere;
    }
    .community-market .cm-order-book__row { font-size: 14px; }
    .trade-page :is(.trade-page-nav, .trade-detail-head, .trade-offer-card > header,
        .trade-offer-card > footer, .trade-review__footer) { flex-wrap: wrap; }
    .trade-page :is(.trade-page-nav a, .trade-primary-button, .trade-back-link,
        .trade-recipient-list article > a) { min-height: 44px; font-size: 14px; }
    .trade-page :is(.trade-item-chip__copy strong, .trade-offer-card time) {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    /* Public profile typography was designed at 7–10 px even on small screens. */
    :is(.player-profile-hero, .player-identity-grid, .player-profile-layout) {
        min-width: 0;
        overflow-wrap: anywhere;
    }
    :is(.player-profile-hero, .player-identity-grid, .player-profile-layout) :is(p, li) { font-size: 14px; line-height: 1.65; }
    :is(.player-profile-hero, .player-identity-grid, .player-profile-layout) small,
    .player-profile-meta,
    .player-profile-kicker,
    .player-identity-card > span,
    .player-section-head > div > span,
    .player-level-card__top span,
    .player-stats-grid span,
    .player-level-card__bottom,
    .player-showcase-slot strong,
    .player-social-list > div { font-size: 12px; line-height: 1.5; }
    .player-profile-identity { min-width: 0; }
    .player-profile-name-row { flex-wrap: wrap; }
    .player-profile-identity h1 { font-size: clamp(26px, 6vw, 36px); line-height: 1.2; overflow-wrap: anywhere; }
    .player-profile-meta { flex-wrap: wrap; }
    .player-profile-button { min-height: 44px; height: auto; font-size: 14px; white-space: normal; text-align: center; }
    .player-profile-actions form .player-profile-button { min-height: 44px; height: auto; }
    .player-identity-card strong,
    .player-empty-state strong { font-size: 16px; }
    .player-section-head { flex-wrap: wrap; gap: 12px; }
    .player-section-head h2 { font-size: 20px; }
    .player-section-head > small { position: static; }
    .player-social-list > div { flex-wrap: wrap; padding: 10px; }
    .player-profile-kicker,
    .player-identity-card > span,
    .player-section-head > div > span,
    .player-level-card__top span,
    .player-stats-grid span { color: #b7a7d1; }
    .player-profile-note,
    .player-empty-state p,
    .player-stats-grid small,
    .player-identity-card small { color: #aeb9d1; }

    .rules-main,
    .public-news-main,
    .public-page-main { width: calc(100% - 24px); }
    .rules-main .rules-layout { grid-template-columns: minmax(0, 1fr); }
    .rules-main .rules-sidebar { position: static; }
    .rules-main .rules-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rules-main :is(.rules-menu a, .rules-sidebar__head strong) { font-size: 14px; }
    .rules-main :is(.rules-kicker, .rules-hero__meta, .rules-sidebar__head span,
        .rules-menu b, .rule-section__body header > div > span, .rule-item__code,
        .rule-item__note, .rule-placeholder small) { font-size: 12px; line-height: 1.5; }
    .rules-main .rule-item__copy h3 { font-size: 16px; line-height: 1.4; }
    .rules-main :is(.rule-item__copy > p, .rule-section > .rule-section__body > p,
        .rules-sidebar__note p, .rule-placeholder span, .rules-empty-public) { font-size: 14px; line-height: 1.65; }
    .public-news-main :is(.public-news-card__meta, .public-news-article__meta,
        .public-news-article__meta small, .public-news-hero > span),
    .public-page-main .public-page-kicker { font-size: 12px; line-height: 1.5; }
    .public-news-main :is(.public-news-card__meta, .public-news-article__meta) { flex-wrap: wrap; }
    .public-news-main :is(.public-news-card__link, .public-news-back) {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        font-size: 14px;
    }
    .public-news-main .public-news-card h2 { font-size: 20px; line-height: 1.35; }
    .public-news-main :is(.public-news-article__body, .public-news-article__body p),
    .public-page-main :is(.public-page-body, .public-page-body p) { font-size: 16px; line-height: 1.75; }
    :is(.public-news-article__body, .public-page-body, .forum-post__body, .forum-rich-editor .tiptap) :is(img, video, iframe) {
        max-width: 100%;
    }
    :is(.public-news-article__body, .public-page-body, .forum-post__body) img { height: auto; }
    :is(.public-news-article__body, .public-page-body, .forum-post__body) pre {
        max-width: 100%;
        overflow: auto;
        font-size: 13px;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }
    :is(.public-news-article__body, .public-page-body, .forum-post__body) table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    /* Keep editing and navigation usable without shrinking post text. */
    .forum-layout :is(.forum-rich-editor__content, .forum-rich-editor__fallback textarea, .tiptap) {
        font-size: 16px;
        line-height: 1.65;
    }
    .forum-layout .forum-rich-editor .forum-editor-tool,
    .forum-layout .forum-editor-color { width: 44px; height: 44px; min-height: 44px; }
    .forum-layout .forum-rich-editor .forum-editor-select { height: 44px; max-width: 100%; font-size: 16px; }
    .forum-layout .forum-rich-editor__footer { flex-wrap: wrap; font-size: 12px; }
    .forum-layout :is(.forum-primary-button, .forum-secondary-button,
        .forum-post__actions a, .forum-post__actions button, .forum-breadcrumbs a) {
        min-height: 44px;
        font-size: 14px;
        white-space: normal;
    }
    .forum-layout .forum-post__body { font-size: 16px; line-height: 1.7; min-width: 0; }
    .forum-layout :is(.forum-post__meta, .forum-post__actions, .forum-pagination) { flex-wrap: wrap; }
    .forum-layout :is(.forum-section-row__copy, .forum-topic-row__copy, .forum-post__main) { min-width: 0; }
    .forum-layout :is(.forum-section-row__copy p, .forum-topic-row__copy p) { white-space: normal; }
    .forum-layout :is(.forum-section-row__copy h3, .forum-section-row__copy h3 a, .forum-topic-row__title) {
        font-size: 16px;
        line-height: 1.5;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .forum-layout :is(.forum-section-row__numbers, .forum-topic-row__numbers, .forum-topic-row__meta,
        .forum-last-post-link, .forum-post__head time, .forum-post__edited) { font-size: 12px; line-height: 1.5; }
}

@media (max-width: 680px) {
    .about-project .about-story,
    .play-guide .play-guide__option { padding: 20px 16px; }
    .about-project .about-story__art {
        position: relative;
        height: 170px;
        margin: -20px -16px 20px;
    }
    .about-project .about-story__art::after { display: none; }
    .about-project .about-story__copy { width: 100%; }
    .about-project .about-story__title { font-size: 28px; line-height: 1.2; }
    .about-project :is(.about-features, .about-rewards, .about-player-grid, .about-side-menu) {
        grid-template-columns: minmax(0, 1fr);
    }
    .play-guide .play-guide__heading { display: block; padding: 0; }
    .play-guide .play-guide__art { position: relative; inset: auto; z-index: 0; height: auto; aspect-ratio: 16 / 8; }
    .play-guide .play-guide__heading::before { z-index: 1; bottom: auto; height: 50vw; max-height: 270px; background: linear-gradient(0deg, #080b18, transparent 55%); }
    .play-guide .play-guide__heading-copy { position: relative; z-index: 2; width: 100%; padding: 0 18px 22px; margin-top: -12px; }
    .play-guide .play-guide__heading h2 { font-size: 28px; }
    .play-guide .play-guide__steps > li { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .play-guide .play-guide__steps::before { display: none; }
    .play-guide .play-guide__step-number { margin: 0; }
    .play-guide .play-guide__step-body { padding: 18px 14px; }
    .play-guide .play-guide__step-body h3 { font-size: 18px; align-items: flex-start; }
    .play-guide .play-guide__command { flex-wrap: wrap; }
    .play-guide .play-guide__command code { flex-basis: calc(100% - 36px); }
    .play-guide .play-guide__command button { width: 100%; }
    .play-guide .play-guide__address { flex-direction: column; align-items: stretch; }
    .play-guide .play-guide__address button { width: 100%; margin-left: 0; }
    .play-guide .play-guide__feedback { margin-left: 0; }
    .play-guide .play-guide__options { grid-template-columns: minmax(0, 1fr); }

    .activities-page .activity-tabs,
    .activities-page .quest-cards,
    .activities-page .quest-benefits,
    .dr-page .dr-today { grid-template-columns: minmax(0, 1fr); }
    .activities-page .activity-tab { justify-content: flex-start; min-height: 48px; font-size: 14px; }
    .activities-page .activity-tab__soon { margin-left: auto; }
    .activities-page .activities-hero { min-height: 0; padding: 26px 0; }
    .activities-page .activities-hero h1,
    .dr-page .dr-hero h1 { font-size: clamp(30px, 8vw, 40px); line-height: 1.15; letter-spacing: -.7px; }
    .activities-page .activities-hero__note { display: flex; align-items: flex-start; font-size: 12px; }
    .activities-page .quest-card__header { flex-wrap: wrap; height: auto; min-height: 0; padding: 14px; gap: 10px; }
    .activities-page .quest-card__header > div { flex: 1 1 140px; }
    .activities-page .quest-card__header h2 { font-size: 14px; }
    .activities-page .quest-card__header > div > span { font-size: 14px; }
    .activities-page .quest-card__header .quest-status { margin-left: 0; font-size: 12px; white-space: normal; }
    .activities-page .quest-card__body { padding: 14px; }
    .activities-page .quest-goal__label { flex-wrap: wrap; font-size: 14px; }
    .activities-page .quest-goal__label strong { white-space: normal; }
    .activities-page .quest-benefit strong { font-size: 16px; }
    .activities-page :is(.quest-server, .quest-previous, .quest-replacement-used, .quest-time,
        .quest-time-ready, .quest-card__actions form > small) { font-size: 12px; line-height: 1.6; }
    .activities-page .activity-rules { flex-wrap: wrap; align-items: flex-start; padding: 16px; gap: 12px; }
    .activities-page .activity-rules > strong { white-space: normal; }
    .activities-page .activity-rules ul { width: 100%; margin-left: 0; }
    .dr-page .dr-claim-area { grid-column: auto; padding: 16px 4px 4px; }
    .dr-page .dr-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dr-page .dr-day { padding: 12px 10px; min-height: 140px; }
    .dr-page :is(.dr-day-heading > strong, .dr-tile-reward > span, .dr-day-state,
        .dr-progress-label, .dr-progress-label strong, .dr-calendar-tools, .dr-calendar-tools > span,
        .dr-server, .dr-countdown, .dr-card-heading > div > span) { font-size: 12px; line-height: 1.5; }
    .dr-page .dr-card-heading h2,
    .dr-page .dr-play-heading strong,
    .dr-page .dr-button { font-size: 14px; line-height: 1.5; }
    .dr-page .dr-tile-reward { flex-wrap: wrap; }
    .dr-page .dr-day-heading { flex-wrap: wrap; }
    .dr-page .dr-calendar-tools a,
    .dr-page .dr-history summary { min-height: 44px; font-size: 14px; }

    .player-profile-hero { padding: 20px 16px; }
    .player-profile-hero__content,
    .player-profile-layout,
    .player-identity-grid { grid-template-columns: minmax(0, 1fr); }
    .player-profile-actions { flex-direction: column; align-items: stretch; max-width: none; }
    .player-profile-actions,
    .player-profile-actions form,
    .player-profile-actions .player-profile-button { width: 100%; }

    .rules-main .rules-hero { min-height: 0; }
    .rules-main .rules-hero__copy { width: 100%; padding: 26px 18px; }
    .rules-main .rules-hero h1 { font-size: clamp(30px, 8vw, 40px); line-height: 1.15; letter-spacing: -.7px; }
    .rules-main .rules-hero__meta { flex-wrap: wrap; }
    .rules-main .rules-menu,
    .rules-main .rule-section,
    .rules-main .rule-item { grid-template-columns: minmax(0, 1fr); }
    .rules-main .rule-section__number { min-height: 32px; padding: 8px 16px; justify-content: flex-start; border-right: 0; }
    .rules-main .rule-section__body { padding: 18px 14px; }
    .rules-main .rule-section__body header { gap: 12px; align-items: flex-start; }
    .rules-main .rule-item__code { justify-self: start; padding: 6px 10px; }
    .public-news-main .public-news-grid { grid-template-columns: minmax(0, 1fr); }
    .public-news-main :is(.public-news-hero, .public-news-article__header, .public-news-article__body),
    .public-page-main :is(.public-page-hero, .public-page-body) { padding: 22px 16px; }
    .public-news-main .public-news-article h1,
    .public-page-main .public-page-hero h1 { font-size: clamp(28px, 8vw, 38px); line-height: 1.2; letter-spacing: -.6px; overflow-wrap: anywhere; }

    .forum-layout .forum-sidebar { grid-template-columns: minmax(0, 1fr); }
    .forum-layout .forum-post { grid-template-columns: minmax(0, 1fr); }
    .forum-layout .forum-post__author { display: flex; flex-wrap: wrap; align-items: center; text-align: left; gap: 10px; }
    .forum-layout .forum-post__author .forum-account-link--post { min-width: 0; max-width: 100%; flex-wrap: wrap; }
    .forum-layout .forum-account-link__name { white-space: normal; overflow-wrap: anywhere; }
    .forum-layout .forum-post__main { padding: 14px; }
    .forum-layout .forum-rich-editor__content { padding: 14px; }

    .shop-page .shop-toolbar,
    .market-page .market-toolbar,
    .community-market .cm-toolbar,
    .community-market .cm-sidebar,
    .community-market .cm-buy-order-form form { grid-template-columns: minmax(0, 1fr); }
    .shop-page .shop-search,
    .market-page .market-search,
    .community-market .cm-search,
    .community-market .cm-buy-order-funds { grid-column: auto; }
    .shop-page .shop-card__bottom { display: grid; gap: 8px; }
    .shop-page .shop-currency-tabs,
    .market-page .market-tabs { flex-wrap: wrap; }
    .shop-page .shop-currency-tabs > a,
    .market-page .market-tabs > a { flex: 1 1 140px; min-width: 0; }
    .shop-page .shop-card__copy,
    .market-page .market-card__body { padding: 12px; }
    .market-page .market-select.is-sort { grid-column: auto; }
    .market-page .market-sell-item { display: block; }
    .market-page :is(.market-sell-layout, .market-form-grid, .market-sale-summary) { grid-template-columns: minmax(0, 1fr); }
    .community-market .cm-market-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; }
    .community-market .cm-market-row__offers,
    .community-market .cm-market-row__prices { grid-column: auto; grid-row: auto; justify-items: start; padding-left: 0; }
    .community-market .cm-market-row__arrow { display: none; }
    .community-market .cm-item-hero { grid-template-columns: minmax(0, 1fr); }
    .community-market .cm-item-hero__market { grid-column: auto; }
    .trade-page :is(.trade-columns, .trade-builder-grid, .trade-detail-exchange,
        .trade-picker-items, .trade-recipient-search, .trade-rules-grid) { grid-template-columns: minmax(0, 1fr); }
    .trade-page :is(.trade-decision, .trade-review__footer) { flex-direction: column; align-items: stretch; }
    .trade-page :is(.trade-decision__actions, .trade-decision__actions form,
        .trade-decision__actions button, .trade-decision__actions a) { width: 100%; }
}

@media (max-width: 420px) {
    .shop-page .shop-grid,
    .market-page .market-grid { grid-template-columns: minmax(0, 1fr); }
    .dr-page .dr-calendar { grid-template-columns: minmax(0, 1fr); }
    .dr-page .dr-day { min-height: 120px; }
    .dr-page .dr-tile-reward { flex-wrap: nowrap; }
}

/* Standalone inventory and case pages share the public site layout. */
@media (max-width: 900px) {
    :is(.inventory-page, .case-page) { min-width: 0; max-width: 100%; font-size: 14px; overflow-wrap: anywhere; }
    :is(.inventory-page, .case-page),
    :is(.inventory-page, .case-page) * { box-sizing: border-box; }
    :is(.inventory-page, .case-page) :is(p, li) { font-size: 14px; line-height: 1.65; }
    :is(.inventory-page, .case-page) small { font-size: 12px; line-height: 1.5; }
    .inventory-page :is(input, select, textarea) { max-width: 100%; font-size: 16px; }
    .inventory-page :is(select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="color"])) { min-width: 0; min-height: 44px; }
    :is(.inventory-page, .case-page) :is(button, summary) { min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
    .inventory-page :is(.inventory-header, .inventory-browser) { grid-template-columns: minmax(0, 1fr); }
    .inventory-page :is(.inventory-header, .inventory-browser, .inventory-equipment-showcase,
        .inventory-equipment__contexts, .inventory-detail, .inventory-toolbar) > * { min-width: 0; }
    .inventory-page .inventory-title { flex-wrap: wrap; gap: 12px; }
    .inventory-page .inventory-view-tabs { min-width: 0; width: 100%; }
    .inventory-page :is(.inventory-view-tabs a, .inventory-categories nav a,
        .inventory-account-settings, .inventory-detail__actions a, .inventory-case-open,
        .inventory-future-actions a, .inventory-mini-loadout nav a) { min-height: 44px; font-size: 14px; white-space: normal; }
    .inventory-page .inventory-categories nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
    .inventory-page .inventory-categories nav a { min-width: 0; }
    .inventory-page .inventory-detail { display: block; position: static; grid-column: auto; }
    .inventory-page .inventory-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inventory-page .inventory-search { grid-column: 1 / -1; }
    .inventory-page :is(.inventory-kicker, .inventory-panel-label, .inventory-title__count,
        .inventory-select > span, .inventory-found, .inventory-category-stats span,
        .inventory-category-stats strong, .inventory-advanced__grid label > span,
        .inventory-mini-loadout__empty, .inventory-equipment__hero > div:first-child > span,
        .inventory-equipment__metrics span, .inventory-profile-preview__identity > span,
        .inventory-profile-preview__footer span, .inventory-profile-slots > header span,
        .inventory-profile-slots__grid > div > span) { font-size: 12px; line-height: 1.5; }
    .inventory-page :is(.inventory-kicker, .inventory-panel-label) { color: #abb6ce; letter-spacing: .8px; }
    .inventory-page .inventory-item__copy strong { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
    .inventory-page .inventory-item__copy span { font-size: 12px; white-space: normal; }
    .inventory-page :is(.inventory-detail__facts dt, .inventory-detail__facts dd,
        .inventory-equipment__item > div:nth-child(2) strong, .inventory-profile-slots__grid > div > strong,
        .inventory-detail__actions button, .inventory-case-open, .inventory-equipment__item button) { font-size: 14px; line-height: 1.5; }
    .inventory-page :is(.inventory-detail__facts > div, .inventory-profile-preview__name,
        .inventory-profile-slots > header, .inventory-equipment__contexts > article > header) { flex-wrap: wrap; gap: 10px; }
    .inventory-page :is(.inventory-equipment-showcase, .inventory-equipment__contexts) { grid-template-columns: minmax(0, 1fr); }
    .inventory-page .inventory-profile-preview__identity { min-width: 0; }
    .inventory-page .inventory-profile-preview__identity h3 { overflow-wrap: anywhere; }
    .inventory-page .inventory-equipment__item > div:nth-child(2) strong { white-space: normal; }
    .inventory-page .inventory-pagination nav :is(a, span[aria-current] > span, span[aria-disabled] > span) { min-width: 44px; min-height: 44px; height: auto; }
    .inventory-page .inventory-pagination nav > div:last-child,
    .inventory-page .inventory-pagination nav > div:last-child > div:last-child,
    .inventory-page .inventory-pagination nav > div:last-child > div:last-child > span { flex-wrap: wrap; }

    .case-page { padding: 12px 0; }
    .case-page .case-hero { grid-template-columns: minmax(0, 1fr); padding: 24px 18px; gap: 20px; }
    .case-page :is(.case-hero__copy, .case-section-heading > div) { min-width: 0; }
    .case-page .case-hero h1 { font-size: clamp(28px, 7vw, 38px); line-height: 1.2; }
    .case-page .case-eyebrow { font-size: 12px; letter-spacing: .8px; }
    .case-page .case-page__back { min-height: 44px; font-size: 14px; }
    .case-page .case-section-heading { flex-wrap: wrap; align-items: flex-start; }
    .case-page .case-content { padding: 20px 14px; }
    .case-page .case-page__privacy { font-size: 12px; }
    .case-page .case-reward-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .case-page .case-reward-grid .case-reward-card { height: auto; min-height: 230px; grid-template-rows: 145px auto; }
    .case-page .case-reward-grid .case-reward-card__copy strong { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
    .case-page .case-reward-grid .case-reward-card__copy span { font-size: 12px; white-space: normal; }
    .case-page .case-open-panel { flex-direction: column; align-items: stretch; padding: 18px 14px; }
    .case-page .case-open-panel button,
    .case-page .case-button { min-height: 48px; font-size: 14px; white-space: normal; }
    .case-page .case-open-panel > div span,
    .case-page .case-open-note { font-size: 12px; line-height: 1.6; }
    .case-page .case-opening-overlay { padding: 8px; }
    .case-page .case-opening-dialog { max-width: 100%; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 22px 12px; }
    .case-page .case-opening-dialog__close { width: 44px; height: 44px; }
    .case-page .case-opening-dialog__header { padding: 38px 0 0; }
    .case-page .case-opening-dialog__header h2 { overflow-wrap: anywhere; }
    .case-page .case-opening-result__card { max-width: 100%; }
    .case-page .case-opening-result h3 { font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
    .case-page .case-opening-result__actions { flex-wrap: wrap; }
}

@media (max-width: 680px) {
    .inventory-page .inventory-toolbar,
    .inventory-page .inventory-advanced__grid { grid-template-columns: minmax(0, 1fr); }
    .inventory-page .inventory-toolbar > *,
    .inventory-page .inventory-toolbar .inventory-select:nth-of-type(3) { grid-column: auto; }
    .inventory-page .inventory-layout-switch { justify-content: flex-start; }
    .inventory-page .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inventory-page .inventory-catalog[data-layout="list"] .inventory-grid { grid-template-columns: minmax(0, 1fr); }
    .inventory-page .inventory-profile-preview__content,
    .inventory-page .inventory-profile-preview__footer { flex-direction: column; align-items: flex-start; gap: 12px; }
    .inventory-page .inventory-equipment__item { grid-template-columns: 46px minmax(0, 1fr); }
    .inventory-page .inventory-equipment__item form { grid-column: 1 / -1; }
    .inventory-page .inventory-equipment__item button { width: 100%; }
    .case-page .case-opening-result__actions { flex-direction: column; width: 100%; }
}

@media (max-width: 420px) {
    .inventory-page .inventory-grid,
    .inventory-page .inventory-profile-slots__grid,
    .case-page .case-reward-grid { grid-template-columns: minmax(0, 1fr); }
    .inventory-page .inventory-categories nav { grid-template-columns: minmax(0, 1fr); }
}

/* Small labels discovered in the rendered mobile page audit. */
@media (max-width: 900px) {
    .activities-page :is(.activity-tab__soon, .activity-kicker),
    .forum-page-head .forum-page-head__eyebrow,
    .forum-layout :is(.forum-section-row__numbers span, .forum-topic-row__numbers span,
        .forum-section-row__empty, .forum-unread-link span),
    .market-page :is(.market-hero__copy > span, .market-subpage-head > div:first-child > span,
        .market-history-section > header span, .market-sell-form > header span),
    .trade-page :is(.trade-hero__copy > span, .trade-subpage-head > div > span,
        .trade-detail-head > div > span, .trade-section__head > div > span,
        .trade-picker > header span, .trade-review__copy > span),
    .public-page-main .public-page-meta,
    .public-page-main .public-page-meta span { font-size: 12px; line-height: 1.5; }
    .public-page-main .public-page-meta { flex-wrap: wrap; }
    .forum-layout :is(.forum-search button, .forum-unread-link) {
        min-height: 44px;
        font-size: 14px;
        line-height: 1.5;
    }
    .forum-layout .forum-subsections { gap: 6px 14px; }
    .forum-layout .forum-subsections a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        max-width: 100%;
        font-size: 14px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }
    .forum-page-head .forum-search input {
        min-width: 0;
        min-height: 48px;
        font-size: 16px;
    }
    .forum-page-head :is(.forum-search button, .forum-unread-link) {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        font-size: 14px;
        line-height: 1.5;
    }
}
