/* Global mobile optimization layer. Loaded after page styles. */

html {
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
}

body,
.main-content {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

input,
select,
textarea,
button {
    font: inherit;
}

@media (max-width: 1024px) {
    body.site-refresh-light {
        --ticker-height: 28px;
        --header-height: 66px;
        padding-top: calc(var(--ticker-height) + var(--header-height)) !important;
    }

    body.mobile-open {
        overflow: hidden !important;
        touch-action: none;
    }

    body.site-refresh-light .news-ticker {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: var(--ticker-height) !important;
        z-index: 3000 !important;
    }

    body.site-refresh-light .ticker-inner {
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        height: 100% !important;
        padding: 0 12px !important;
        gap: 8px !important;
    }

    body.site-refresh-light .ticker-badge {
        min-height: 20px !important;
        padding: 0 8px !important;
        border-radius: 999px !important;
        font-size: 0.68rem !important;
    }

    body.site-refresh-light .ticker-item {
        font-size: 0.74rem !important;
    }

    body.site-refresh-light .ticker-thumb {
        display: none !important;
    }

    body.site-refresh-light .header-ultra {
        position: fixed !important;
        top: calc(var(--ticker-height) - 1px) !important;
        left: 0 !important;
        right: 0 !important;
        height: var(--header-height) !important;
        z-index: 3001 !important;
        border-radius: 0 !important;
    }

    body.site-refresh-light .header-inner {
        width: 100% !important;
        max-width: none !important;
        padding: 0 12px !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 10px !important;
    }

    body.site-refresh-light .logo-ultra {
        min-width: 0 !important;
    }

    body.site-refresh-light .logo-ultra a {
        min-width: 0 !important;
        max-width: 100% !important;
        gap: 8px !important;
    }

    body.site-refresh-light .logo-symbol {
        width: 36px !important;
        height: 36px !important;
        border-radius: 8px !important;
        font-size: 0.88rem !important;
        flex: 0 0 auto !important;
    }

    body.site-refresh-light .site-logo-img {
        max-width: min(48vw, 176px) !important;
        max-height: 38px !important;
        object-fit: contain !important;
    }

    body.site-refresh-light .logo-brand {
        min-width: 0 !important;
    }

    body.site-refresh-light .logo-brand-name {
        max-width: 52vw !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 0.94rem !important;
        letter-spacing: 0 !important;
    }

    body.site-refresh-light .logo-brand-tag {
        display: none !important;
    }

    body.site-refresh-light .mobile-header-actions {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        margin-left: 0 !important;
    }

    body.site-refresh-light .mobile-toggle {
        width: 44px !important;
        height: 44px !important;
        display: inline-flex !important;
        border-radius: 8px !important;
        flex: 0 0 auto !important;
    }

    body.site-refresh-light .nav-ultra {
        position: fixed !important;
        top: calc(var(--ticker-height) + var(--header-height) - 1px) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: auto !important;
        max-height: calc(100dvh - var(--ticker-height) - var(--header-height) + 1px) !important;
        display: grid !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        gap: 10px !important;
        padding: 12px !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        border: 0 !important;
        border-top: 1px solid rgba(16, 24, 23, 0.1) !important;
        border-radius: 0 0 8px 8px !important;
        background: rgba(255, 253, 247, 0.99) !important;
        box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18) !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translate3d(0, -12px, 0);
        z-index: 3002 !important;
    }

    body.mobile-open .nav-ultra,
    body.site-refresh-light .nav-ultra.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translate3d(0, 0, 0) !important;
    }

    body.site-refresh-light .mobile-menu-backdrop {
        position: fixed !important;
        top: calc(var(--ticker-height) + var(--header-height) - 1px) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(15, 23, 42, 0.48) !important;
        backdrop-filter: blur(3px) !important;
        z-index: 2999 !important;
    }

    body.site-refresh-light .nav-menu {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    body.site-refresh-light .nav-item,
    body.site-refresh-light .nav-actions,
    body.site-refresh-light .user-actions,
    body.site-refresh-light .user-dropdown-wrapper {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.site-refresh-light .nav-btn {
        width: 100% !important;
        min-height: 48px !important;
        justify-content: flex-start !important;
        gap: 9px !important;
        padding: 0 12px !important;
        border: 1px solid rgba(16, 24, 23, 0.1) !important;
        border-radius: 8px !important;
        background: #ffffff !important;
        color: #16231f !important;
        font-size: 0.94rem !important;
        letter-spacing: 0 !important;
        white-space: normal !important;
        text-align: left !important;
        box-shadow: 0 10px 22px rgba(16, 24, 23, 0.06) !important;
    }

    body.site-refresh-light .nav-btn .nav-chevron {
        margin-left: auto !important;
    }

    body.site-refresh-light .nav-dropdown,
    body.site-refresh-light .nav-dropdown-wide,
    body.site-refresh-light .nav-dropdown-compact,
    body.site-refresh-light .nav-dropdown-freetools,
    body.site-refresh-light .nav-dropdown-premium,
    body.site-refresh-light .nav-dropdown.free-tools-dropdown,
    body.site-refresh-light .nav-dropdown.one-column-dropdown {
        position: static !important;
        inset: auto !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 8px 0 0 !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        display: none !important;
    }

    body.site-refresh-light .nav-item.active > .nav-dropdown,
    body.site-refresh-light .nav-item.active > .nav-dropdown-wide,
    body.site-refresh-light .nav-item.active > .nav-dropdown-compact,
    body.site-refresh-light .nav-item.active > .nav-dropdown-freetools,
    body.site-refresh-light .nav-item.active > .nav-dropdown-premium {
        display: block !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        translate: none !important;
    }

    body.site-refresh-light .nav-dropdown-inner {
        width: 100% !important;
        max-height: none !important;
        padding: 8px !important;
        overflow: visible !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        background: #f6faf7 !important;
    }

    body.site-refresh-light .owl-menu-grid,
    body.site-refresh-light .owl-menu-grid.compact,
    body.site-refresh-light .owl-menu-grid.free-tools-grid,
    body.site-refresh-light .owl-menu-grid.one-column,
    body.site-refresh-light .freetools-mega {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        min-width: 0 !important;
        gap: 8px !important;
    }

    body.site-refresh-light .owl-menu-grid.single-row {
        display: grid !important;
        width: 100% !important;
    }

    body.site-refresh-light .owl-menu-link,
    body.site-refresh-light .dropdown-link,
    body.site-refresh-light .dropdown-link-compact,
    body.site-refresh-light .premium-tool-item,
    body.site-refresh-light .premium-bottom-link,
    body.site-refresh-light .freetools-link {
        min-width: 0 !important;
        min-height: 44px !important;
        border-radius: 8px !important;
        white-space: normal !important;
    }

    body.site-refresh-light .owl-menu-copy,
    body.site-refresh-light .owl-menu-copy strong,
    body.site-refresh-light .owl-menu-copy small,
    body.site-refresh-light .freetools-title {
        min-width: 0 !important;
        overflow-wrap: anywhere !important;
        white-space: normal !important;
        text-overflow: clip !important;
    }

    body.site-refresh-light .freetools-menu-head {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        border-radius: 8px !important;
    }

    body.site-refresh-light .freetools-menu-actions,
    body.site-refresh-light .nav-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    body.site-refresh-light .freetools-menu-actions a,
    body.site-refresh-light .action-btn,
    body.site-refresh-light .user-avatar-btn,
    body.site-refresh-light .notification-btn {
        width: 100% !important;
        min-height: 44px !important;
        border-radius: 8px !important;
    }

    body.site-refresh-light .lang-switch-flags {
        width: 100% !important;
        justify-content: center !important;
        grid-column: 1 / -1 !important;
    }

    body.site-refresh-light .user-dropdown,
    body.site-refresh-light .notification-dropdown {
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-top: 8px !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

@media (max-width: 767px) {
    body {
        letter-spacing: 0 !important;
    }

    .main-content {
        min-width: 0 !important;
    }

    .container,
    .home-shell,
    .free-tools-shell,
    .owl-news-shell,
    .ym-container,
    .n8n-container,
    .collections-page > .container,
    .compare-page > .container,
    .search-page .container,
    .owl-search-page .container,
    .fg-shell,
    .saas-container,
    .saas-shell {
        width: calc(100% - 28px) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .hero-title,
    .home-section-title,
    .section-title {
        letter-spacing: 0 !important;
        overflow-wrap: anywhere;
    }

    input,
    select,
    textarea {
        width: 100%;
        min-height: 46px;
        font-size: 16px !important;
    }

    textarea {
        min-height: 120px;
    }

    .btn,
    .action-btn,
    .search-button,
    .submit-btn,
    .btn-primary,
    .btn-outline,
    .btn-submit,
    .btn-create,
    .btn-create-large,
    .btn-compare,
    .btn-reset,
    .btn-add-tool,
    .btn-share,
    .btn-load-more,
    .website-link,
    .view-link,
    .home-section-link,
    .home-filter-button,
    .home-clear-link {
        min-height: 44px;
        border-radius: 8px !important;
        white-space: normal !important;
    }

    table {
        width: 100%;
        max-width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .page-header,
    .hero-section,
    .guides-hero,
    .free-tools-hero,
    .owl-news-hero,
    .compare-header,
    .collection-hero,
    .tool-detail-header,
    .about-section,
    .contact-form-card,
    .contact-info-card,
    .login-container,
    .auth-container,
    .free-tools-panel,
    .search-form-large,
    .sidebar,
    .tool-card,
    .home-card,
    .home-category-card,
    .home-tool-card,
    .ym-card,
    .fg-game-card,
    .footer-newsletter-section {
        border-radius: 8px !important;
    }

    .decor-grid,
    .grid-pattern,
    .hero-gradient,
    .hero-pattern,
    .card-glow,
    .footer-bg-decoration,
    .footer-gradient-orb,
    .footer-grid-pattern {
        display: none !important;
    }

    .home-page {
        background: #f6f7ef !important;
    }

    .home-hero {
        min-height: auto !important;
        padding: 30px 0 34px !important;
        background-position: 0 0, 0 0, 0 0, right -42vw top 18px !important;
        background-size: auto, 78px 78px, 78px 78px, 106vw auto !important;
        animation: none !important;
    }

    .home-hero::after {
        display: none !important;
    }

    .home-hero__grid,
    .home-spotlight-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }

    .home-hero__content {
        max-width: 100% !important;
    }

    .home-eyebrow,
    .home-section-kicker,
    .owl-search-kicker {
        max-width: 100%;
        min-height: 30px !important;
        padding: 0 10px !important;
        font-size: 0.72rem !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }

    .home-hero h1 {
        margin: 16px 0 12px !important;
        font-size: 3rem !important;
        line-height: 0.92 !important;
        text-wrap: balance;
    }

    .home-hero__lead {
        max-width: 100% !important;
        font-size: 1rem !important;
        line-height: 1.65 !important;
    }

    .home-search,
    .owl-search-form {
        width: 100% !important;
        margin-top: 20px !important;
        padding: 7px !important;
        display: grid !important;
        grid-template-columns: 44px minmax(0, 1fr) !important;
        gap: 7px !important;
        border-radius: 8px !important;
        animation: none !important;
    }

    .home-search::before,
    .home-search::after {
        display: none !important;
    }

    .home-search__icon,
    .owl-search-form__icon {
        width: 44px !important;
        height: 44px !important;
        border-radius: 8px !important;
    }

    .home-search input,
    .owl-search-form input[type="search"] {
        min-height: 44px !important;
        padding: 0 8px !important;
        font-size: 16px !important;
    }

    .home-search button,
    .owl-search-form button {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-height: 48px !important;
        border-radius: 8px !important;
    }

    .home-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin-top: 18px !important;
    }

    .home-stat {
        min-height: auto !important;
        padding: 12px 10px !important;
        border-radius: 8px !important;
    }

    .home-stat strong {
        font-size: 1.12rem !important;
    }

    .home-hero__visual {
        min-height: 250px !important;
        margin-top: 4px !important;
    }

    .home-universe-dial {
        width: min(280px, 76vw) !important;
        min-height: 250px !important;
    }

    .home-mascot-wrap {
        width: min(210px, 62vw) !important;
        border-radius: 8px !important;
    }

    .home-signal {
        display: none !important;
    }

    .home-logo-cloud {
        position: static !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin-top: 12px !important;
        transform: none !important;
    }

    .home-logo-cloud span {
        min-width: 0 !important;
        border-radius: 8px !important;
        font-size: 0.75rem !important;
    }

    .home-section {
        padding: 34px 0 !important;
    }

    .home-section-head,
    .owl-news-section-head,
    .section-header,
    .tabs-and-actions,
    .premium-banner-content,
    .owl-results-toolbar,
    .tools-header,
    .tool-header-content {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        align-items: start !important;
    }

    .home-section-title,
    .owl-search-hero h1,
    .page-header h1,
    .collection-title-premium,
    .compare-header h1,
    .guides-hero h1,
    .free-tools-hero h1,
    .owl-news-hero h1,
    .hero-section h1,
    .hero-title {
        font-size: 2.1rem !important;
        line-height: 1.08 !important;
        letter-spacing: 0 !important;
    }

    .home-section-copy,
    .owl-search-hero p,
    .page-header p,
    .collection-description-premium,
    .compare-header p,
    .guides-hero p,
    .free-tools-hero p,
    .owl-news-hero p,
    .hero-subtitle {
        max-width: 100% !important;
        font-size: 0.96rem !important;
        line-height: 1.62 !important;
    }

    .home-cards,
    .home-category-grid,
    .home-tools-grid,
    .home-mini-grid,
    .tools-grid,
    .steps-grid,
    .features-grid,
    .stats-grid,
    .free-tools-grid,
    .ym-grid,
    .owl-news-grid,
    .owl-news-brief-grid,
    .owl-news-more-grid,
    .fg-games-grid,
    .saas-grid,
    .products-grid,
    .about-grid,
    .contact-layout,
    .hero-stats,
    .owl-search-summary,
    .owl-search-layout,
    .compare-selector,
    .compare-results-grid,
    .collections-grid,
    .collection-tools-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .home-card,
    .home-category-card,
    .home-tool-card {
        min-height: auto !important;
        padding: 14px !important;
    }

    .home-filter-panel {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 8px !important;
        border-radius: 8px !important;
    }

    .home-filter-panel input,
    .home-filter-panel select {
        min-height: 46px !important;
    }

    .home-result-bar,
    .home-pagination,
    .pagination,
    .pagination-container {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .home-page-link,
    .pagination-link,
    .ym-page-btn {
        min-width: 42px !important;
        min-height: 42px !important;
        border-radius: 8px !important;
    }

    .owl-search-page,
    .collections-page,
    .compare-page,
    .free-tools-page,
    .fg-page,
    .ym-page-shell,
    .guides-page,
    .about-page,
    .contact-page,
    .tool-detail-page,
    .search-page {
        padding-top: 22px !important;
        padding-bottom: 36px !important;
    }

    .owl-search-hero,
    .page-header,
    .collection-hero,
    .compare-header,
    .guides-hero,
    .free-tools-hero,
    .owl-news-hero,
    .hero-section {
        min-height: auto !important;
        padding: 22px 16px !important;
        margin-bottom: 14px !important;
    }

    .owl-search-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .owl-search-summary > div {
        padding: 12px !important;
        border-radius: 8px !important;
    }

    .owl-search-form + .owl-search-examples,
    .owl-search-examples,
    .tabs,
    .filters,
    .filter-tabs,
    .category-tabs,
    .tools-controls {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 8px !important;
        padding-bottom: 4px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .owl-search-examples::-webkit-scrollbar,
    .tabs::-webkit-scrollbar,
    .filters::-webkit-scrollbar,
    .filter-tabs::-webkit-scrollbar,
    .category-tabs::-webkit-scrollbar,
    .tools-controls::-webkit-scrollbar {
        display: none;
    }

    .tab,
    .filter-tab,
    .category-tab,
    .sort-select {
        flex: 0 0 auto !important;
        min-height: 40px !important;
        border-radius: 8px !important;
    }

    .sidebar,
    .owl-search-sidebar,
    .tool-sidebar {
        order: 2 !important;
        width: 100% !important;
    }

    .tools-main,
    .owl-results-panel,
    .tool-main-content {
        order: 1 !important;
        width: 100% !important;
    }

    .tool-detail-page {
        padding: 22px 0 36px !important;
    }

    .tool-detail-header,
    .tool-main-content,
    .tool-info-card,
    .related-tools-card,
    .review-form-section,
    .review-card,
    .review-item {
        padding: 16px !important;
    }

    .tool-detail-logo {
        width: 84px !important;
        height: 84px !important;
        border-radius: 8px !important;
    }

    .tool-header-info h1 {
        font-size: 1.8rem !important;
        line-height: 1.12 !important;
    }

    .tool-header-actions,
    .tool-card-footer,
    .form-row,
    .contact-form .form-row,
    .auth-form .form-row,
    .login-form .form-options {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .tool-header-actions .btn,
    .tool-card-footer .btn,
    .btn-try {
        width: 100% !important;
        justify-content: center !important;
    }

    .tool-card {
        padding: 16px !important;
    }

    .tool-card-header {
        gap: 10px !important;
    }

    .tool-logo {
        width: 52px !important;
        height: 52px !important;
        border-radius: 8px !important;
    }

    .tool-name {
        font-size: 1rem !important;
        line-height: 1.32 !important;
    }

    .login-page,
    .auth-page {
        min-height: auto !important;
        padding: 24px 0 40px !important;
    }

    .login-container,
    .auth-container,
    .register-container,
    .form-wrapper {
        width: calc(100% - 28px) !important;
        max-width: 520px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 18px !important;
    }

    .login-form-section,
    .auth-form,
    .contact-form-card {
        width: 100% !important;
    }

    .contact-layout {
        gap: 16px !important;
    }

    .contact-info-card {
        min-height: auto !important;
        padding: 16px !important;
    }

    .floating-label,
    .form-group label {
        overflow-wrap: anywhere;
    }

    .modal,
    .auth-modal,
    .submit-modal,
    .modal-content,
    .auth-modal-content {
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px) !important;
        max-height: calc(100dvh - 28px) !important;
        overflow-y: auto !important;
        border-radius: 8px !important;
    }

    .owl-widget-container {
        right: 12px !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        z-index: 1200 !important;
    }

    .owl-character-wrapper {
        width: 58px !important;
        height: 58px !important;
        animation: none !important;
    }

    .owl-dialog-box {
        display: none !important;
    }

    .chatbot-widget {
        right: 0 !important;
        bottom: 0 !important;
        z-index: 3200 !important;
    }

    .chatbot-widget:not(.open) {
        width: 0 !important;
        height: 0 !important;
        pointer-events: none !important;
    }

    .chatbot-widget.open {
        width: 100vw !important;
        height: calc(100dvh - var(--ticker-height, 28px) - var(--header-height, 66px)) !important;
        pointer-events: auto !important;
    }

    .chatbot-window {
        width: 100vw !important;
        height: calc(100dvh - var(--ticker-height, 28px) - var(--header-height, 66px)) !important;
        min-height: 0 !important;
        max-height: none !important;
        border-radius: 8px 8px 0 0 !important;
    }

    .live-notification {
        left: 12px !important;
        right: 12px !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        width: auto !important;
        max-width: none !important;
    }

    .footer-premium {
        padding-top: 28px !important;
        margin-top: 0 !important;
    }

    .footer-premium .container {
        width: calc(100% - 28px) !important;
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .footer-newsletter-section {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 16px !important;
        margin: 0 0 24px !important;
        text-align: left !important;
    }

    .newsletter-content {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) !important;
        gap: 12px !important;
        align-items: center !important;
        text-align: left !important;
    }

    .newsletter-icon-wrap,
    .newsletter-icon {
        margin: 0 !important;
    }

    .newsletter-text h3 {
        font-size: 1.08rem !important;
        line-height: 1.3 !important;
    }

    .newsletter-text p,
    .newsletter-note {
        font-size: 0.82rem !important;
        line-height: 1.5 !important;
    }

    .newsletter-form-premium,
    .newsletter-input-wrapper {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .newsletter-input-wrapper {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 8px !important;
        border-radius: 8px !important;
    }

    .newsletter-input-premium,
    .newsletter-submit-btn {
        width: 100% !important;
        min-height: 46px !important;
        border-radius: 8px !important;
        text-align: left !important;
    }

    .newsletter-submit-btn {
        justify-content: center !important;
    }

    .footer-main,
    .footer-bottom-premium,
    .footer-business-list {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
        text-align: left !important;
    }

    .footer-brand {
        align-items: flex-start !important;
        text-align: left !important;
    }

    .footer-social,
    .footer-badges {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    .footer-links-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
        text-align: left !important;
    }

    .footer-link-group h4::after {
        left: 0 !important;
        transform: none !important;
    }

    .footer-link-group a {
        justify-content: flex-start !important;
        min-height: 34px !important;
        overflow-wrap: anywhere !important;
    }

    .footer-business-info {
        padding: 14px !important;
        border-radius: 8px !important;
    }

    .footer-business-list div {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 4px !important;
    }
}

@media (max-width: 420px) {
    body.site-refresh-light {
        --header-height: 62px;
    }

    body.site-refresh-light .header-inner {
        padding: 0 10px !important;
    }

    body.site-refresh-light .site-logo-img {
        max-width: 44vw !important;
        max-height: 34px !important;
    }

    body.site-refresh-light .logo-brand-name {
        max-width: 44vw !important;
        font-size: 0.88rem !important;
    }

    .container,
    .home-shell,
    .free-tools-shell,
    .owl-news-shell,
    .ym-container,
    .collections-page > .container,
    .compare-page > .container,
    .search-page .container,
    .owl-search-page .container,
    .fg-shell,
    .saas-container,
    .saas-shell {
        width: calc(100% - 22px) !important;
    }

    .home-hero h1 {
        font-size: 2.42rem !important;
    }

    .home-section-title,
    .owl-search-hero h1,
    .page-header h1,
    .collection-title-premium,
    .compare-header h1,
    .guides-hero h1,
    .free-tools-hero h1,
    .owl-news-hero h1,
    .hero-section h1,
    .hero-title {
        font-size: 1.78rem !important;
    }

    .home-stats,
    .owl-search-summary,
    .footer-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .home-logo-cloud {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .newsletter-content {
        grid-template-columns: 1fr !important;
    }

    .login-container,
    .auth-container,
    .register-container,
    .form-wrapper,
    .modal,
    .auth-modal,
    .submit-modal,
    .modal-content,
    .auth-modal-content {
        width: calc(100vw - 22px) !important;
        max-width: calc(100vw - 22px) !important;
    }
}

/* Dense mobile grids: use 2/3 columns only where cards stay scannable. */
@media (min-width: 360px) and (max-width: 767px) {
    .home-stats,
    .owl-search-summary,
    .free-tools-summary,
    .hero-stats,
    .stats-grid,
    .sm-proof-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .home-category-grid,
    .home-mini-grid,
    .free-tools-grid,
    .fg-featured-grid,
    .fg-games-grid,
    .sm-category-grid,
    .sm-products-grid,
    .sm-products-grid-featured,
    .collections-grid,
    .collection-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .home-logo-cloud {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .home-category-card,
    .home-tool-card,
    .home-mini-grid .home-tool-card,
    .free-tool-card,
    .fg-game-card,
    .sm-category-card,
    .sm-product-card {
        min-height: auto !important;
        padding: 12px !important;
    }

    .home-category-card strong,
    .home-tool-name,
    .free-tool-card h2,
    .fg-game-card h3,
    .sm-product-card h3,
    .sm-category-card strong {
        font-size: 0.92rem !important;
        line-height: 1.25 !important;
    }

    .home-category-card span,
    .home-tool-desc,
    .free-tool-card p,
    .fg-game-card p,
    .sm-product-card p,
    .sm-category-card span:last-child {
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
        overflow: hidden !important;
        font-size: 0.76rem !important;
        line-height: 1.38 !important;
    }

    .home-tool-card__top,
    .free-tool-card__meta,
    .free-tool-card__footer,
    .sm-card-meta {
        gap: 6px !important;
    }

    .free-tool-card__media,
    .fg-game-media,
    .sm-product-media {
        aspect-ratio: 1.25 / 1 !important;
        min-height: 0 !important;
    }

    .home-tool-logo,
    .free-tool-card__initial,
    .sm-product-fallback,
    .sm-category-code {
        width: 38px !important;
        height: 38px !important;
        border-radius: 8px !important;
    }

    .free-tools-summary a,
    .sm-proof-grid a,
    .hero-stats a {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        justify-content: center !important;
    }

    body.site-refresh-light.free-tool-page .main-content .free-tools-grid,
    body.site-refresh-light.free-tool-page .main-content .fg-featured-grid,
    body.site-refresh-light.free-tool-page .main-content .fg-games-grid,
    body.site-refresh-light .free-tools-page .free-tools-grid,
    body.site-refresh-light .fg-page .fg-featured-grid,
    body.site-refresh-light .fg-page .fg-games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 430px) and (max-width: 767px) {
    .home-category-grid,
    .home-logo-cloud,
    .sm-category-grid,
    .fg-featured-grid,
    .fg-games-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 359px) {
    .home-stats,
    .owl-search-summary,
    .footer-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .home-stat,
    .owl-search-summary > div {
        padding: 10px 8px !important;
    }

    .home-stat strong,
    .owl-search-summary strong {
        font-size: 1rem !important;
    }
}

/* Mobile nav dropdown hardening: keep nested menus inside the viewport. */
@media (max-width: 1024px) {
    body.site-refresh-light .nav-ultra {
        overflow-x: hidden !important;
    }

    body.site-refresh-light .nav-menu,
    body.site-refresh-light .nav-item {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.site-refresh-light .nav-dropdown,
    body.site-refresh-light .nav-dropdown-wide,
    body.site-refresh-light .nav-dropdown-compact,
    body.site-refresh-light .nav-dropdown-freetools,
    body.site-refresh-light .nav-dropdown-premium,
    body.site-refresh-light .nav-dropdown.free-tools-dropdown,
    body.site-refresh-light .nav-dropdown.one-column-dropdown,
    body.site-refresh-light .tools-dropdown,
    body.site-refresh-light .community-dropdown {
        position: static !important;
        inset: auto !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 8px 0 0 !important;
        padding: 0 !important;
        transform: none !important;
        translate: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body.site-refresh-light .nav-item:not(.active) > .nav-dropdown,
    body.site-refresh-light .nav-item:not(.active) > .nav-dropdown-wide,
    body.site-refresh-light .nav-item:not(.active) > .nav-dropdown-compact,
    body.site-refresh-light .nav-item:not(.active) > .nav-dropdown-freetools,
    body.site-refresh-light .nav-item:not(.active) > .nav-dropdown-premium {
        display: none !important;
    }

    body.site-refresh-light .nav-item.active > .nav-dropdown,
    body.site-refresh-light .nav-item.active > .nav-dropdown-wide,
    body.site-refresh-light .nav-item.active > .nav-dropdown-compact,
    body.site-refresh-light .nav-item.active > .nav-dropdown-freetools,
    body.site-refresh-light .nav-item.active > .nav-dropdown-premium {
        display: block !important;
    }

body.site-refresh-light .nav-dropdown-inner,
body.site-refresh-light .free-tools-dropdown .nav-dropdown-inner {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
}
}

/* Home page final mobile density: categories and main tool results stay 2-up. */
@media (max-width: 767px) {
    body.site-refresh-light .home-page .home-category-grid,
    body.site-refresh-light.home-page-active .home-page .home-category-grid,
    body.site-refresh-light .home-page .home-tools-section .home-tools-grid,
    body.site-refresh-light.home-page-active .home-page .home-tools-section .home-tools-grid,
    body.site-refresh-light .home-page .home-section--signal-picks .home-mini-grid,
    body.site-refresh-light.home-page-active .home-page .home-section--signal-picks .home-mini-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    body.site-refresh-light .home-page .home-category-card,
    body.site-refresh-light .home-page .home-tools-section .home-tool-card,
    body.site-refresh-light .home-page .home-section--signal-picks .home-mini-grid .home-tool-card {
        width: auto !important;
        min-width: 0 !important;
        grid-column: auto !important;
    }

    body.site-refresh-light .home-page .home-category-card {
        min-height: 108px !important;
        padding: 10px !important;
    }

    body.site-refresh-light .home-page .home-tools-section .home-tool-card {
        min-height: 206px !important;
        padding: 10px !important;
    }

    body.site-refresh-light .home-page .home-section--signal-picks .home-mini-grid {
        padding: 8px !important;
        border-radius: 14px !important;
    }

    body.site-refresh-light .home-page .home-section--signal-picks .home-mini-grid .home-tool-card {
        min-height: 188px !important;
        padding: 10px !important;
    }
}

@media (max-width: 359px) {
    body.site-refresh-light .home-page .home-category-grid,
    body.site-refresh-light.home-page-active .home-page .home-category-grid,
    body.site-refresh-light .home-page .home-tools-section .home-tools-grid,
    body.site-refresh-light.home-page-active .home-page .home-tools-section .home-tools-grid,
    body.site-refresh-light .home-page .home-section--signal-picks .home-mini-grid,
    body.site-refresh-light.home-page-active .home-page .home-section--signal-picks .home-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    body.site-refresh-light .home-page .home-category-card,
    body.site-refresh-light .home-page .home-tools-section .home-tool-card,
    body.site-refresh-light .home-page .home-section--signal-picks .home-mini-grid .home-tool-card {
        padding: 8px !important;
    }
}
