/* Brand-matched floating actions; navigation and modal behavior stay in the existing scripts. */
.chp-theme button.back-top,
.chp-theme.chp-support-present button.back-top {
  display:grid;
  place-items:center;
  position:fixed;
  right:max(24px,env(safe-area-inset-right,0px));
  left:auto;
  bottom:calc(24px + env(safe-area-inset-bottom,0px));
  z-index:151;
  width:48px;
  height:48px;
  min-height:44px;
  margin:0;
  padding:11px;
  border:1px solid #ddc99e;
  border-radius:13px;
  background:#fffdf8;
  color:#c81025;
  box-shadow:0 5px 18px #26324912;
  font-size:25px;
  line-height:1;
  transition:background .2s,color .2s,border-color .2s,box-shadow .2s,transform .2s;
}
.chp-theme button.back-top svg {
  display:block;
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.chp-theme button.back-top:hover {
  background:#c81025;
  border-color:#c81025;
  color:#fff;
  box-shadow:0 7px 20px #c8102520;
  transform:translateY(-2px);
}
.chp-theme button.back-top:focus-visible,
.chp-theme .reference-support-bubble:focus-visible {
  outline:3px solid #c7a153;
  outline-offset:4px;
}
.chp-theme button.back-top[hidden] { display:none!important; }

@media(min-width:768px) {
  .chp-theme .reference-support {
    left:max(24px,env(safe-area-inset-left,0px));
    right:auto;
    bottom:calc(24px + env(safe-area-inset-bottom,0px));
  }
  .chp-theme .reference-support-bubble {
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    width:auto;
    min-width:110px;
    min-height:52px;
    height:auto;
    padding:12px 15px;
    border:1px solid #bd1024;
    border-radius:28px;
    background:#ce1025;
    color:#fff;
    box-shadow:0 5px 17px #b80f2330;
    transition:background .2s,box-shadow .2s;
    isolation:isolate;
  }
  .chp-theme .reference-support-bubble::after {
    content:"";
    position:absolute;
    inset:-5px;
    border:1px solid #ce102547;
    border-radius:inherit;
    pointer-events:none;
    animation:floating-support-glow 4.2s ease-out infinite;
  }
  .chp-theme .reference-support-bubble svg { width:24px;height:24px;flex:none; }
  .chp-theme .reference-support-label { display:inline;font-size:14px;font-weight:750;line-height:1.5;white-space:nowrap; }
  .chp-theme .reference-support-bubble:hover,
  .chp-theme .reference-support-bubble:focus-visible { background:#b70e21;box-shadow:0 7px 20px #b80f2338; }
  .chp-theme .reference-support-bubble:hover::after,
  .chp-theme .reference-support-bubble:focus-visible::after,
  .chp-theme .reference-support-bubble[aria-expanded=true]::after { animation:none;opacity:0; }
  .chp-theme .reference-support-panel { left:0;right:auto;bottom:72px; }
}

@media(max-width:767px) {
  .chp-theme .reference-support-label { display:none; }
  .chp-theme button.back-top,
  .chp-theme.chp-support-present button.back-top,
  .chp-theme.support-mobile-enabled button.back-top,
  .chp-theme.chp-support-present.support-mobile-enabled button.back-top {
    display:grid;
    right:max(12px,env(safe-area-inset-right,0px));
    bottom:calc(16px + env(safe-area-inset-bottom,0px));
    width:44px;
    height:44px;
    border-radius:12px;
    padding:10px;
  }
  .chp-theme.support-mobile-enabled button.back-top,
  .chp-theme.chp-support-present.support-mobile-enabled button.back-top { bottom:calc(84px + env(safe-area-inset-bottom,0px)); }
  body.support-input-active button.back-top,
  body.support-nav-open button.back-top,
  body.support-sheet-open button.back-top { display:none!important; }
}

@keyframes floating-support-glow {
  0%,35% { opacity:0;transform:scale(.97); }
  45% { opacity:.6;transform:scale(1); }
  72%,100% { opacity:0;transform:scale(1.1); }
}
@media(prefers-reduced-motion:reduce) {
  .chp-theme button.back-top,
  .chp-theme .reference-support-bubble { transition:none; }
  .chp-theme button.back-top:hover { transform:none; }
  .chp-theme .reference-support-bubble::after { animation:none;display:none; }
}
