.header-language-slot {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
}

.hero-language-slot {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 1.5rem;
}

/* ==========================================================
   Globo — seletor de idioma (design system, componente Globo)
   O globo de pontos de luz e o código da língua dentro de um
   contorno, sem fundo, sem vidro, sem sombra. Ao abrir, o próprio
   contorno cresce para baixo e mostra as línguas só pelas iniciais.
   Só tokens: line, radius-lg, control-height, text-soft, text,
   accent, accent-dark, luz-*, duration-quick, easing-calm.
   ========================================================== */
.lang-globo {
  --globo-core: var(--accent);
  --globo-mid: var(--accent-dark);
  --globo-edge: var(--accent-dark);
  position: relative;
  flex-shrink: 0;
  width: 84px;
  height: var(--control-height);
  z-index: 6;
}

:is(html, body):is(.theme-sunset, .theme-evening, .theme-night, .theme-warm-night, .theme-sleep, .theme-late-night, .theme-luz) .lang-globo {
  --globo-core: var(--luz-glow-core);
  --globo-mid: var(--luz-glow-mid);
  --globo-edge: var(--luz-gold);
}

/* O contorno é o único elemento visível: cresce para baixo, nunca para os lados. */
.lang-globo-frame {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  box-sizing: border-box;
  height: var(--control-height);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text-soft);
  transition: height var(--duration-quick) var(--easing-calm),
    color var(--duration-quick) var(--easing-calm);
}

/* Aberto: o contorno ganha o fundo do tema, para as línguas não se misturarem com a página. */
.lang-globo.is-open .lang-globo-frame {
  height: calc(var(--control-height) * 6);
  color: var(--text);
  background: var(--bg-soft);
  box-shadow: var(--shadow-card);
}

@media (hover: hover) and (pointer: fine) {
  .lang-globo:hover .lang-globo-frame {
    color: var(--text);
  }
}

.lang-globo-trigger {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-sizing: border-box;
  width: 100%;
  height: calc(var(--control-height) - 2px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.lang-globo-mark {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.lang-globo-current {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
}

.lang-globo-options {
  display: grid;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--duration-quick) var(--easing-calm),
    visibility 0s linear var(--duration-quick);
}

.lang-globo.is-open .lang-globo-options {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.lang-globo-options button {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: calc(var(--control-height) - 2px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color var(--duration-quick) var(--easing-calm);
}

.lang-globo-options {
  padding: 0 6px 6px;
}

.lang-globo-options button {
  border-radius: var(--radius-sm);
}

.lang-globo-options button:hover,
.lang-globo-options button:focus-visible {
  background: var(--surface-strong);
  color: var(--text);
}

/* A língua atual: cor de destaque e um fundo suave, para se ver bem qual está escolhida. */
.lang-globo-options button.is-active,
.lang-globo-options button.is-active:hover {
  background: var(--surface-strong);
  color: var(--accent-dark);
}

.lang-globo-trigger:focus-visible,
.lang-globo-options button:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .lang-globo-frame,
  .lang-globo-options,
  .lang-globo-options button {
    transition: none;
  }
}


:root:lang(ru),
html[lang="ru"],
html[lang="ru"] body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Noto Sans Cyrillic", Arial, sans-serif;
}

html[lang="ru"] h1,
html[lang="ru"] h2,
html[lang="ru"] h3,
html[lang="ru"] .hero-title,
html[lang="ru"] .section-title {
  letter-spacing: -0.025em;
  line-height: 1.08;
}

html[lang="ru"] p,
html[lang="ru"] .hero-subtitle,
html[lang="ru"] .meditation-instruction {
  line-height: 1.65;
}

html[lang="ru"] .eyebrow,
html[lang="ru"] .meditation-label {
  letter-spacing: 0.08em;
}

@media (max-width: 720px) {
  .hero-language-slot {
    justify-content: center;
    width: 100%;
  }
}


/* Aviso: meditações guiadas só em português (escondido quando o site está em PT) */
.audio-language-note {
  max-width: 34ch;
  margin: 0.2rem auto 0;
  color: var(--text-soft, rgba(84, 94, 95, 0.92));
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

html[lang="pt"] [data-audio-lang-note],
html[lang="pt"] [data-pt-only-note] {
  display: none;
}
