@media (max-width: 768px){
  /* If another plugin outputs a similar reels container, hide it only when OUR feature is active */
  body.jr-mt-fb-active #jr-reels-actions{display:none!important;}

  #jr-mt-actions{
    position:fixed;
    right:10px;
    top:52%;
    transform:translateY(-50%);
    z-index:9999998;
    display:none;
    flex-direction:column;
    gap:14px;
  }
  body.jr-mt-fb-active #jr-mt-actions{display:flex;}

  #jr-mt-actions .jr-mt-btn{
    width:52px;height:52px;
    border-radius:999px;
    border:2px solid #D46A3F;
    background:rgba(0,0,0,.45);
    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);
    box-shadow:0 10px 22px rgba(0,0,0,.18);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    position:relative;
  }
  #jr-mt-actions .jr-mt-btn svg{width:30px;height:30px;}
  #jr-mt-actions .jr-mt-btn svg *{
    stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;fill:none;
  }
  #jr-mt-actions .jr-mt-btn[aria-pressed="true"]{background:rgba(0,0,0,.62);}

  /* Hide panels by default ONLY when our feature is active */
  body.jr-mt-fb-active #jr-media-float,
  body.jr-mt-fb-active #bmca-floating-box,
  body.jr-mt-fb-active aside.jr-htu2-panel,
  body.jr-mt-fb-active aside.jr-mhfb-box.jr-mhfb--memories-help{display:none!important;}

  /* Show centered when open (supports BOTH How-To panels) */
  body.jr-mt-open-media #jr-media-float,
  body.jr-mt-open-completion #bmca-floating-box,
  body.jr-mt-open-howto aside.jr-htu2-panel,
  body.jr-mt-open-howto aside.jr-mhfb-box.jr-mhfb--memories-help{
    display:block!important;
    position:fixed!important;
    left:50%!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    width:min(67vw,520px)!important;
    max-height:86vh!important;
    overflow:auto!important;
    z-index:9999999!important;
    border-radius:22px!important;
    right:auto!important;
  }

  /* v1.0.3: blur the actual background branches, not a backdrop that may
     paint beneath theme stacking contexts. The open panel and right-side
     actions are excluded by the accompanying JavaScript. */
  body.jr-mt-fb-active #jr-mt-blur-backdrop,
  body.jr-mt-fb-active.jr-mt-any-open::before{
    content:none!important;
    display:none!important;
  }
  body.jr-mt-fb-active.jr-mt-any-open .jr-mt-scene-blurred{
    -webkit-filter:blur(3.5px) brightness(.97)!important;
    filter:blur(3.5px) brightness(.97)!important;
    pointer-events:none!important;
  }

  /* Block clicks behind ONLY while a panel is open */
  body.jr-mt-any-open > *:not(#jr-mt-actions):not(#jr-media-float):not(#bmca-floating-box):not(aside.jr-htu2-panel):not(aside.jr-mhfb-box.jr-mhfb--memories-help){pointer-events:none;}
  body.jr-mt-any-open #jr-mt-actions,
  body.jr-mt-any-open #jr-media-float,
  body.jr-mt-any-open #bmca-floating-box,
  body.jr-mt-any-open aside.jr-htu2-panel,
  body.jr-mt-any-open aside.jr-mhfb-box.jr-mhfb--memories-help{pointer-events:auto;}
}

/* v1.0.5 — Closed completion panel must NEVER join the document flow.
   Scope to the mobile Memory Table, not Timeline's own BMFT box. */
@media (max-width: 768px) {
  body.jrmt-premium-redesign-active:not(.jr-mt-open-completion) #bmca-floating-box,
  body.jr-mt-fb-active:not(.jr-mt-open-completion):not(.jr-mt-is-timeline) #bmca-floating-box {
    display: none !important;
    visibility: hidden !important;
  }
  body.jr-mt-fb-active.jr-mt-open-completion:not(.jr-mt-is-timeline) #bmca-floating-box {
    display: block !important;
    visibility: visible !important;
  }
}

/* v1.0.6: #bmft-floating-box is a *different* floating table-summary
   provider from the #bmca-floating-box bookmark popout. On Memory Table
   pages it must not render below the footer. Keep BMFT on Timeline pages. */
@media (max-width:768px) {
 body.jrmt-premium-redesign-active:not(.jr-mt-is-timeline) #bmft-floating-box,
 body.jr-mt-fb-active:not(.jr-mt-is-timeline) #bmft-floating-box,
 body.jrmt-premium-redesign-active [data-jr-mt-orphan-summary="1"] {
    display:none !important;
    visibility:hidden !important;
 }
}
