#nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--nav-h);
  background: rgba(22, 24, 32, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  gap: 0;
  z-index: 100;
}
#nav::-webkit-scrollbar { display: none; }
[data-theme="light"] #nav { background: rgba(238,238,232,0.92); }

.nav-btn {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--text3);
  font-family: var(--sans);
  font-size: 0.667rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}
.nav-btn svg { width: 22px; height: 22px; stroke-width: 1.5; }
.nav-btn.active { color: var(--accent); }
.nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

#fab {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  right: calc(50% - 215px + 16px);
  width: 52px; height: 52px;
  background: var(--accent); border: none; border-radius: 16px;
  color: #0f1117; font-size: 1.733rem; display: flex;
  align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 24px rgba(200,240,90,0.35);
  z-index: 90; transition: transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
#fab:active { transform: scale(0.93); box-shadow: 0 2px 12px rgba(200,240,90,0.25); }
[data-theme="light"] #fab { box-shadow: 0 4px 24px rgba(90,158,15,0.3); }

#btn-tema-flotante {
  position: fixed;
  top: 16px;
  right: calc(50% - 215px + 16px);
  width: 38px; height: 38px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--text2);
  font-size: 1.133rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
#btn-tema-flotante:active { transform: scale(0.93); opacity: 0.8; }