:root {
  --header-glass-bg: rgba(237, 244, 248, 0.72);
  --header-glass-border: rgba(255, 255, 255, 0.78);
  --header-glass-shadow: 0 8px 26px rgba(24, 43, 61, 0.07);
}

html body .lang-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 4px;
  padding: 10px 12px;
  background: var(--header-glass-bg);
  border-bottom: 1px solid var(--header-glass-border);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

html body .lang-switcher .nav-container {
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 4px;
  height: auto;
  padding: 0 12px;
}

.lang-btn {
  margin: 0 8px;
  padding: 4px 2px;
}

html body nav {
  background: var(--header-glass-bg);
  border-bottom: 1px solid var(--header-glass-border);
  box-shadow: var(--header-glass-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
}

html body nav.scrolled {
  background: rgba(244, 248, 251, 0.86);
}

.portal-float-button {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 1100;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(0, 86, 210, 0.86);
  box-shadow: 0 8px 26px rgba(0, 53, 126, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.portal-float-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.portal-float-button::before {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  background: rgba(24, 39, 55, 0.86);
  color: #fff;
  content: attr(title);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.portal-float-button:hover {
  background: rgba(0, 70, 176, 0.96);
  box-shadow: 0 11px 30px rgba(0, 53, 126, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transform: translateY(-2px);
}

.portal-float-button:hover::before,
.portal-float-button:focus-visible::before {
  opacity: 1;
  transform: translate(0, -50%);
}

.portal-float-button:focus-visible {
  outline: 3px solid rgba(0, 86, 210, 0.28);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .portal-float-button {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 900px) {
  html body nav ul.nav-links {
    background: rgba(239, 245, 249, 0.9);
    border-bottom: 1px solid var(--header-glass-border);
    box-shadow: var(--header-glass-shadow);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
  }
}