/* KeyMax Sentinel FAB — floating action button. Navy #1e3a8a + Gold #fbbf24. */
#km-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1e3a8a;
  color: #fbbf24;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.35), 0 2px 6px rgba(0,0,0,0.15);
  z-index: 2147483640;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
#km-fab:hover, #km-fab:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.45), 0 4px 10px rgba(0,0,0,0.2);
  outline: none;
}
#km-fab:active { transform: translateY(0); }
#km-fab.km-fab-open { background: #fbbf24; color: #1e3a8a; transform: rotate(45deg); }
#km-fab svg { width: 28px; height: 28px; fill: currentColor; transition: transform 180ms ease; }

#km-fab-menu {
  position: fixed;
  bottom: 94px;
  right: 22px;
  z-index: 2147483639;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}
#km-fab-menu.km-fab-visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.km-fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: #1e3a8a;
  border: 1px solid #e2e8f0;
  padding: 10px 14px 10px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  transition: transform 120ms ease, background 120ms ease;
  cursor: pointer;
}
.km-fab-item:hover { background: #fbbf24; color: #1e3a8a; transform: translateX(-2px); }
.km-fab-item .km-fab-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e3a8a;
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.km-fab-item .km-fab-ico svg { width: 16px; height: 16px; fill: currentColor; }

#km-fab-backdrop {
  position: fixed; inset: 0;
  background: transparent;
  z-index: 2147483638;
  display: none;
}
#km-fab-backdrop.km-fab-visible { display: block; }

@media (max-width: 480px) {
  #km-fab { bottom: 18px; right: 18px; width: 54px; height: 54px; }
  #km-fab-menu { bottom: 84px; right: 18px; }
  .km-fab-item { font-size: 13px; padding: 9px 14px 9px 10px; }
}
@media print { #km-fab, #km-fab-menu, #km-fab-backdrop { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  #km-fab, #km-fab-menu, .km-fab-item { transition: none; }
}