.mobile-menu-toggle {
    display: none;
}
@media (max-width: 1020px), (hover: none) and (pointer: coarse) {
    .right-rail {
        display: block;
        min-width: 0;
    }
}
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
    .app-shell .content-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .topbar .breadcrumb {
        display: none;
    }
    .mobile-navigation-ready .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-height: 44px;
        margin: 0;
        padding: 6px;
        flex-shrink: 0;
        border: 2px solid var(--text);
        border-radius: 12px;
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
    }
    .mobile-menu-toggle:focus-visible {
        outline: 3px solid var(--text);
        outline-offset: 3px;
    }
    .mobile-menu-icon {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
        pointer-events: none;
    }
    .mobile-menu-toggle .mobile-menu-close,
    .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-bars {
        display: none;
    }
    .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-close {
        display: block;
    }
    body .sidebar {
        position: static;
        width: 100%;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .mobile-navigation-ready .sidebar:not(.mobile-menu-open) {
        display: none;
    }
    body .app-shell {
        margin-left: 0;
    }
    body .sidebar .brand {
        display: none;
    }
    body .sidebar :is(.nav-caption, .nav-link > span, .account > span:not(.avatar)) {
        display: block;
    }
    body .sidebar .nav-link {
        justify-content: flex-start;
        gap: 12px;
        font-size: 20px;
        min-height: 48px;
    }
    body .sidebar :is(.nav-caption, .account strong, .account small) {
        font-size: 20px;
    }
    body .sidebar .account {
        justify-content: flex-start;
    }
    body .sidebar .account strong {
        max-width: none;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    body .sidebar .nav-link .nav-badge {
        position: static;
        margin-left: auto;
        font-size: 20px;
        min-width: 28px;
    }
    body .toast {
        left: 12px;
        right: 12px;
    }
    body .skip-link {
        left: 12px;
    }
    body :is(.app-shell, dialog, .toast) {
        font-size: max(20px, var(--appearance-size, 14px));
        line-height: 1.6;
    }
    body :is(.app-shell, dialog) :is(p, small, label, legend, input, textarea, select, summary, li, th, td, pre, code, a:not(.brand),
        .button, .quiet-button, .text-button, .danger-button, .icon-button, .checkbox,
        .eyebrow, .section-kicker, .record-meta, .detail-meta, .record-detail, .comment,
        .notice, .empty, .block-header, .setting-widget, .widget-option, .pill, .mini-tag,
        .rail-footer, .footer, .post-character-count, .post-image-status, .post-media-menu,
        .stat > span:not(.stat-dot), strong:not(.stat strong), .audit-entry, .result-count,
        .pagination, .review-stars, .appearance-preview-soft, .contribution-optional > summary span, .check-step > span:last-child) {
        /* font-size: max(20px, 1em); */
    }
    body :is(.app-shell, dialog) h1 {
        font-size: max(34px, calc(var(--appearance-size, 14px) * 29 / 14));
    }
    body :is(.app-shell, dialog) h2 {
        font-size: max(28px, calc(var(--appearance-size, 14px) * 20 / 14));
    }
    body :is(.app-shell, dialog) h3 {
        font-size: max(24px, var(--appearance-size, 14px));
    }
    body .app-shell :is(.hero, .possibility-card) h2 {
        font-size: max(34px, calc(var(--appearance-size, 14px) * 20 / 14));
    }
    body dialog h2 {
        font-size: max(30px, calc(var(--appearance-size, 14px) * 20 / 14));
    }
    .app-shell main {
        padding: 24px 12px 0;
    }
    .app-shell :is(.card:not(.profile-banner), .possibility-card) {
        padding: 20px 16px;
    }
    .app-shell :is(.page-heading, .section-heading, .form-actions, .block-header, .filter-form, .rail-footer) {
        flex-wrap: wrap;
    }
    .app-shell .tabs {
        flex-wrap: wrap;
        gap: 8px 16px;
        overflow: visible;
        min-width: 0;
    }
    .app-shell :is(.tabs a, .mini-tag) {
        white-space: normal;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
    .app-shell .member-row > span:not(.avatar) {
        min-width: 0;
        flex: 1;
    }
    .app-shell :is(h1, h2, h3, p, a, label, legend, .notice, .empty, .footer) {
        overflow-wrap: anywhere;
    }
    .app-shell .eyebrow {
        letter-spacing: .5px;
        flex-wrap: wrap;
    }
    .app-shell :is(.button, .danger-button, .section-heading > a) {
        white-space: normal;
    }
    body :is(.app-shell, dialog) :is(button, .button, input:not([type="checkbox"]):not([type="radio"]), select, summary) {
        min-height: 44px;
    }
    body :is(.app-shell, dialog) .icon-button {
        min-width: 44px;
    }
    .topbar {
        height: auto;
        min-height: 65px;
        padding: 10px 12px;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }
    .topbar .header-brand {
        flex: 1;
    }
    .header-brand > .brand {
        display: none;
    }
    .topbar .mobile-brand-row {
        display: block;
        padding: 0;
        border: 0;
    }
    .topbar .header-brand .brand {
        font-size: 20px;
    }
    .topbar :is(button, .button, input) {
        min-height: 44px;
        font-size: 16px;
    }
    .topbar > a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }
    .topbar .search {
        order: 1;
        flex-basis: 100%;
        margin: 0;
    }
    .topbar .search input {
        width: 100%;
    }
    .app-shell .getting-started h2,
    .app-shell .possibility-card p {
        max-width: none;
    }
    .app-shell .check-step > span:nth-child(2) {
        flex: 1;
        min-width: 0;
    }
    .app-shell .step-number {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    .app-shell .widget-library #widget-library {
        grid-template-columns: minmax(0, 1fr);
    }
    .app-shell .empty {
        padding: 24px 12px;
    }
    .app-shell .comment.reply {
        margin-left: 12px;
        padding-left: 10px;
    }
    dialog {
        padding: 24px 16px;
    }
}
@media (min-width: 701px) and (hover: none) and (pointer: coarse) {
    .topbar .header-brand .brand img {
        max-height: 64px;
    }
    body :is(.app-shell, dialog, .toast) {
        font-size: clamp(24px, 2.8vw, 36px);
    }
    body .sidebar :is(.nav-link, .nav-caption, .account strong, .account small),
    body .sidebar .nav-link .nav-badge {
        font-size: clamp(26px, 3vw, 40px);
    }
    body .sidebar .nav-link {
        min-height: 64px;
        gap: 16px;
        overflow-wrap: anywhere;
    }
    body .sidebar .nav-link .icon {
        width: 28px;
        height: 28px;
    }
    body .sidebar .nav-link .nav-badge {
        min-width: 36px;
    }
    body :is(.app-shell, dialog) h1 {
        font-size: clamp(34px, 4vw, 52px);
    }
    body :is(.app-shell, dialog) h2 {
        font-size: clamp(28px, 3.5vw, 44px);
    }
    body :is(.app-shell, dialog) h3 {
        font-size: clamp(26px, 3vw, 40px);
    }
    body .app-shell :is(.hero, .possibility-card) h2 {
        font-size: clamp(34px, 4vw, 52px);
    }
    body dialog h2 {
        font-size: clamp(30px, 3.5vw, 44px);
    }
    .app-shell .stat strong {
        font-size: clamp(32px, 3.5vw, 44px);
    }
    .app-shell .step-number {
        width: 44px;
        height: 44px;
        font-size: clamp(24px, 2.8vw, 36px);
    }
    body :is(.app-shell, dialog) :is(button, .button, input:not([type="checkbox"]):not([type="radio"]), select, summary) {
        min-height: 56px;
    }
    body :is(.app-shell, dialog) .icon-button {
        min-width: 56px;
    }
}
