/* 桌面独立悬浮按钮；移动端保留触摸展开，二维码图片使用原始文件。 */
.side-tools {
  position: fixed;
  z-index: 35;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 62px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-tool { position: relative; }
.side-tool summary,
.back-to-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 68px;
  padding: 10px 0;
  color: #53685e;
  background: #fffffffa;
  border: 1px solid #dae4dd;
  border-radius: 16px;
  box-shadow: 0 6px 22px #0f5c530c;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
  transition: background .18s, color .18s, border-color .18s;
}
.side-tool summary::-webkit-details-marker { display: none; }
.side-tool summary::marker { content: ''; }
.side-tool summary .icon,
.back-to-top .icon { width: 22px; height: 22px; }
.side-tool[open] summary,
.side-tool summary:hover,
.back-to-top:hover { color: var(--green); background: #eaf2ec; border-color: #aec9bd; }
.tool-panel {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  width: 288px;
  padding: 27px 24px 22px;
  text-align: center;
  background: white;
  border: 1px solid #dce5de;
  box-shadow: 0 12px 48px #193f3020;
  border-radius: 18px;
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
}
/* A transparent bridge keeps the panel open as the pointer crosses the gap. */
.side-tool[open]::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 0;
  width: 14px;
  height: 100%;
}
.tool-panel h2 { font-size: 20px; letter-spacing: 0; margin: 8px 0 16px; }
.tool-panel img { display: block; width: 218px; height: auto; margin: 0 auto 16px; }
.tool-panel p { font-size: 14px; line-height: 1.7; }
.tool-panel .text-link { font-size: 14px; margin-top: 14px; gap: 6px; }
.tool-panel .text-link .icon { width: 15px; height: 15px; }
.tool-phone { color: var(--green); display: block; font-size: 25px; font-weight: 600; letter-spacing: .02em; margin: 12px 0 8px; }
.tool-close { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.tool-close .icon { width: 17px; height: 17px; }
.tool-close:hover { background: var(--pale-green); }
.phone-panel .eyebrow { margin: 8px 0; font-size: 13px; }
@media (max-width: 900px) {
  .side-tools {
    top: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
    right: 14px;
    transform: none;
    width: auto;
    flex-direction: row;
    gap: 7px;
  }
  .side-tool { position: static; }
  .side-tool summary,
  .back-to-top { min-width: 56px; min-height: 55px; padding: 7px 9px; gap: 3px; border-radius: 14px; }
  .side-tool summary .icon,
  .back-to-top .icon { width: 20px; height: 20px; }
  .side-tool[open]::before { display: none; }
  .tool-panel { top: auto; bottom: calc(100% + 12px); right: 0; transform: none; max-width: calc(100vw - 28px); max-height: calc(100dvh - 165px); }
}
@media (max-width: 370px) {
  .side-tools { right: 10px; }
  .tool-panel { width: 278px; }
}
@media (prefers-reduced-motion: reduce) {
  .side-tool summary, .back-to-top { transition: none; }
}
@media print { .side-tools { display: none; } }
