/* Стили шапки, раньше были встроены в header.php (блоки по версиям темы). */

/* ---- middle-header-canonical-0442 ---- */
    /*
     * Final desktop header structure:
     * LOGO | FLEXIBLE SPACER | SEARCH | WEATHER | BELL | PROFILE | MENU
     *
     * The spacer is a real DOM element, so the search cannot remain near the
     * logo: all free width is physically consumed before the search.
     */
    @media (min-width:1051px){
      html body .middle-site-header,
      html body .middle-site-header.is-scrolled{
        position:sticky!important;
        top:0!important;
        z-index:1200!important;
        width:100%!important;
        margin:0!important;
        padding:0!important;
        border:0!important;
        background:#fff!important;
        box-shadow:0 1px 0 rgba(18,42,75,.07)!important;
      }

      html body.admin-bar .middle-site-header,
      html body.admin-bar .middle-site-header.is-scrolled{
        top:32px!important;
      }

      html body .middle-site-header > .middle-header-row,
      html body .middle-site-header.is-scrolled > .middle-header-row{
        display:flex!important;
        flex-wrap:nowrap!important;
        align-items:center!important;
        justify-content:flex-start!important;
        width:min(1540px,calc(100% - 44px))!important;
        max-width:none!important;
        height:74px!important;
        min-height:74px!important;
        margin:0 auto!important;
        padding:0!important;
        gap:0!important;
        overflow:visible!important;
        border:0!important;
        border-radius:0!important;
        background:transparent!important;
        box-shadow:none!important;
        transform:none!important;
        transition:none!important;
      }

      html body .middle-header-row > .middle-brand{
        display:flex!important;
        align-items:center!important;
        flex:0 0 245px!important;
        width:245px!important;
        min-width:245px!important;
        max-width:245px!important;
        height:58px!important;
        min-height:58px!important;
        margin:0!important;
        padding:5px 0!important;
        overflow:visible!important;
        transform:none!important;
        transition:none!important;
      }

      html body .middle-header-row > .middle-brand .custom-logo{
        display:block!important;
        width:auto!important;
        max-width:245px!important;
        height:auto!important;
        max-height:48px!important;
        margin:0!important;
        object-fit:contain!important;
        object-position:left center!important;
        overflow:visible!important;
      }

      /* This element consumes ALL empty width between logo and search. */
      html body .middle-header-row > .middle-desktop-header-spacer{
        display:block!important;
        flex:1 1 auto!important;
        width:auto!important;
        min-width:20px!important;
        height:1px!important;
        margin:0!important;
        padding:0!important;
        border:0!important;
        pointer-events:none!important;
      }

      html body .middle-header-row > form.middle-home-header-search{
        display:flex!important;
        align-items:center!important;
        flex:0 0 620px!important;
        width:620px!important;
        min-width:620px!important;
        max-width:620px!important;
        height:46px!important;
        min-height:46px!important;
        max-height:46px!important;
        margin:0!important;
        padding:0 16px!important;
        gap:0!important;
        overflow:hidden!important;
        box-sizing:border-box!important;
        border:1px solid #e1e8f1!important;
        border-radius:14px!important;
        background:#f3f7fb!important;
        background-image:none!important;
        box-shadow:none!important;
        transform:none!important;
        transition:none!important;
      }

      html body .middle-header-row > form.middle-home-header-search svg{
        display:block!important;
        flex:0 0 18px!important;
        width:18px!important;
        height:18px!important;
        margin:0!important;
        fill:none!important;
        stroke:#7a91af!important;
        stroke-width:1.8!important;
      }

      html body .middle-header-row > form.middle-home-header-search input[type="search"]{
        -webkit-appearance:none!important;
        appearance:none!important;
        display:block!important;
        flex:1 1 auto!important;
        width:100%!important;
        min-width:0!important;
        height:44px!important;
        min-height:44px!important;
        margin:0!important;
        padding:0 0 0 10px!important;
        border:0!important;
        border-radius:0!important;
        outline:0!important;
        background:transparent!important;
        background-color:transparent!important;
        box-shadow:none!important;
        color:#1c2d44!important;
        font-size:14px!important;
      }

      /* Tools are immediately after search and never absorb free space. */
      html body .middle-header-row > .middle-header-tools{
        display:flex!important;
        flex-direction:row!important;
        flex-wrap:nowrap!important;
        align-items:center!important;
        justify-content:flex-end!important;
        flex:0 0 auto!important;
        width:auto!important;
        min-width:0!important;
        max-width:none!important;
        height:50px!important;
        min-height:50px!important;
        margin:0 0 0 8px!important;
        padding:0!important;
        gap:8px!important;
        overflow:visible!important;
        border:0!important;
        border-radius:0!important;
        background:transparent!important;
        box-shadow:none!important;
        transform:none!important;
        transition:none!important;
      }

      html body .middle-header-tools > .middle-header-weather{order:1!important}
      html body .middle-header-tools > .middle-home-header-bell{order:2!important}
      html body .middle-header-tools > .middle-account-link{order:3!important}
      html body .middle-header-tools > .middle-header-dropdown--menu{order:4!important}

      html body .middle-header-tools > .middle-mobile-home-link,
      html body .middle-header-tools > .middle-search-toggle,
      html body .middle-header-tools > .middle-theme-toggle--desktop,
      html body .middle-header-tools > .middle-messages-link,
      html body .middle-header-tools > .middle-write-link{
        display:none!important;
      }

      /*
       * Logged-in profile MUST be present on homepage too.
       * Previously home-exact.css hid .middle-profile-link, so the tools group
       * was ~80px narrower on the homepage and search shifted to the right.
       */
      html body .middle-header-tools > .middle-profile-link{
        order:3!important;
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        flex:0 0 auto!important;
        width:auto!important;
        min-width:104px!important;
        max-width:none!important;
        height:44px!important;
        min-height:44px!important;
        margin:0!important;
        padding:0 13px!important;
        gap:7px!important;
        border:1px solid #d7e4f2!important;
        border-radius:12px!important;
        background:#fff!important;
        color:#1474ee!important;
        box-shadow:none!important;
        font-size:13px!important;
        font-weight:750!important;
        line-height:1!important;
        white-space:nowrap!important;
        transform:none!important;
      }

      html body .middle-header-tools > .middle-profile-link svg{
        display:block!important;
        width:17px!important;
        height:17px!important;
        flex:0 0 17px!important;
        margin:0!important;
      }

      html body .middle-header-tools > .middle-profile-link > span{
        display:inline!important;
        width:auto!important;
        height:auto!important;
        margin:0!important;
        padding:0!important;
        color:inherit!important;
        font-size:13px!important;
        font-weight:750!important;
        line-height:1!important;
        white-space:nowrap!important;
      }

      html body .middle-header-row > #middle-header-search{
        display:none!important;
        position:absolute!important;
        width:0!important;
        height:0!important;
        min-width:0!important;
        max-width:0!important;
        margin:0!important;
        padding:0!important;
        overflow:hidden!important;
        pointer-events:none!important;
      }

      html body .middle-home-topnav{
        width:min(1540px,calc(100% - 44px))!important;
        max-width:none!important;
        margin-left:auto!important;
        margin-right:auto!important;
      }
    }

    @media (min-width:721px) and (max-width:1050px){
      html body .middle-site-header > .middle-header-row{
        display:flex!important;
        flex-wrap:nowrap!important;
        align-items:center!important;
        width:calc(100% - 24px)!important;
        height:70px!important;
        min-height:70px!important;
        margin:0 auto!important;
        gap:0!important;
      }

      html body .middle-header-row > .middle-brand{
        flex:0 0 190px!important;
        width:190px!important;
        min-width:190px!important;
        max-width:190px!important;
      }

      html body .middle-header-row > .middle-brand .custom-logo{
        max-width:190px!important;
      }

      html body .middle-header-row > .middle-desktop-header-spacer{
        display:block!important;
        flex:1 1 auto!important;
        min-width:10px!important;
      }

      html body .middle-header-row > form.middle-home-header-search{
        flex:0 1 430px!important;
        width:min(430px,40vw)!important;
        min-width:250px!important;
        max-width:430px!important;
        margin:0!important;
      }

      html body .middle-header-row > .middle-header-tools{
        flex:0 0 auto!important;
        width:auto!important;
        margin-left:6px!important;
        gap:6px!important;
      }

      html body .middle-header-row > #middle-header-search{
        display:none!important;
      }
    }

    @media (max-width:720px){
      html body .middle-header-row > .middle-desktop-header-spacer{
        display:none!important;
      }
      html body .middle-header-tools > .middle-profile-link{
        display:none!important;
      }
    }

    @media (min-width:721px) and (max-width:782px){
      html body.admin-bar .middle-site-header{top:46px!important}
    }

    @media (min-width:721px){
      html:root[data-middle-theme="dark"] body .middle-site-header{
        background:#111c28!important;
        box-shadow:0 1px 0 rgba(255,255,255,.07)!important;
      }

      html:root[data-middle-theme="dark"] body .middle-header-row > form.middle-home-header-search{
        border-color:#2c4054!important;
        background:#172432!important;
      }

      html:root[data-middle-theme="dark"] body .middle-header-row > form.middle-home-header-search input[type="search"]{
        color:#eef4fa!important;
        background:transparent!important;
      }

      html:root[data-middle-theme="dark"] body .middle-header-tools > .middle-profile-link{
        border-color:#2c4054!important;
        background:#182635!important;
        color:#8ec0ff!important;
      }
    }

/* ---- middle-search-identical-everywhere-0443 ---- */
    :root{
      --middle-search-width:620px;
      --middle-search-bg:#f3f7fb;
      --middle-search-border:#e1e8f1;
      --middle-search-text:#1c2d44;
      --middle-search-icon:#7a91af;
      --middle-search-placeholder:#9aacc0;
    }

    @media(min-width:721px) and (max-width:1050px){
      :root{--middle-search-width:430px}
    }

    @media(max-width:720px){
      :root{--middle-search-width:0px}
    }

    html:root[data-middle-theme="dark"]{
      --middle-search-bg:#172432;
      --middle-search-border:#2c4054;
      --middle-search-text:#eef4fa;
      --middle-search-icon:#8fa5bb;
      --middle-search-placeholder:#73879c;
    }

    /*
     * Same search component on HOME and ALL internal templates.
     * The actual form/input visual styles are inline-important in header.php,
     * so category/page form rules cannot repaint or resize it differently.
     */
    html body .middle-site-header form.middle-header-search-unified{
      display:flex!important;
      align-items:center!important;
      gap:0!important;
      transform:none!important;
      translate:none!important;
      transition:none!important;
    }

    html body .middle-site-header form.middle-header-search-unified input[type="search"]::placeholder{
      color:var(--middle-search-placeholder)!important;
      opacity:1!important;
    }

    html body .middle-site-header form.middle-header-search-unified input[type="search"]:focus{
      border:0!important;
      outline:0!important;
      background:transparent!important;
      background-color:transparent!important;
      box-shadow:none!important;
    }

    html body .middle-site-header form.middle-header-search-unified input[type="search"]::-webkit-search-decoration,
    html body .middle-site-header form.middle-header-search-unified input[type="search"]::-webkit-search-cancel-button,
    html body .middle-site-header form.middle-header-search-unified input[type="search"]::-webkit-search-results-button,
    html body .middle-site-header form.middle-header-search-unified input[type="search"]::-webkit-search-results-decoration{
      -webkit-appearance:none!important;
      appearance:none!important;
      display:none!important;
    }

    @media(max-width:720px){
      html body .middle-site-header form.middle-header-search-unified{
        display:none!important;
      }
    }

/* ---- middle-header-fixed-tool-widths-0445 ---- */
    /*
     * Pixel-stable desktop right side.
     * Search width was already equal; screenshots showed the apparent
     * difference came from the right controls consuming slightly different
     * width on home vs internal pages.
     *
     * Fixed desktop geometry:
     * search 620 + 8 gap + tools 328
     * tools = weather 112 + bell 44 + profile/login 104 + menu 44 + 3 gaps*8
     */
    @media(min-width:1051px){
      html body .middle-header-row > form.middle-home-header-search{
        flex:0 0 620px!important;
        width:620px!important;
        min-width:620px!important;
        max-width:620px!important;
        box-sizing:border-box!important;
        margin:0!important;
      }

      html body .middle-header-row > .middle-header-tools{
        display:flex!important;
        flex:0 0 328px!important;
        width:328px!important;
        min-width:328px!important;
        max-width:328px!important;
        height:50px!important;
        margin:0 0 0 8px!important;
        padding:0!important;
        gap:8px!important;
        align-items:center!important;
        justify-content:flex-start!important;
        overflow:visible!important;
        box-sizing:border-box!important;
      }

      html body .middle-header-tools > .middle-header-weather{
        order:1!important;
        display:flex!important;
        flex:0 0 112px!important;
        width:112px!important;
        min-width:112px!important;
        max-width:112px!important;
        height:44px!important;
        min-height:44px!important;
        margin:0!important;
        padding:0 9px!important;
        box-sizing:border-box!important;
        align-items:center!important;
        justify-content:center!important;
      }

      html body .middle-header-tools > .middle-home-header-bell{
        order:2!important;
        display:grid!important;
        flex:0 0 44px!important;
        width:44px!important;
        min-width:44px!important;
        max-width:44px!important;
        height:44px!important;
        min-height:44px!important;
        max-height:44px!important;
        margin:0!important;
        padding:0!important;
        box-sizing:border-box!important;
      }

      html body .middle-header-tools > .middle-account-link,
      html body .middle-header-tools > .middle-profile-link{
        order:3!important;
        display:inline-flex!important;
        flex:0 0 104px!important;
        width:104px!important;
        min-width:104px!important;
        max-width:104px!important;
        height:44px!important;
        min-height:44px!important;
        max-height:44px!important;
        margin:0!important;
        padding:0 10px!important;
        box-sizing:border-box!important;
        align-items:center!important;
        justify-content:center!important;
        overflow:hidden!important;
      }

      html body .middle-header-tools > .middle-header-dropdown--menu{
        order:4!important;
        display:block!important;
        flex:0 0 44px!important;
        width:44px!important;
        min-width:44px!important;
        max-width:44px!important;
        height:44px!important;
        min-height:44px!important;
        max-height:44px!important;
        margin:0!important;
        padding:0!important;
        box-sizing:border-box!important;
      }

      html body .middle-header-tools > .middle-header-dropdown--menu > .middle-nav-toggle{
        width:44px!important;
        min-width:44px!important;
        max-width:44px!important;
        height:44px!important;
        min-height:44px!important;
        max-height:44px!important;
        margin:0!important;
        padding:0!important;
        box-sizing:border-box!important;
      }
    }

/* ---- middle-header-logo-exact-footer-0447 ---- */
    /*
     * Header uses the EXACT same image presentation as the footer.
     * Crucially the image no longer has class .custom-logo, therefore old
     * header-specific .custom-logo rules cannot crop, shrink or transform it.
     */
    @media(min-width:721px){
      html body .middle-header-row > .middle-brand{
        display:flex!important;
        align-items:center!important;
        justify-content:flex-start!important;
        gap:13px!important;
        height:64px!important;
        min-height:64px!important;
        padding:5px 0!important;
        overflow:visible!important;
      }

      html body .middle-header-row > .middle-brand > img.middle-header-brand-logo,
      html body .middle-header-row > .middle-brand > img.middle-footer-home__logo{
        display:block!important;
        flex:0 0 54px!important;
        width:54px!important;
        min-width:54px!important;
        max-width:54px!important;
        height:54px!important;
        min-height:54px!important;
        max-height:54px!important;
        margin:0!important;
        padding:0!important;
        border:0!important;
        border-radius:15px!important;
        object-fit:contain!important;
        object-position:center!important;
        clip-path:none!important;
        mask:none!important;
        overflow:visible!important;
        transform:none!important;
        translate:none!important;
        filter:none!important;
        box-shadow:none!important;
      }

      html body .middle-header-row > .middle-brand > .middle-brand__text{
        display:block!important;
        flex:0 1 auto!important;
        width:auto!important;
        max-width:176px!important;
        margin:0!important;
        padding:0!important;
        overflow:visible!important;
        color:#13243d!important;
        font-size:25px!important;
        line-height:1.05!important;
        font-weight:850!important;
        letter-spacing:-.035em!important;
        white-space:nowrap!important;
        transform:none!important;
      }
    }

    @media(min-width:721px) and (max-width:1050px){
      html body .middle-header-row > .middle-brand{
        gap:10px!important;
      }
      html body .middle-header-row > .middle-brand > img.middle-header-brand-logo,
      html body .middle-header-row > .middle-brand > img.middle-footer-home__logo{
        flex-basis:48px!important;
        width:48px!important;
        min-width:48px!important;
        max-width:48px!important;
        height:48px!important;
        min-height:48px!important;
        max-height:48px!important;
        border-radius:14px!important;
      }
      html body .middle-header-row > .middle-brand > .middle-brand__text{
        font-size:20px!important;
        max-width:132px!important;
      }
    }

    @media(min-width:721px){
      html:root[data-middle-theme="dark"] body .middle-header-row > .middle-brand > .middle-brand__text{
        color:#f1f6fb!important;
      }
    }

/* ---- middle-create-post-header-critical-0461 ---- */
    @media(min-width:1051px){
      html body .middle-header-row > .middle-header-tools{
        flex:0 0 446px!important;
        width:446px!important;
        min-width:446px!important;
        max-width:446px!important;
        gap:8px!important;
      }

      html body .middle-header-tools > .middle-header-weather{
        order:1!important;
      }

      html body .middle-header-tools > .middle-create-post-header{
        order:2!important;
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        flex:0 0 110px!important;
        width:110px!important;
        min-width:110px!important;
        max-width:110px!important;
        height:44px!important;
        min-height:44px!important;
        max-height:44px!important;
        margin:0!important;
        padding:0 11px!important;
        gap:7px!important;
        border:1px solid #1d7cf2!important;
        border-radius:12px!important;
        background:linear-gradient(180deg,#2f91ff,#1675ed)!important;
        color:#fff!important;
        box-shadow:0 9px 19px rgba(22,117,237,.18)!important;
        box-sizing:border-box!important;
        text-decoration:none!important;
        white-space:nowrap!important;
      }

      html body .middle-header-tools > .middle-create-post-header svg{
        display:block!important;
        flex:0 0 16px!important;
        width:16px!important;
        height:16px!important;
        fill:none!important;
        stroke:currentColor!important;
        stroke-width:2!important;
        stroke-linecap:round!important;
      }

      html body .middle-header-tools > .middle-create-post-header span{
        display:inline!important;
        color:inherit!important;
        font-size:11px!important;
        line-height:1!important;
        font-weight:800!important;
      }

      html body .middle-header-tools > .middle-create-post-header:hover,
      html body .middle-header-tools > .middle-create-post-header:focus-visible{
        background:linear-gradient(180deg,#238aff,#0f6fe8)!important;
        box-shadow:0 11px 22px rgba(22,117,237,.25)!important;
        transform:translateY(-1px)!important;
      }

      html body .middle-header-tools > .middle-home-header-bell{
        order:3!important;
      }

      html body .middle-header-tools > .middle-profile-link,
      html body .middle-header-tools > .middle-account-link{
        order:4!important;
      }

      html body .middle-header-tools > .middle-header-dropdown--menu{
        order:5!important;
      }
    }

    @media(min-width:1051px) and (max-width:1350px){
      html body .middle-header-row > form.middle-home-header-search{
        flex-basis:430px!important;
        width:430px!important;
        min-width:430px!important;
        max-width:430px!important;
      }

      html body .middle-header-row > .middle-header-tools{
        flex-basis:380px!important;
        width:380px!important;
        min-width:380px!important;
        max-width:380px!important;
      }

      html body .middle-header-tools > .middle-create-post-header{
        flex-basis:44px!important;
        width:44px!important;
        min-width:44px!important;
        max-width:44px!important;
        padding:0!important;
      }

      html body .middle-header-tools > .middle-create-post-header span{
        display:none!important;
      }
    }

    @media(max-width:1050px){
      html body .middle-header-tools > .middle-create-post-header{
        display:none!important;
      }
    }

    html:root[data-middle-theme="dark"] body .middle-header-tools > .middle-create-post-header{
      border-color:#2786f4!important;
      background:linear-gradient(180deg,#2487f7,#166edc)!important;
      color:#fff!important;
      box-shadow:0 9px 20px rgba(0,0,0,.22)!important;
    }

/* ---- middle-compact-post-actions-0463 ---- */
    /*
     * Compact post actions for comments / reactions / bookmark.
     * This block is after wp_head so plugin CSS cannot enlarge them again.
     */
    .middle-post-actions,
    .middle-ad-detail__head-actions{
      display:flex!important;
      align-items:center!important;
      flex-wrap:wrap!important;
      gap:6px!important;
    }

    .middle-post-actions .middle-action,
    .middle-ad-detail__head-actions .middle-action,
    .middle-comments-action{
      box-sizing:border-box!important;
    }

    .middle-comments-action{
      display:inline-flex!important;
      align-items:center!important;
      justify-content:center!important;
      gap:5px!important;
      min-width:34px!important;
      width:auto!important;
      height:32px!important;
      min-height:32px!important;
      margin:0!important;
      padding:0 8px!important;
      border:1px solid #dde7f2!important;
      border-radius:10px!important;
      background:#f8fbfe!important;
      color:#6f8299!important;
      box-shadow:none!important;
      font-size:10px!important;
      line-height:1!important;
      font-weight:750!important;
      text-decoration:none!important;
      transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease!important;
    }

    .middle-comments-action__icon{
      display:block!important;
      width:14px!important;
      height:14px!important;
      fill:none!important;
      stroke:currentColor!important;
      stroke-width:1.8!important;
      stroke-linecap:round!important;
      stroke-linejoin:round!important;
    }

    .middle-comments-action:hover,
    .middle-comments-action:focus-visible{
      border-color:#bdd8f8!important;
      background:#eef6ff!important;
      color:#1675e5!important;
      transform:translateY(-1px)!important;
    }

    .middle-post-actions .middle-reactions,
    .middle-ad-detail__head-actions .middle-reactions{
      flex:0 0 auto!important;
      max-width:none!important;
    }

    .middle-post-actions .middle-reactions__trigger,
    .middle-ad-detail__head-actions .middle-reactions__trigger{
      gap:5px!important;
      min-height:32px!important;
      height:32px!important;
      margin:0!important;
      padding:0 8px!important;
      border:1px solid #dce7f2!important;
      border-radius:10px!important;
      background:#f8fbfe!important;
      color:#6f8299!important;
      box-shadow:none!important;
      transform:none!important;
    }

    .middle-post-actions .middle-reactions__trigger:hover,
    .middle-post-actions .middle-reactions__trigger:focus-visible,
    .middle-post-actions .middle-reactions__trigger.is-active,
    .middle-ad-detail__head-actions .middle-reactions__trigger:hover,
    .middle-ad-detail__head-actions .middle-reactions__trigger:focus-visible,
    .middle-ad-detail__head-actions .middle-reactions__trigger.is-active{
      border-color:#bdd8f8!important;
      background:#eef6ff!important;
      color:#1675e5!important;
      transform:translateY(-1px)!important;
    }

    .middle-post-actions .middle-reactions__trigger-emoji,
    .middle-ad-detail__head-actions .middle-reactions__trigger-emoji{
      font-size:16px!important;
      line-height:1!important;
    }

    .middle-post-actions .middle-reactions__trigger-label,
    .middle-ad-detail__head-actions .middle-reactions__trigger-label{
      font-size:9.5px!important;
      line-height:1!important;
      font-weight:750!important;
    }

    .middle-post-actions .middle-reactions__total,
    .middle-ad-detail__head-actions .middle-reactions__total{
      min-width:17px!important;
      height:17px!important;
      padding:0 5px!important;
      font-size:8.5px!important;
      font-weight:800!important;
    }

    .middle-post-actions .middle-reactions__chevron,
    .middle-ad-detail__head-actions .middle-reactions__chevron{
      width:11px!important;
      height:11px!important;
    }

    .middle-post-actions .middle-bookmark-button,
    .middle-ad-detail__head-actions .middle-bookmark-button{
      display:inline-grid!important;
      place-items:center!important;
      flex:0 0 32px!important;
      width:32px!important;
      min-width:32px!important;
      max-width:32px!important;
      height:32px!important;
      min-height:32px!important;
      max-height:32px!important;
      margin:0!important;
      padding:0!important;
      border:1px solid #dde7f2!important;
      border-radius:10px!important;
      background:#f8fbfe!important;
      color:#6f8299!important;
      box-shadow:none!important;
    }

    .middle-post-actions .middle-bookmark-button:hover,
    .middle-post-actions .middle-bookmark-button.is-active,
    .middle-ad-detail__head-actions .middle-bookmark-button:hover,
    .middle-ad-detail__head-actions .middle-bookmark-button.is-active{
      border-color:#bdd8f8!important;
      background:#eef6ff!important;
      color:#1675e5!important;
    }

    .middle-post-actions .middle-bookmark-icon,
    .middle-ad-detail__head-actions .middle-bookmark-icon{
      width:15px!important;
      height:15px!important;
    }

    /* Smaller and cleaner reaction menu, including the picker moved to <body>. */
    body > .middle-reactions__popover,
    .middle-reactions__popover{
      width:min(286px,calc(100vw - 18px))!important;
      padding:10px!important;
      border:1px solid #dbe7f3!important;
      border-radius:15px!important;
      background:#fff!important;
      color:#183552!important;
      box-shadow:0 16px 42px rgba(20,52,85,.18)!important;
    }

    .middle-reactions__title{
      margin:0 2px 8px!important;
      color:#8193a8!important;
      font-size:8.5px!important;
      line-height:1!important;
      font-weight:800!important;
      letter-spacing:.07em!important;
    }

    .middle-reactions__list{
      grid-template-columns:repeat(5,minmax(0,1fr))!important;
      gap:5px!important;
    }

    .middle-reaction{
      height:46px!important;
      min-height:46px!important;
      padding:4px 2px!important;
      gap:2px!important;
      border-radius:10px!important;
      background:#f5f8fb!important;
      box-shadow:none!important;
    }

    .middle-reaction:hover,
    .middle-reaction:focus-visible,
    .middle-reaction.is-active{
      background:#edf5ff!important;
      box-shadow:inset 0 0 0 1px #c7ddf8!important;
      transform:translateY(-1px)!important;
    }

    .middle-reaction__emoji{
      font-size:20px!important;
    }

    .middle-reaction__label{
      font-size:7px!important;
      line-height:1!important;
      font-weight:750!important;
    }

    .middle-reaction__count{
      min-width:15px!important;
      height:15px!important;
      padding:0 4px!important;
      font-size:7px!important;
    }

    .middle-reactions__popover-arrow{
      background:#fff!important;
      border-color:#dbe7f3!important;
    }

    html:root[data-middle-theme="dark"] .middle-comments-action,
    html:root[data-middle-theme="dark"] .middle-post-actions .middle-reactions__trigger,
    html:root[data-middle-theme="dark"] .middle-ad-detail__head-actions .middle-reactions__trigger,
    html:root[data-middle-theme="dark"] .middle-post-actions .middle-bookmark-button,
    html:root[data-middle-theme="dark"] .middle-ad-detail__head-actions .middle-bookmark-button{
      border-color:#314a63!important;
      background:#17283a!important;
      color:#9eb3c9!important;
    }

    html:root[data-middle-theme="dark"] .middle-comments-action:hover,
    html:root[data-middle-theme="dark"] .middle-post-actions .middle-reactions__trigger:hover,
    html:root[data-middle-theme="dark"] .middle-post-actions .middle-reactions__trigger.is-active,
    html:root[data-middle-theme="dark"] .middle-ad-detail__head-actions .middle-reactions__trigger:hover,
    html:root[data-middle-theme="dark"] .middle-ad-detail__head-actions .middle-reactions__trigger.is-active,
    html:root[data-middle-theme="dark"] .middle-post-actions .middle-bookmark-button:hover,
    html:root[data-middle-theme="dark"] .middle-post-actions .middle-bookmark-button.is-active,
    html:root[data-middle-theme="dark"] .middle-ad-detail__head-actions .middle-bookmark-button:hover,
    html:root[data-middle-theme="dark"] .middle-ad-detail__head-actions .middle-bookmark-button.is-active{
      border-color:#356ba2!important;
      background:#1a3450!important;
      color:#8fc5ff!important;
    }

    html:root[data-middle-theme="dark"] body > .middle-reactions__popover,
    html:root[data-middle-theme="dark"] .middle-reactions__popover{
      border-color:#31506d!important;
      background:#17283a!important;
      color:#eef6ff!important;
      box-shadow:0 18px 46px rgba(0,0,0,.38)!important;
    }

    html:root[data-middle-theme="dark"] .middle-reaction{
      background:#1d3146!important;
      color:#e8f2fc!important;
    }

    html:root[data-middle-theme="dark"] .middle-reaction:hover,
    html:root[data-middle-theme="dark"] .middle-reaction:focus-visible,
    html:root[data-middle-theme="dark"] .middle-reaction.is-active{
      background:#213e5b!important;
      box-shadow:inset 0 0 0 1px #37658f!important;
    }

    html:root[data-middle-theme="dark"] .middle-reactions__popover-arrow{
      background:#17283a!important;
      border-color:#31506d!important;
    }

    @media(max-width:720px){
      .middle-post-actions,
      .middle-ad-detail__head-actions{
        gap:5px!important;
      }

      .middle-comments-action{
        height:30px!important;
        min-height:30px!important;
        min-width:31px!important;
        padding:0 7px!important;
        border-radius:9px!important;
        font-size:9px!important;
      }

      .middle-comments-action__icon{
        width:13px!important;
        height:13px!important;
      }

      .middle-post-actions .middle-reactions__trigger,
      .middle-ad-detail__head-actions .middle-reactions__trigger{
        height:30px!important;
        min-height:30px!important;
        padding:0 7px!important;
        border-radius:9px!important;
      }

      .middle-post-actions .middle-reactions__trigger-emoji,
      .middle-ad-detail__head-actions .middle-reactions__trigger-emoji{
        font-size:15px!important;
      }

      .middle-post-actions .middle-reactions__trigger-label,
      .middle-ad-detail__head-actions .middle-reactions__trigger-label{
        font-size:9px!important;
      }

      .middle-post-actions .middle-bookmark-button,
      .middle-ad-detail__head-actions .middle-bookmark-button{
        flex-basis:30px!important;
        width:30px!important;
        min-width:30px!important;
        max-width:30px!important;
        height:30px!important;
        min-height:30px!important;
        max-height:30px!important;
        border-radius:9px!important;
      }

      body > .middle-reactions__popover,
      .middle-reactions__popover{
        width:min(278px,calc(100vw - 16px))!important;
        padding:9px!important;
        border-radius:14px!important;
      }

      .middle-reaction{
        height:44px!important;
        min-height:44px!important;
      }

      .middle-reaction__emoji{
        font-size:19px!important;
      }
    }

/* ---- middle-mobile-final-0470 ---- */
    .middle-mobile-sticky-search-spacer{display:none}
    @media(max-width:720px){
      /* The bar is a root-level fixed layer. No body padding: the explicit spacer
         below it reserves the exact height, eliminating the old white strip. */
      html,html body{padding-top:0!important}
      html body>.middle-mobile-sticky-search{
        position:fixed!important;
        inset:0 0 auto 0!important;
        top:0!important;
        left:0!important;
        right:0!important;
        z-index:2147482000!important;
        display:grid!important;
        grid-template-columns:minmax(0,1fr) 112px!important;
        align-items:center!important;
        gap:8px!important;
        width:100%!important;
        height:64px!important;
        min-height:64px!important;
        margin:0!important;
        padding:8px 10px!important;
        box-sizing:border-box!important;
        border:0!important;
        border-bottom:1px solid rgba(212,224,237,.94)!important;
        background:rgba(248,251,255,.975)!important;
        box-shadow:0 8px 24px rgba(25,55,91,.07)!important;
        -webkit-backdrop-filter:blur(18px) saturate(1.12)!important;
        backdrop-filter:blur(18px) saturate(1.12)!important;
        transform:translate3d(0,0,0)!important;
        will-change:transform!important;
      }
      html body>.middle-mobile-sticky-search-spacer{
        display:block!important;
        width:100%!important;
        height:64px!important;
        min-height:64px!important;
        margin:0!important;
        padding:0!important;
        border:0!important;
        background:transparent!important;
        pointer-events:none!important;
      }
      html body>.middle-mobile-sticky-search .middle-mobile-sticky-search__form{
        width:100%!important;
        min-width:0!important;
        height:48px!important;
        min-height:48px!important;
        padding:0 14px!important;
        border:1px solid #d9e5f1!important;
        border-radius:16px!important;
        background:#fff!important;
        box-shadow:0 5px 16px rgba(26,63,101,.05)!important;
      }
      html body>.middle-mobile-sticky-search .middle-mobile-sticky-search__weather{
        width:112px!important;
        min-width:112px!important;
        max-width:112px!important;
      }
      html body>.middle-mobile-sticky-search .middle-mobile-sticky-search__weather .middle-header-weather{
        width:112px!important;
        min-width:112px!important;
        max-width:112px!important;
        height:48px!important;
        min-height:48px!important;
        border:1px solid #d9e5f1!important;
        border-radius:16px!important;
        background:#fff!important;
      }

      /* New mobile image file has a genuinely taller aspect ratio. It is cropped
         only horizontally from the original; nothing is cut from top or bottom. */
      html body.home .middle-exact-hero-zone,
      html body.front-page .middle-exact-hero-zone{
        display:block!important;
        width:calc(100% - 18px)!important;
        margin:10px auto 0!important;
        padding:0!important;
      }
      html body.home .middle-exact-hero-zone>.middle-exact-hero,
      html body.front-page .middle-exact-hero-zone>.middle-exact-hero{
        position:relative!important;
        display:block!important;
        width:100%!important;
        height:auto!important;
        min-height:0!important;
        aspect-ratio:auto!important;
        margin:0!important;
        padding:0!important;
        overflow:hidden!important;
        border-radius:20px!important;
        background:#dcecf6!important;
      }
      html body.home .middle-exact-hero__picture,
      html body.front-page .middle-exact-hero__picture{
        position:relative!important;
        inset:auto!important;
        display:block!important;
        width:100%!important;
        height:auto!important;
        margin:0!important;
        line-height:0!important;
      }
      html body.home .middle-exact-hero__image,
      html body.front-page .middle-exact-hero__image{
        position:relative!important;
        inset:auto!important;
        display:block!important;
        width:100%!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        margin:0!important;
        padding:0!important;
        object-fit:contain!important;
        object-position:center!important;
        transform:none!important;
      }
      html body.home .middle-exact-hero-zone .middle-exact-hero__shade,
      html body.front-page .middle-exact-hero-zone .middle-exact-hero__shade{display:none!important}
      html body.home .middle-exact-hero-zone .middle-exact-hero__copy,
      html body.front-page .middle-exact-hero-zone .middle-exact-hero__copy{
        position:absolute!important;
        z-index:4!important;
        top:12px!important;
        left:12px!important;
        right:auto!important;
        bottom:auto!important;
        display:flex!important;
        flex-direction:column!important;
        align-items:flex-start!important;
        gap:5px!important;
        width:auto!important;
        max-width:48%!important;
        margin:0!important;
        padding:11px 14px 12px!important;
        border:1px solid rgba(255,255,255,.17)!important;
        border-radius:17px!important;
        background:rgba(24,53,73,.78)!important;
        color:#fff!important;
        box-shadow:0 8px 22px rgba(0,0,0,.13)!important;
        -webkit-backdrop-filter:blur(10px)!important;
        backdrop-filter:blur(10px)!important;
      }
      html body.home .middle-exact-hero-zone .middle-exact-hero__copy::after,
      html body.front-page .middle-exact-hero-zone .middle-exact-hero__copy::after,
      html body.home .middle-exact-hero-zone .middle-exact-hero h1,
      html body.front-page .middle-exact-hero-zone .middle-exact-hero h1,
      html body.home .middle-exact-hero-zone .middle-exact-hero__copy>p,
      html body.front-page .middle-exact-hero-zone .middle-exact-hero__copy>p{display:none!important}
      html body.home .middle-exact-hero-zone .middle-exact-hero__city,
      html body.front-page .middle-exact-hero-zone .middle-exact-hero__city{
        display:block!important;
        margin:0!important;
        color:#fff!important;
        font-size:16px!important;
        line-height:1.05!important;
        font-weight:850!important;
        letter-spacing:-.015em!important;
        text-transform:none!important;
      }
      html body.home .middle-exact-hero__mobile-subtitle,
      html body.front-page .middle-exact-hero__mobile-subtitle{
        display:block!important;
        margin:0!important;
        color:rgba(255,255,255,.90)!important;
        font-size:11.5px!important;
        line-height:1.18!important;
        font-weight:560!important;
      }
      html:root[data-middle-theme="dark"] body>.middle-mobile-sticky-search{
        border-bottom-color:#2d4359!important;
        background:rgba(19,31,44,.975)!important;
      }
    }
    @media(max-width:390px){
      html body>.middle-mobile-sticky-search{grid-template-columns:minmax(0,1fr) 104px!important;padding-left:8px!important;padding-right:8px!important}
      html body>.middle-mobile-sticky-search .middle-mobile-sticky-search__weather,
      html body>.middle-mobile-sticky-search .middle-mobile-sticky-search__weather .middle-header-weather{width:104px!important;min-width:104px!important;max-width:104px!important}
      html body.home .middle-exact-hero-zone .middle-exact-hero__copy,
      html body.front-page .middle-exact-hero-zone .middle-exact-hero__copy{top:10px!important;left:10px!important;max-width:50%!important;padding:9px 11px 10px!important;border-radius:15px!important}
      html body.home .middle-exact-hero-zone .middle-exact-hero__city,
      html body.front-page .middle-exact-hero-zone .middle-exact-hero__city{font-size:14px!important}
      html body.home .middle-exact-hero__mobile-subtitle,
      html body.front-page .middle-exact-hero__mobile-subtitle{font-size:10.5px!important}
    }

/* ---- middle-mobile-final-0471 ---- */
    @media(max-width:720px){
      /* Weather must stay visible on EVERY template (ads, auto, real estate,
         categories, pages, single posts), even where old internal-page CSS hides
         the ordinary desktop .middle-header-weather element. */
      html body > .middle-mobile-sticky-search .middle-mobile-sticky-search__weather{
        display:block!important;
        visibility:visible!important;
        opacity:1!important;
        pointer-events:auto!important;
      }
      html body > .middle-mobile-sticky-search .middle-mobile-weather-link,
      html body > .middle-mobile-sticky-search a.middle-header-weather.middle-mobile-weather-link{
        display:flex!important;
        visibility:visible!important;
        opacity:1!important;
        position:relative!important;
        inset:auto!important;
        align-items:center!important;
        justify-content:center!important;
        gap:7px!important;
        width:112px!important;
        min-width:112px!important;
        max-width:112px!important;
        height:48px!important;
        min-height:48px!important;
        max-height:48px!important;
        margin:0!important;
        padding:0 10px!important;
        box-sizing:border-box!important;
        border:1px solid #d9e5f1!important;
        border-radius:16px!important;
        background:#fff!important;
        color:#173553!important;
        box-shadow:0 5px 16px rgba(26,63,101,.055)!important;
        text-decoration:none!important;
        overflow:hidden!important;
        white-space:nowrap!important;
        transform:none!important;
        pointer-events:auto!important;
      }
      html body > .middle-mobile-sticky-search .middle-mobile-weather-link .middle-header-weather__icon{
        display:block!important;
        visibility:visible!important;
        opacity:1!important;
        flex:0 0 auto!important;
        font-size:22px!important;
        line-height:1!important;
      }
      html body > .middle-mobile-sticky-search .middle-mobile-weather-link strong{
        display:block!important;
        visibility:visible!important;
        opacity:1!important;
        margin:0!important;
        color:#173553!important;
        font-size:16px!important;
        line-height:1!important;
        font-weight:850!important;
      }

      /* Hero: give the container exactly the mobile image ratio and make the
         picture fill that rounded rectangle. This removes the pale corners and
         keeps the image itself uncropped. */
      html body.home .middle-exact-hero-zone > .middle-exact-hero,
      html body.front-page .middle-exact-hero-zone > .middle-exact-hero{
        position:relative!important;
        width:100%!important;
        height:auto!important;
        aspect-ratio:1050 / 421!important;
        min-height:0!important;
        max-height:none!important;
        overflow:hidden!important;
        border-radius:20px!important;
        background:transparent!important;
        -webkit-mask-image:-webkit-radial-gradient(white,black)!important;
        clip-path:inset(0 round 20px)!important;
      }
      html body.home .middle-exact-hero__picture,
      html body.front-page .middle-exact-hero__picture{
        position:absolute!important;
        inset:0!important;
        display:block!important;
        width:100%!important;
        height:100%!important;
        min-width:100%!important;
        min-height:100%!important;
        margin:0!important;
        padding:0!important;
        overflow:hidden!important;
        border-radius:inherit!important;
        line-height:0!important;
      }
      html body.home .middle-exact-hero__image,
      html body.front-page .middle-exact-hero__image{
        position:absolute!important;
        inset:0!important;
        display:block!important;
        width:100%!important;
        height:100%!important;
        min-width:100%!important;
        min-height:100%!important;
        max-width:none!important;
        max-height:none!important;
        margin:0!important;
        padding:0!important;
        border:0!important;
        border-radius:inherit!important;
        object-fit:fill!important;
        object-position:center!important;
        transform:none!important;
        background:transparent!important;
      }

      html:root[data-middle-theme="dark"] body > .middle-mobile-sticky-search .middle-mobile-weather-link,
      html:root[data-middle-theme="dark"] body > .middle-mobile-sticky-search a.middle-header-weather.middle-mobile-weather-link{
        border-color:#324b64!important;
        background:#182b3e!important;
        color:#eef6ff!important;
        box-shadow:none!important;
      }
      html:root[data-middle-theme="dark"] body > .middle-mobile-sticky-search .middle-mobile-weather-link strong{
        color:#eef6ff!important;
      }
    }
    @media(max-width:390px){
      html body > .middle-mobile-sticky-search .middle-mobile-weather-link,
      html body > .middle-mobile-sticky-search a.middle-header-weather.middle-mobile-weather-link{
        width:104px!important;
        min-width:104px!important;
        max-width:104px!important;
      }
    }

/* ---- middle-mobile-ads-desktop-hide-0474 ---- */
    @media(min-width:721px){
      html body .middle-header-tools > .middle-mobile-ads-link{
        display:none!important;
      }
    }

/* ---- 0.5.109: одинаковая шапка на всех страницах ----
   В portal-unified.css правило body:not(.home):not(.front-page) .middle-header-row
   ставит gap:18px и по специфичности перебивает gap:0 выше, поэтому на внутренних
   страницах поиск стоял в другом месте, а на 1366px обрезалась кнопка меню.
   Промежутки между кнопками справа — 8px, как на главной (было 9px). */
@media (min-width:1051px){
  html body:not(.home):not(.front-page) .middle-site-header > .middle-header-row{gap:0!important}
  html body:not(.home):not(.front-page) .middle-site-header > .middle-header-row > .middle-header-tools{gap:8px!important}
}

/* ---- 0.5.111: кнопка «Меню» в нижней панели на телефоне ----
   На главной обёртку кнопки выравнивает правило из home-exact.css (только главная).
   На остальных страницах обёртка получала общие отступы 4px/5px при высоте 66px,
   и кнопка «Меню» поднималась на 5px выше соседних. Повторяем правило главной. */
@media (max-width:720px){
  html body:not(.home):not(.front-page) .middle-header-tools > .middle-header-dropdown--menu{top:auto!important;bottom:auto!important;margin-top:0!important;margin-bottom:0!important;position:static!important;padding-top:0!important;padding-bottom:0!important;height:66px!important;min-height:66px!important;display:flex!important;align-items:stretch!important;align-self:stretch!important}
}

/* ---- 0.5.112: нижняя мобильная панель — текущий раздел, нажатие, подписи ----
   body:not(#middle-nav) добавляет вес id, чтобы перебить слои правил
   body:not(.home):not(.front-page) … из portal-unified.css. Класс .is-current
   ставит header.php: «Главная» на главной, «Объявления» в разделе объявлений. */
@media (max-width:720px){
  /* Одинаковый размер подписей (было 8.4–10px). */
  html body:not(#middle-nav) .middle-header-tools > .middle-mobile-home-link > span:not([class*="__brand"]),
  html body:not(#middle-nav) .middle-header-tools > .middle-mobile-ads-link > .middle-mobile-nav-label,
  html body:not(#middle-nav) .middle-header-tools > .middle-write-link > span,
  html body:not(#middle-nav) .middle-header-tools > .middle-account-link > span,
  html body:not(#middle-nav) .middle-header-tools .middle-nav-toggle > span{font-size:10px!important;letter-spacing:0!important}

  /* «Главная» синяя только на главной; остальные разделы — серые, текущий — синий. */
  html body:not(#middle-nav) .middle-header-tools > .middle-mobile-home-link:not(.is-current) > span:not([class*="__brand"]){color:rgb(82,100,123)!important;font-weight:650!important}
  html body:not(#middle-nav) .middle-header-tools > .is-current > span:not([class*="__brand"]),
  html body:not(#middle-nav) .middle-header-tools > .is-current > .middle-mobile-nav-label{color:rgb(31,120,229)!important;font-weight:750!important}
  html body:not(#middle-nav) .middle-header-tools > .middle-mobile-ads-link.is-current > svg{color:rgb(31,120,229)!important;stroke:rgb(31,120,229)!important}
  html[data-middle-theme="dark"] body:not(#middle-nav) .middle-header-tools > .middle-mobile-home-link:not(.is-current) > span:not([class*="__brand"]){color:rgb(200,214,229)!important}
  html[data-middle-theme="dark"] body:not(#middle-nav) .middle-header-tools > .is-current > span:not([class*="__brand"]),
  html[data-middle-theme="dark"] body:not(#middle-nav) .middle-header-tools > .is-current > .middle-mobile-nav-label{color:rgb(121,182,255)!important}
  html[data-middle-theme="dark"] body:not(#middle-nav) .middle-header-tools > .middle-mobile-ads-link.is-current > svg{color:rgb(121,182,255)!important;stroke:rgb(121,182,255)!important}
  /* В тёмной теме «Объявления» получали фон круглых кнопок шапки (.middle-icon-btn) — в нижней панели фона нет ни у одной кнопки. */
  html[data-middle-theme="dark"] body:not(#middle-nav) .middle-header-tools > .middle-mobile-ads-link{background:transparent!important;box-shadow:none!important}

  /* Нажатие: без стандартного голубого прямоугольника Android, значок слегка «вдавливается». */
  .middle-header-tools > .middle-mobile-home-link,
  .middle-header-tools > .middle-mobile-ads-link,
  .middle-header-tools > .middle-write-link,
  .middle-header-tools > .middle-account-link,
  .middle-header-tools .middle-nav-toggle{-webkit-tap-highlight-color:transparent!important}
  .middle-header-tools > .middle-mobile-home-link .middle-mobile-home-link__brand,
  .middle-header-tools > .middle-mobile-ads-link > svg,
  .middle-header-tools > .middle-account-link > svg,
  .middle-header-tools .middle-nav-toggle > svg{transition:transform .12s ease!important}
  .middle-header-tools > .middle-mobile-home-link:active .middle-mobile-home-link__brand,
  .middle-header-tools > .middle-mobile-ads-link:active > svg,
  .middle-header-tools > .middle-account-link:active > svg,
  .middle-header-tools .middle-nav-toggle:active > svg{transform:scale(.86)!important}
  .middle-header-tools > .middle-mobile-home-link:focus-visible,
  .middle-header-tools > .middle-mobile-ads-link:focus-visible,
  .middle-header-tools > .middle-write-link:focus-visible,
  .middle-header-tools > .middle-account-link:focus-visible,
  .middle-header-tools .middle-nav-toggle:focus-visible{outline:2px solid rgb(31,120,229)!important;outline-offset:-4px!important;border-radius:14px!important}
}

/* ---- 0.5.114: пустое место перед подвалом ----
   У .middle-layout на внутренних страницах был нижний отступ 106px (телефон) и 58px
   (компьютер) — видимо, под нижнюю панель, но под ней и так стоит подвал со своим
   отступом. Оставляем столько же, сколько на главной. */
@media (max-width:720px){
  html body:not(#middle-nav):not(.home):not(.front-page) .middle-shell.middle-layout{padding-bottom:8px!important}
}
@media (min-width:721px){
  html body:not(#middle-nav):not(.home):not(.front-page) .middle-shell.middle-layout{padding-bottom:0!important}
  html body:not(#middle-nav).home .middle-main.middle-exact-home{padding-bottom:0!important}
  /* «Подвези»: под кнопкой «Показать ещё» был свой отступ 56px. */
  html body:not(#middle-nav) .middle-main.middle-rides-page-main{padding-bottom:12px!important}
}

/* ---- 0.5.116: тёмная тема — блоки, которые оставались светлыми ----
   Палитра тёмной темы сайта: фон rgb(15,23,33), карточки rgb(24,37,52), вложенные
   поверхности rgb(30,45,62), рамки rgb(43,62,82), текст rgb(238,244,250),
   второстепенный текст rgb(157,174,193), акцент rgb(121,182,255).
   Префикс body:not(#middle-nav) нужен, чтобы перебить светлые правила с !important. */

/* Подвал (все страницы): статистика просмотров и кнопка «Наверх». */
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-footer-metrics{background:rgb(30,45,62)!important;border-color:rgb(43,62,82)!important;box-shadow:none!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-footer-metrics strong{color:rgb(238,244,250)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-footer-metrics small{color:rgb(157,174,193)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-footer-metrics svg text{fill:rgb(157,174,193)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-footer-metrics__toggle,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-footer-metrics__toggle span,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-footer-metrics a{color:rgb(121,182,255)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-footer-home__top-button{background:rgba(121,182,255,.14)!important;border-color:rgba(121,182,255,.3)!important;color:rgb(121,182,255)!important;box-shadow:none!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-footer-home__top-button span{color:rgb(121,182,255)!important}

/* Поля ввода: поиск на телефоне, вход, «Подвези», организации. */
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-mobile-sticky-search__form input,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-filters input,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-search input,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]){background:rgb(15,23,33)!important;color:rgb(238,244,250)!important;border-color:rgb(52,72,94)!important;-webkit-text-fill-color:rgb(238,244,250)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-mobile-sticky-search__form input::placeholder,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-filters input::placeholder,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-search input::placeholder,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-auth-form input::placeholder{color:rgb(157,174,193)!important;-webkit-text-fill-color:rgb(157,174,193)!important}

/* Место под рекламу, пока баннер не загрузился. */
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ad__desktop-pair,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ad__desktop-cell{background:rgb(30,45,62)!important;border-color:rgb(43,62,82)!important}

/* Главная: «Сегодня в Чепецке», региональные новости, боковые подборки. */
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-featured--stack,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-featured--stack .middle-exact-featured__body,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-region-featured__copy,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion--city,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion--russia,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion--home{background:rgb(24,37,52)!important;border-color:rgb(43,62,82)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-featured--stack .middle-exact-featured__body a,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-region-featured__copy a,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion h2,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion strong,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion a:not(.middle-news-companion__all){color:rgb(238,244,250)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-featured--stack .middle-exact-featured__body p,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-region-featured__copy p,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion p,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion small{color:rgb(157,174,193)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion__all,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion__all span,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion b{color:rgb(121,182,255)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion span:not([class]),
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-region-featured__copy > span,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-news-row__copy > span{background:rgba(121,182,255,.14)!important;color:rgb(121,182,255)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-opportunities-v7__place{background:rgba(24,37,52,.88)!important;color:rgb(121,182,255)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-selected-ads__head a{background:rgba(121,182,255,.12)!important;color:rgb(238,244,250)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-selected-ads__head a span{color:rgb(238,244,250)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-selected-ads__head em{color:rgb(121,182,255)!important}

/* «Подвези». */
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-intro,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-filters,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-list,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ride-card,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-more,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-button.is-secondary{background:rgb(24,37,52)!important;border-color:rgb(43,62,82)!important;color:rgb(238,244,250)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-list__head,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ride-card__description,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ride-identity__avatar{background:rgb(30,45,62)!important;border-color:rgb(43,62,82)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ride-card__description,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ride-identity b{color:rgb(238,244,250)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ride-card__direction,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ride-card__date,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ride-card__date i,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-intro span,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-filters span,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-list__head span{color:rgb(157,174,193)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-intro b,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-ride-type-badge{background:rgba(121,182,255,.14)!important;color:rgb(121,182,255)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-more,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-button.is-secondary{color:rgb(121,182,255)!important}

/* Организации. */
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-map-panel__top{background:rgb(24,37,52)!important;border-color:rgb(43,62,82)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-map-panel__top span{color:rgb(157,174,193)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-directory__count{background:rgba(24,37,52,.88)!important;color:rgb(238,244,250)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-directory__count strong{color:rgb(238,244,250)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-card__category,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-map-panel__show-all{background:rgba(121,182,255,.14)!important;color:rgb(121,182,255)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-card__actions a{background:rgba(121,182,255,.12)!important;border-color:rgba(121,182,255,.35)!important;color:rgb(121,182,255)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-card__actions a span{color:rgb(121,182,255)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-card__line a{color:rgb(121,182,255)!important}

/* ---- 0.5.117: тёмная тема — подложки под фото, поиск организаций, подпись доски ---- */
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-life-media,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-news-companion__image,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-featured__media,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-exact-region-featured__media,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-article__image,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-home-ad-card__media,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-lostpets-feature__main-media,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-lostpets-feature__mini-media{background-color:rgb(30,45,62)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-org-search{background:rgba(24,37,52,.92)!important;border-color:rgb(43,62,82)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-selected-sell__copy > span{color:rgb(121,182,255)!important}

/* ---- 0.5.118: тёмная тема — мелкие светлые «таблетки» и значки ---- */
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-opportunities-v7__head a,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-category-head__kicker small,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-category-head__icon,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-opportunity-v7__bottom > i,
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-home-rides-widget__icon{background:rgba(121,182,255,.14)!important;color:rgb(121,182,255)!important;border-color:rgba(121,182,255,.25)!important}
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-home-golden-archive__rail-thumb{background-color:rgb(30,45,62)!important}

/* ---- 0.5.119: тёмная тема — «Официальный Чепецк» на главной, линии в «Подвези», поиск на телефоне ---- */
/* В style.css у блока заданы светлый градиент, тёмный заголовок и светлые даты без тёмного варианта. */
html[data-middle-theme="dark"] body:not(#middle-nav).home .middle-admin-news-home{background:rgb(24,37,52)!important;border-color:rgb(43,62,82)!important;box-shadow:none!important}
html[data-middle-theme="dark"] body:not(#middle-nav).home .middle-admin-news-home__head h2{color:rgb(238,244,250)!important}
html[data-middle-theme="dark"] body:not(#middle-nav).home .middle-admin-news-home__head small{color:rgb(157,174,193)!important}
html[data-middle-theme="dark"] body:not(#middle-nav).home .middle-admin-news-home__seal{background:rgba(121,182,255,.14)!important;border-color:rgba(121,182,255,.25)!important}
html[data-middle-theme="dark"] body:not(#middle-nav).home .middle-admin-news-home .middle-exact-news-row__copy>span{background:rgba(121,182,255,.14)!important;color:rgb(121,182,255)!important}
html[data-middle-theme="dark"] body:not(#middle-nav).home .middle-admin-news-home .middle-exact-featured__media:empty{background:rgb(30,45,62)!important}
/* «Подвези»: разделители между шагами. */
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-rides-intro > span{border-color:rgb(43,62,82)!important}
/* Поиск вверху на телефоне: поле прозрачное внутри тёмной «таблетки» формы. */
html[data-middle-theme="dark"] body:not(#middle-nav) .middle-mobile-sticky-search__form input{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
