.page-tools {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  max-width: calc(100vw - 28px);
  pointer-events: none;
}
.page-tools button, .page-tools .guide-launcher { pointer-events: auto; }
.page-tools .guide-launcher {
  position: static;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 100%;
  padding: 4px 5px 4px 4px;
  color: #17191f;
  background: #fff;
  border: 1px solid #dedfe6;
  border-radius: 50px;
  box-shadow: 0 5px 28px #0002;
  text-align: left;
}
.page-tools-guide-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px 9px 16px;
  border-radius: 40px;
  text-decoration: none;
}
.page-tools-guide-link > svg { color: #c90024; flex-shrink: 0; }
.page-tools-guide-link span { font-size: 13px; font-weight: 600; line-height: 1.5; }
.page-tools-guide-link small { display: block; font-size: 12px; font-weight: 400; color: #626675; }
.page-tools-close, .page-tools-top {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font: inherit;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.page-tools-close {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #616674;
  background: #f3f4f6;
}
.page-tools-top {
  flex-direction: column;
  gap: 1px;
  width: 56px;
  height: 56px;
  padding: 6px;
  border: 1px solid #ffffff35;
  border-radius: 18px;
  color: #fff;
  background: #20262e;
  box-shadow: 0 6px 22px #0003;
}
.page-tools-top span { font-size: 10px; font-weight: 600; line-height: 1; }
.page-tools [hidden] { display: none !important; }
.page-tools :is(a, button):focus-visible { outline: 3px solid #c90024; outline-offset: 4px; }
@media (hover: hover) {
  .page-tools-guide-link:hover { background: #fff3f5; }
  .page-tools-close:hover { color: #a0001d; background: #ffe7eb; }
  .page-tools-top:hover { background: #c90024; transform: translateY(-3px); box-shadow: 0 10px 24px #97001d30; }
}
@media (max-width: 640px) {
  .page-tools { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); gap: 10px; }
  .page-tools-guide-link { padding-left: 12px; gap: 9px; }
  .page-tools-top { width: 50px; height: 50px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .page-tools *, .page-tools *::before, .page-tools *::after { transition: none !important; animation: none !important; }
}
