

    /* Desktop safety: overlay never shows unless mobile rules enable it */
    .tabler-mob-search-overlay { display: none; }

    /* Desktop safety: NEVER show injected mobile search button on desktop */
    #masthead .tabler-mob-search-btn{
      display: none !important;
    }

    @media (max-width: 768px){

      /* --- Header layout: Search LEFT, Logo TRUE-CENTER, Burger RIGHT --- */
      #masthead .site-branding{
        display:flex !important;
        align-items:center !important;
        gap:10px;
        position: relative !important;
        padding-left: 2px !important;
        padding-right: 6px !important;
      }

      #masthead .site-title,
      #masthead .site-description{
        display:none !important;
      }

      /* Search button LEFT */
      #masthead .tabler-mob-search-btn{
        display:flex !important;
        order: 0 !important;

        margin-left: -14px !important;
        margin-right: 0 !important;

        width: 46px;
        height: 34px;
        padding: 0;
        border: 0;
        background: transparent;

        align-items:center;
        justify-content:center;
        -webkit-tap-highlight-color: transparent;

        appearance: none;
        -webkit-appearance: none;
        box-shadow: none !important;
        border-radius: 10px;

        color: #fff !important;
      }
      #masthead .tabler-mob-search-btn svg{
        width: 22px;
        height: 22px;
        opacity: 1 !important;
      }

      /* Logo: TRUE center of masthead */
      #masthead .custom-logo-link{
        order: 1 !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;

        display:flex !important;
        align-items:center;
        margin: 0 !important;
      }
      #masthead .custom-logo{
        height: 28px;
        width:auto;
        max-width:none;
        display:block;
      }

      /* Burger RIGHT */
      #masthead .secondary-toggle{
        order: 2 !important;
        margin-left: auto !important;
        margin-right: -6px !important;

        height: 34px;
        padding: 0 10px;
        display:flex;
        align-items:center;

        font-size: 0 !important;
        line-height: 0 !important;

        color: #fff !important;
        overflow: hidden !important;
      }
      #masthead .secondary-toggle:before{
        font-size: 18px !important;
        line-height: 1 !important;
        color: #fff !important;
      }

      #masthead,
      .site-header{
        padding-top: 6px !important;
        padding-bottom: 6px !important;
      }

      /* --- Overlay --- */
      body.tabler-mob-search-open{
        overflow:hidden !important;
      }

      .tabler-mob-search-overlay{
        position: fixed;
        top: var(--tabler-mob-admin-offset, 0px);
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 999999;
        display: none;
        flex-direction: column;
        background: rgba(0,0,0,.98);
        color: #fff;
      }

      .tabler-mob-search-overlay.is-open{ display:flex; }

      .tabler-mob-search-topbar{
        position: sticky;
        top: 0;
        z-index: 2;
        display:flex;
        align-items:center;
        gap: 8px;
        padding: 8px 10px;
        border-bottom: 1px solid rgba(255,255,255,.14);
        background: #000;
        color: #fff;
      }

      .tabler-mob-search-back{
        width: 44px;
        height: 36px;
        border: 0;
        border-radius: 10px;
        display:flex;
        align-items:center;
        justify-content:center;
        -webkit-tap-highlight-color: transparent;
        background: rgba(255,255,255,.10);
        color: #fff;
      }
      .tabler-mob-search-back svg{
        width: 22px;
        height: 22px;
      }
      .tabler-mob-search-back svg path{
        stroke: #fff !important;
        stroke-width: 3 !important;
      }

      .tabler-mob-search-input{
        flex: 1 1 auto;
        min-width: 0;
        height: 36px;
        border-radius: 10px;
        padding: 0 12px;
        font-size: 16px;
        outline: none;
        border: 1px solid rgba(255,255,255,.18);
        background: rgba(255,255,255,.08);
        color: #fff;
      }
      .tabler-mob-search-input::placeholder{
        color: rgba(255,255,255,.55);
      }

      .tabler-mob-search-panel{
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px;
      }

      .tabler-mob-search-item{
        display:flex;
        gap: 10px;
        align-items:center;
        padding: 10px 10px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,.10);
        background: #000;
        margin-bottom: 8px;
        text-decoration: none;
        color: #fff;
        -webkit-tap-highlight-color: transparent;
        touch-action: pan-y;
        cursor: pointer;
        user-select: none;
        transition: background .12s ease, border-color .12s ease, transform .12s ease;
      }
      .tabler-mob-search-item:active,
      .tabler-mob-search-item.is-pressed,
      .tabler-mob-search-item.is-selected{
        background: rgba(254,198,64,.18);
        border-color: rgba(254,198,64,.55);
        transform: scale(.985);
      }

      .tabler-mob-search-thumb{
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
        border-radius: 8px;
        object-fit: cover;
        background: rgba(255,255,255,.10);
      }

      .tabler-mob-search-title{
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #fff;
      }
      .tabler-mob-search-title-qualifier{
        color: rgba(255,255,255,.65);
        font-size: .8em;
        font-weight: 600;
        white-space: nowrap;
      }

      .tabler-mob-search-meta{
        font-size: 12px;
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 1;
        color: rgba(255,255,255,.72);
      }

      .tabler-mob-search-empty{
        padding: 12px 6px;
        opacity: 1;
        color: rgba(255,255,255,.75);
      }

      .tabler-mob-search-footerlink{
        display:block;
        padding: 12px 10px;
        text-align:center;
        border-radius: 12px;
        text-decoration:none;
        border: 1px dashed rgba(255,255,255,.22);
        background: rgba(255,255,255,.06);
        color: #fff;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        transition: background .12s ease, border-color .12s ease, transform .12s ease;
      }
      .tabler-mob-search-footerlink:active,
      .tabler-mob-search-footerlink.is-pressed,
      .tabler-mob-search-footerlink.is-selected{
        background: rgba(254,198,64,.18);
        border-color: rgba(254,198,64,.55);
        transform: scale(.985);
      }

      .tabler-mob-search-banner .tabler-ta-bannerbox{
        background: rgba(255,255,255,.06) !important;
        border-color: rgba(255,255,255,.18) !important;
        color: #fff !important;
      }
      .tabler-mob-search-banner .tabler-ta-bannerbox a{
        color: #fff !important;
        text-decoration: underline;
      }

      /* --- Mobile sidebar cleanup --- */
      #secondary .widget.widget_search,
      #secondary #block-8,
      #secondary #block-33,
      #secondary #block-31,
      #secondary #block-36,
      #secondary #block-38{
        display:none !important;
      }

      #secondary #bellows-main-0,
      #secondary nav.bellows{
        margin-bottom: 6px !important;
      }
      #secondary #block-42{
        margin-top: 6px !important;
      }

      #secondary #block-44,
      #secondary #block-24{
        float: left;
        width: 48%;
        clear: left;
        margin: 0 0 6px 0 !important;
      }
      #secondary #block-42{
        float: right;
        width: 48%;
        clear: right;
        margin: 0 0 6px 0 !important;
      }
      #secondary .widget-area::after{
        content:"";
        display:block;
        clear:both;
      }

      /* --- TranslatePress (colors only) --- */
      .trp-language-switcher,
      .trp-language-switcher *{
        color: #fff !important;
      }
      .trp-language-switcher .trp-ls-shortcode-current,
      .trp-language-switcher .trp-ls-shortcode-language{
        background: #000 !important;
        border-color: rgba(255,255,255,.18) !important;
      }
      .trp-language-switcher .trp-ls-shortcode-current a,
      .trp-language-switcher .trp-ls-shortcode-language a{
        color: #fff !important;
      }
      .trp-language-switcher .trp-ls-shortcode-current svg,
      .trp-language-switcher .trp-ls-shortcode-current img{
        filter: brightness(0) invert(1);
      }
    }
  