/* App-style layout is scoped to the mobile header; desktop stays unchanged. */
.trade-mobile-actions { display: none; }
@media screen and (max-width: 999px) {
    body #site-header {
        border-bottom: 1px solid #e5eaf0;
        box-shadow: 0 3px 14px rgba(15, 23, 42, .07);
    }
    body #site-header .header-inner {
        padding: 10px 12px;
        max-width: 100%;
    }
    body #site-header .header-titles-wrapper {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        max-width: 100%;
        gap: 7px;
        min-width: 0;
    }
    body #site-header .header-titles {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        margin: 0;
    }
    body #site-header .header-titles .site-title {
        font-size: clamp(13px, 3.8vw, 18px);
        line-height: 1.2;
        margin: 0;
    }
    body #site-header .header-titles .site-description { display: none; }
    body #site-header .header-titles .custom-logo-link { display: inline-flex; align-items: center; }
    body #site-header .header-titles img.custom-logo {
        width: auto;
        max-width: min(120px, 29vw);
        max-height: 42px;
        object-fit: contain;
    }
    body #site-header .mobile-search-toggle,
    body #site-header .mobile-nav-toggle {
        position: static;
        top: auto;
        bottom: auto;
        left: auto;
        right: auto;
        padding: 0;
        margin: 0;
        width: 34px;
        min-width: 34px;
        height: 36px;
        flex: 0 0 34px;
        border: 1px solid #e5eaf0;
        border-radius: 10px;
        background: #f6f8fb;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    body #site-header .mobile-search-toggle .toggle-inner,
    body #site-header .mobile-nav-toggle .toggle-inner {
        position: static;
        padding: 0;
        width: auto;
        height: auto;
    }
    body #site-header .mobile-search-toggle .toggle-text,
    body #site-header .mobile-nav-toggle .toggle-text { display: none; }
    body #site-header .mobile-search-toggle svg,
    body #site-header .mobile-nav-toggle svg { width: 19px; height: 19px; }
    /* The original theme forces all toggle paths to white; make them visible on pale mobile buttons. */
    body #site-header .header-inner .mobile-search-toggle svg path,
    body #site-header .header-inner .mobile-nav-toggle svg path { fill: #1e293b !important; }

    /* Three native CSS bars: no SVG path colour or external icon dependency. */
    body #site-header .mobile-nav-toggle,
    body #site-header .mobile-nav-toggle .toggle-inner,
    body #site-header .mobile-nav-toggle .toggle-icon {
        visibility: visible !important;
        opacity: 1 !important;
    }
    body #site-header .mobile-nav-toggle .toggle-icon {
        display: flex !important;
        position: relative;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        padding: 0;
        margin: 0;
    }
    body #site-header .mobile-nav-toggle .trade-hamburger-icon {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        align-items: stretch;
        width: 20px;
        height: 16px;
        opacity: 1;
        visibility: visible;
        flex: 0 0 auto;
    }
    body #site-header .mobile-nav-toggle .trade-hamburger-icon > span {
        display: block !important;
        width: 100%;
        height: 2.5px;
        min-height: 2.5px;
        background: #1e293b !important;
        border: 0;
        border-radius: 2px;
        opacity: 1 !important;
        transform: none;
        box-shadow: none;
    }
    body #site-header .trade-mobile-actions {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    body #site-header .trade-mobile-actions a {
        text-decoration: none;
        font-size: 11px;
        font-weight: 650;
        line-height: 1;
        white-space: nowrap;
        min-height: 35px;
        padding: 8px 10px;
        border-radius: 9px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }
    body #site-header .trade-mobile-login {
        color: #1e293b;
        background: #f1f5f9;
        border: 1px solid #dce3eb;
    }
    body #site-header .trade-mobile-register,
    body #site-header .trade-mobile-dashboard {
        color: #fff;
        background: #e67e22;
        border: 1px solid #e67e22;
    }
    body #site-header .trade-mobile-avatar {
        width: 24px;
        height: 24px;
        object-fit: cover;
        border-radius: 50%;
        background: #fff;
    }
    body #site-header .trade-mobile-dashboard { padding: 5px 8px; }
}
@media screen and (max-width: 380px) {
    body #site-header .header-inner { padding: 9px 8px; }
    body #site-header .header-titles-wrapper { gap: 4px; }
    body #site-header .trade-mobile-actions { gap: 4px; }
    body #site-header .trade-mobile-actions a { font-size: 10px; padding: 8px 7px; }
    body #site-header .mobile-search-toggle,
    body #site-header .mobile-nav-toggle { width: 30px; min-width: 30px; flex-basis: 30px; height: 34px; }
    body #site-header .header-titles img.custom-logo { max-width: min(90px, 26vw); }
    body #site-header .trade-mobile-avatar { width: 20px; height: 20px; }
}
