#page-tools { --tool-pink: #f990ae; --tool-border: #eee9e9; }
.page-tools { position: fixed; z-index: 12; right: max(4px, env(safe-area-inset-right)); top: 73.5%; transform: translateY(-50%); display: grid; justify-items: end; gap: 10px; font: 14px/1.4 "Open Sans", Arial, sans-serif; color: #292a2b; }
.page-tool-button { appearance: none; display: grid; place-items: center; position: relative; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: white; color: var(--tool-pink); box-shadow: 0 1px 11px rgb(135 120 124 / 13%); cursor: pointer; }
.page-tool-button::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; }
.page-tool-button:hover, .page-tool-button[aria-expanded="true"] { background: #fff5f8; }
.page-tool-button:focus-visible, .page-tool-panel :is(a,button):focus-visible { outline: 2px solid #835c37; outline-offset: 2px; }
.page-tool-button svg { display: block; width: 19px; height: 19px; }
.language-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: white; background: var(--tool-pink); }
.language-icon svg { width: 18px; height: 18px; stroke-width: 2; }
.page-tool-panel { position: absolute; right: calc(100% + 8px); width: max-content; min-width: 150px; max-width: min(205px, calc(100vw - 66px)); padding: 6px; border: 1px solid var(--tool-border); border-radius: 7px; background: white; box-shadow: 0 4px 18px rgb(26 15 17 / 13%); }
.page-tool-panel[hidden] { display: none !important; }
#shortcut-panel { top: 0; }
#language-panel { bottom: 0; }
.page-tool-panel :is(a,button) { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; min-height: 39px; padding: 8px 10px; border: 0; border-radius: 3px; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.page-tool-panel :is(a,button):hover { background: #f5f1ec; }
.page-tool-panel button[aria-pressed="true"]::after { content: "✓"; color: #795d39; }
.page-tool-heading { padding: 6px 10px; color: #65605a; font-size: 13px; }
@media (max-width: 700px) {
  .page-tools { right: max(3px, env(safe-area-inset-right)); top: auto; bottom: max(14px, env(safe-area-inset-bottom)); transform: none; }
  #shortcut-panel { top: auto; bottom: 0; }
}
@media (max-height: 460px) {
  .page-tools { top: auto; bottom: 15px; transform: none; }
  #shortcut-panel { top: auto; bottom: 0; }
}
@media print { .page-tools { display: none; } }
