.smirel-language-toggle {
  position: fixed;
  right: clamp(16px, 2.2vw, 30px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(16px, 2.4vh, 26px));
  z-index: 60;
  min-width: 46px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(4, 8, 14, .42);
  color: rgba(245, 249, 255, .72);
  -webkit-backdrop-filter: blur(14px) saturate(118%);
  backdrop-filter: blur(14px) saturate(118%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 8px 26px rgba(0,0,0,.22);
  font: 650 10px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .08em;
  cursor: pointer;
  opacity: .82;
  transition: opacity .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, background .2s ease;
}

.smirel-language-toggle:hover,
.smirel-language-toggle:focus-visible {
  opacity: 1;
  color: #fff;
  border-color: rgba(255,255,255,.34);
  background: rgba(7, 12, 20, .58);
  transform: translateY(-1px);
  outline: none;
}

.smirel-language-toggle:active {
  transform: translateY(0) scale(.97);
}

/* Project overview owns the lower-right corner. On medium and mobile layouts the
   switch remains above the detail action; desktop uses a shared horizontal dock. */
body:has(.star-detail-shell[data-star-kind="project"][aria-hidden="false"]) .smirel-language-toggle {
  bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(86px, 10vh, 108px));
}

@media (min-width: 1181px) {
  body:has(.star-detail-shell[data-star-kind="project"][aria-hidden="false"]) .smirel-language-toggle {
    right: calc(clamp(46px, 4.4vw, 76px) + 232px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(34px, 4.5vh, 48px));
    min-width: 50px;
    width: 50px;
    height: 50px;
    padding: 0;
    border-color: rgba(255,255,255,.14);
    border-radius: 15px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
      rgba(4,7,12,.38);
    color: rgba(245,249,255,.74);
    -webkit-backdrop-filter: blur(15px) saturate(118%);
    backdrop-filter: blur(15px) saturate(118%);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.07),
      0 14px 36px rgba(0,0,0,.24);
    opacity: 1;
    font-size: 9.5px;
    letter-spacing: .09em;
  }

  body:has(.star-detail-shell[data-star-kind="project"][aria-hidden="false"]) .smirel-language-toggle:hover,
  body:has(.star-detail-shell[data-star-kind="project"][aria-hidden="false"]) .smirel-language-toggle:focus-visible {
    border-color: rgba(255,255,255,.26);
    background:
      linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.026)),
      rgba(5,9,15,.46);
    color: #fff;
    transform: translateY(-1px);
  }
}

@media (min-width: 1181px) and (max-height: 820px) {
  body:has(.star-detail-shell[data-star-kind="project"][aria-hidden="false"]) .smirel-language-toggle {
    height: 46px;
    min-width: 46px;
    width: 46px;
    right: calc(clamp(46px, 4.4vw, 76px) + 232px);
  }
}

@media (max-width: 620px) {
  .smirel-language-toggle {
    right: 14px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    min-width: 44px;
    height: 30px;
    padding-inline: 10px;
    font-size: 9px;
  }

  body:has(.star-detail-shell[data-star-kind="project"][aria-hidden="false"]) .smirel-language-toggle {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 66px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .smirel-language-toggle {
    transition-duration: .01ms !important;
  }
}
