.header-tools {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 14px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong, var(--line, #34405f));
  border-radius: 999px;
  color: var(--muted, var(--mute, #7e8aae));
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 12px;
  line-height: 1;
  letter-spacing: .04em;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.language-switch:hover,
.language-switch:focus-visible {
  border-color: var(--gold, var(--v, #ffc163));
  background: color-mix(in srgb, var(--surface, var(--deep, #0a0e1c)) 78%, transparent);
  color: var(--text, var(--bright, #eef3ff));
}

.language-switch strong {
  color: var(--text, var(--bright, #eef3ff));
  font-weight: 650;
}

.english-preview .home-intro h1 {
  max-width: 9ch;
  font-size: clamp(58px, 7.2vw, 108px);
  letter-spacing: -.055em;
  line-height: .92;
}

.english-preview .home-lead {
  max-width: 38rem;
}

.english-preview .article-card-title,
.english-preview .article-header h1 {
  text-wrap: balance;
}

.english-preview .article-body,
.english-preview .article-subtitle,
.english-preview .article-preview {
  text-wrap: pretty;
}

.english-preview .article-header {
  position: relative;
  padding-top: clamp(102px, 10vw, 138px);
}

.article-ai-corner {
  position: absolute;
  top: 22px;
  right: 0;
  width: min(290px, 35vw);
  padding: 12px 14px 13px;
  border-top: 1px solid var(--gold, var(--v, #ffc163));
  border-bottom: 1px solid var(--line, #1e2740);
  background: color-mix(in srgb, var(--surface, var(--deep, #0a0e1c)) 76%, transparent);
  color: var(--muted, var(--mute, #7e8aae));
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 11px;
  line-height: 1.55;
  text-align: left;
}

.article-ai-corner > span {
  display: block;
  margin-bottom: 4px;
  color: var(--gold, var(--v, #ffc163));
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .15em;
}

.article-ai-corner p {
  margin: 0;
}

.article-ai-corner a {
  color: var(--text, var(--bright, #eef3ff));
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--gold, var(--v, #ffc163)) 58%, transparent);
  text-underline-offset: 3px;
}

.generic-share-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.generic-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong, var(--line, #34405f));
  border-radius: 2px;
  background: color-mix(in srgb, var(--bg, var(--void, #05070f)) 68%, transparent);
  color: var(--muted, var(--mute, #7e8aae));
  font: 500 13px/1 var(--sans, system-ui, sans-serif);
  letter-spacing: .02em;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.generic-share-button--copy {
  border-color: color-mix(in srgb, var(--gold, var(--v, #ffc163)) 48%, var(--line-strong, var(--line, #34405f)));
  color: var(--text, var(--bright, #eef3ff));
}

.generic-share-button:hover,
.generic-share-button:focus-visible {
  border-color: var(--gold, var(--v, #ffc163));
  background: color-mix(in srgb, var(--surface, var(--deep, #0a0e1c)) 82%, transparent);
  color: var(--text, var(--bright, #eef3ff));
}

.article-ai-corner--standalone {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 76px);
  right: calc(env(safe-area-inset-right, 0px) + 16px);
  z-index: 900;
  width: min(300px, calc(100vw - 32px));
}

.english-preview .guma-lyrics-copy p {
  white-space: pre-line;
}

@media (max-width: 760px) {
  .header-tools {
    gap: 7px;
  }

  .language-switch {
    min-height: 38px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .english-preview .site-header .theme-toggle {
    gap: 5px;
  }

  .english-preview .site-header .theme-divider {
    width: 10px;
  }

  .english-preview .home-intro h1 {
    max-width: 8ch;
    font-size: clamp(52px, 16vw, 76px);
  }

  .english-preview .article-header {
    padding-top: 78px;
  }

  .article-ai-corner {
    position: static;
    width: 100%;
    margin: 0 0 24px;
  }

  .article-ai-corner--standalone {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 70px);
    right: 12px;
    width: min(280px, calc(100vw - 24px));
    margin: 0;
  }

  .generic-share-actions {
    gap: 6px;
  }

  .generic-share-button {
    min-width: 66px;
    min-height: 42px;
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .english-preview .theme-toggle span:not(.theme-divider) {
    font-size: 0;
  }

  .english-preview .theme-toggle span:first-child::after {
    content: "◐";
    font-size: 15px;
  }

  .english-preview .theme-divider,
  .english-preview .theme-toggle span:last-child {
    display: none;
  }
}
