
html[data-page-theme] body #v10-page-tools {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

html[data-page-theme] body #v10-page-tools[hidden] {
  display: none !important;
}

html[data-page-theme] body #v10-theme-toggle,
html[data-page-theme] body #v10-help-toggle {
  position: static !important;
  inset: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  box-sizing: border-box;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

html[data-page-theme] body #v10-theme-toggle[hidden],
html[data-page-theme] body #v10-help-toggle[hidden] {
  display: none !important;
}

html[data-page-theme] body #v10-theme-toggle > span:last-child,
html[data-page-theme] body #v10-help-toggle > span:last-child {
  display: none !important;
}

html[data-page-theme] body #v10-help-toggle .help-icon {
  display: grid !important;
  place-items: center;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font: 600 24px/1 inherit;
  font-family: inherit !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

html[data-page-theme] body #v10-theme-toggle .v10-theme-symbol {
  display: block !important;
  position: relative;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

html[data-page-theme] body #v10-theme-toggle .v10-theme-symbol svg {
  display: block !important;
  position: absolute;
  inset: 0;
  width: 24px !important;
  height: 24px !important;
  pointer-events: none;
  transform-origin: center;
  transition: opacity 250ms ease, transform 250ms ease;
}

html[data-page-theme="dark"] body #v10-theme-toggle .v10-theme-sun,
html[data-page-theme="light"] body #v10-theme-toggle .v10-theme-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

html[data-page-theme="light"] body #v10-theme-toggle .v10-theme-sun {
  opacity: 0;
  transform: rotate(90deg) scale(.5);
}

html[data-page-theme="dark"] body #v10-theme-toggle .v10-theme-moon {
  opacity: 0;
  transform: rotate(-70deg) scale(.5);
}

html[data-page-theme] body #v10-help-panel {
  bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  max-height: calc(100vh - 100px) !important;
  max-height: calc(100dvh - 100px) !important;
}

@media (max-width: 980px), (pointer: coarse) {
  html[data-page-theme] body #v10-page-tools {
    position: static !important;
    margin: 18px auto 0;
    width: max-content;
  }

  html[data-page-theme] body #v10-help-panel {
    left: max(12px, env(safe-area-inset-left)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    width: 460px !important;
    max-width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)) !important;
    max-height: calc(100vh - 32px - env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 32px - env(safe-area-inset-bottom)) !important;
    margin-inline: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-page-theme] body #v10-theme-toggle .v10-theme-symbol svg {
    transition: none !important;
  }
}
