.language-tools {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.wizard-language-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
}

.language-toggle,
.language-retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.2s ease;
}

.language-toggle::before {
  content: '';
  width: 14px;
  height: 14px;
  flex: none;
  background: currentColor;
  opacity: 0.75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9S14.5 18.4 12 21c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9S14.5 18.4 12 21c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.language-toggle:hover,
.language-retry:hover {
  border-color: rgba(255, 138, 76, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.language-toggle:active,
.language-retry:active {
  transform: scale(0.96);
}

.language-toggle:focus-visible,
.language-retry:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.language-toggle[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}

.language-feedback {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: 84px;
  max-width: min(440px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
  font-size: 0.85rem;
  animation: language-feedback-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes language-feedback-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.language-feedback:has([data-language-status][hidden]) {
  display: none;
}

.language-feedback p {
  margin: 0;
  overflow-wrap: anywhere;
}

.language-feedback .language-retry {
  flex-shrink: 0;
}

.language-dismiss {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  align-self: flex-start;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

.language-dismiss:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.language-dismiss:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.translation-error {
  color: #ffd9cc;
}

/* Refined toast: warm glass, hairline edge, status glyph, quiet actions */
.language-feedback {
  right: 24px;
  bottom: 24px;
  gap: 14px;
  padding: 14px 12px 14px 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(30, 24, 22, 0.88), rgba(12, 10, 10, 0.9));
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  line-height: 1.6;
}
.language-feedback::before { /* accent edge */
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, var(--orange), transparent);
}
.language-feedback::after { /* soft glow */
  content: '';
  position: absolute;
  inset: auto -40px -60px auto;
  width: 160px;
  height: 120px;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 122, 69, 0.16), transparent);
}
.language-feedback p {
  position: relative;
  padding-left: 22px;
  color: rgba(255, 255, 255, 0.82);
}
.language-feedback p::before { /* spinner while translating */
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--orange);
  animation: toast-spin 0.9s linear infinite;
}
.language-feedback p.translation-error::before { /* error glyph */
  animation: none;
  border: 0;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 122, 69, 0.16), 0 0 14px rgba(255, 122, 69, 0.6);
  width: 6px;
  height: 6px;
  left: 3px;
  top: 0.7em;
}
@keyframes toast-spin { to { transform: rotate(360deg); } }
.language-feedback .language-retry {
  min-height: 32px;
  padding: 6px 15px;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  border-color: rgba(255, 138, 76, 0.4);
  background: rgba(255, 122, 69, 0.1);
  color: #ffd9c7;
}
.language-feedback .language-retry:hover {
  background: rgba(255, 122, 69, 0.22);
  border-color: rgba(255, 138, 76, 0.8);
}
.language-dismiss {
  flex-basis: 28px;
  width: 28px;
  height: 28px;
  align-self: center;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.4);
  transition: background-color 0.25s ease, color 0.25s ease;
}
@media (max-width: 720px) {
  .language-feedback { right: 12px; left: 12px; bottom: 78px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .language-feedback p::before { animation: none; } }

html[lang="en"] .hero-title-line {
  width: auto;
  white-space: normal;
  text-wrap: balance;
}

@media (min-width: 721px) {
  html[lang="en"] .tier-specs li {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}

.admin-language-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

@media (max-width: 720px) {
  .nav-actions {
    gap: 6px;
  }

  .language-toggle {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .language-toggle::before {
    display: none;
  }

  .site-header .brand-name {
    font-size: 0.9rem;
    letter-spacing: 0;
  }

  .site-header .brand-logo {
    width: 32px;
    height: 32px;
  }

  .site-header .brand-block {
    gap: 6px;
  }

  .nav-actions .primary-btn {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 0.78rem;
  }
}
