@media (max-width: 1024px) {
    .floating-icon {
        width: 62px;
        height: 62px;
        margin-left: -31px;
        margin-top: -31px;
        --active-radius: 40vmin;
    }

    .floating-icon img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 860px) {
    .editor-panes {
        grid-template-columns: 1fr !important;
    }

    .editor-panes .pane-editor {
        border-right: none;
    }

    .editor-panes[data-mode="split"] .pane-preview {
        display: none;
    }
}

.mobile-menu {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .brand {
        display: flex !important;
        height: 24px;
    }

    .brand img {
        height: 100%;
        width: auto;
    }

    .topbar-container {
        top: 16px;
        padding: 0 16px;
    }

    .topbar-pill {
        width: 100%;
        min-width: 0;
        height: 52px;
        padding: 6px 12px 6px 16px;
    }

    .hero-title {
        font-size: 44px;
    }

    .floating-icon {
        display: flex !important;
        width: 52px;
        height: 52px;
        margin-left: -26px;
        margin-top: -26px;
        --active-radius: clamp(140px, 44vw, 210px);
    }

    .floating-icon img {
        width: 34px;
        height: 34px;
    }

    .stats-title {
        font-size: clamp(42px, 6vw, 64px);
    }

    .showcase-tab {
        padding: 6px 14px;
        font-size: 13px;
    }

    .format-bar-floating {
        width: calc(100% - 32px);
        bottom: 50px;
        padding: 4px;
        justify-content: flex-start;
        border-radius: var(--radius-lg);
    }

    .pane-inner {
        padding: 0 10px;
    }

    .doc-page {
        padding: 100px 20px 60px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .site-footer {
        padding: 60px 24px 40px;
        border-radius: 24px 24px 0 0;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .mobile-menu {
        position: fixed;
        inset: 0;
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 16px;
    }

    .mobile-menu.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-inner {
        width: 100%;
        max-width: 380px;
        background: var(--surface);
        backdrop-filter: blur(24px) saturate(5);
        -webkit-backdrop-filter: blur(24px) saturate(5);
        border-radius: 28px;
        padding: 20px 24px 24px;
        transform: translateY(-8px) scale(0.98);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        margin-top: 80px;
    }

    .mobile-menu.is-open .mobile-menu-inner {
        transform: translateY(0) scale(1);
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
    }

    .mobile-menu-links {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
    }

    .mobile-menu-links a,
    .theme-toggle-btn {
        font-size: 17px;
        font-weight: 600;
        color: var(--text-primary);
        text-align: left;
        padding: 4px 0;
    }

    .mobile-join-btn {
        width: 100%;
        height: 48px;
        font-size: 15px;
        border-radius: var(--radius-full);
    }

    .editor-header-wrapper {
        top: 8px;
        padding: 0 8px;
    }

    .editor-topbar {
        height: 48px;
        padding: 4px 6px 4px 10px;
        gap: 6px;
    }

    .doc-title-input {
        font-size: 13px;
        padding: 4px 6px;
    }

    .topbar-actions .btn {
        height: 34px;
        padding: 0 14px;
        font-size: 13px;
    }

    .topbar-actions .segmented {
        padding: 2px;
    }

    .topbar-actions .segmented-option {
        height: 28px;
        padding: 0 10px;
        font-size: 12px;
    }

    .modal-drag-handle {
        display: block;
    }

    .modal {
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        height: 70vh;
        max-height: 70vh;
        border-radius: 28px 28px 0 0;
        padding: 20px 24px 32px;
        transform: translateY(100%);
        border-bottom: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .modal.is-open {
        transform: translateY(0);
    }

    .modal-body {
        flex: 1;
        padding-right: 2px;
    }

    .result-panel {
        flex: 1;
        overflow-y: auto;
        justify-content: center;
    }
}


@media (max-width: 768px) {
    @media (orientation: landscape) {
        .hero-section {
            min-height: 150vh;
        }
    }
}