:where(.yd-layout) .yn-consult-orb {
  display: none;
}

@media (min-width: 1024px) {
  :where(.yd-layout) {
    --yn-orb-size: clamp(84px, 7.2vw, 108px);
    --yn-orb-edge: clamp(14px, 2vw, 32px);
  }

  :where(.yd-layout) .yn-consult-orb {
    position: fixed;
    z-index: 30;
    right: var(--yn-orb-edge);
    bottom: max(22px, env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    width: var(--yn-orb-size);
    aspect-ratio: 1;
    border-radius: 50%;
    /* Frame the round upper-left droplet from the FAQ artwork. */
    background: url("assets/よくある質問_小さなガラス球.webp") 20.4% 27.5% / 369% 383% no-repeat;
    box-shadow: 0 5px 15px #34507a26;
    color: #24364c;
    font: 700 14px/1.3 "Noto Sans JP", sans-serif;
    text-decoration: none;
  }

  :where(.yd-layout) .yn-consult-orb span {
    color: #172439;
    text-shadow: 0 0 5px #ffffffb3;
    white-space: nowrap;
  }

  :where(.yd-layout) .yn-consult-orb:hover {
    box-shadow: 0 7px 20px #34507a66;
    text-decoration: none;
  }

  :where(.yd-layout) .yn-consult-orb:focus-visible {
    outline: 2px solid #2d4867;
    outline-offset: 4px;
  }
}

@media (max-width: 680px) {
  :where(.yd-layout) .yn-consult-orb {
    position: fixed;
    visibility: hidden;
    z-index: 30;
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: url("assets/よくある質問_小さなガラス球.webp") 20.4% 27.5% / 369% 383% no-repeat;
    box-shadow: 0 4px 12px #34507a38;
    color: #172439;
    font: 700 12px/1.3 "Noto Sans JP", sans-serif;
    text-decoration: none;
  }

  :where(.yd-layout) .yn-consult-orb.is-past-intro {visibility: visible}

  :where(.yd-layout) .yn-consult-orb span {
    white-space: nowrap;
    text-shadow: 0 0 5px #fff;
  }

  :where(.yd-layout) .yn-consult-orb:focus-visible {
    outline: 2px solid #2d4867;
    outline-offset: 4px;
  }
}
/* Leave space above the theme’s back-to-top control when it is shown. */
html[data-scrolled="true"] :where(#body_wrap:has(> .p-fixBtnWrap #pagetop) .yd-layout) .yn-consult-orb {
  bottom: calc(106px + env(safe-area-inset-bottom, 0px));
}
html[data-scrolled="true"] :where(#body_wrap:has(> #fix_bottom_menu + .p-fixBtnWrap #pagetop) .yd-layout) .yn-consult-orb {
  bottom: calc(130px + env(safe-area-inset-bottom, 0px));
}
