.language-settings-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

body.language-choice-open {
  overflow: hidden;
}

.language-settings-button:hover,
.language-settings-button:focus-visible {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.language-settings-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-chooser {
  width: min(680px, calc(100% - 24px));
  max-height: min(820px, calc(100dvh - 24px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(7, 22, 18, 0.34);
}

.language-chooser::backdrop {
  background: rgba(7, 22, 18, 0.67);
  backdrop-filter: blur(5px);
}

.language-chooser-panel {
  padding: clamp(22px, 5vw, 38px);
}

.language-chooser-eyebrow {
  margin: 0 0 12px;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-chooser h1 {
  margin: 0;
  font-size: clamp(1.65rem, 6vw, 2.35rem);
  line-height: 1.12;
}

.language-chooser-question {
  margin: 12px 0 0;
  font-size: 1.03rem;
  font-weight: 700;
}

.language-chooser-hint {
  min-height: 2.8em;
  margin: 8px 0 20px;
  color: var(--muted);
  line-height: 1.45;
}

.language-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.language-option {
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
}

.language-option:hover,
.language-option:focus-visible {
  border-color: var(--brand);
}

.language-option.is-selected {
  border-color: var(--brand-strong);
  background: var(--brand-soft);
  color: var(--brand-strong);
  box-shadow: inset 0 0 0 1px var(--brand-strong);
}

.language-chooser-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.language-confirm,
.language-cancel {
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.language-confirm {
  border: 1px solid var(--brand-strong);
  background: var(--brand-strong);
  color: white;
}

.language-cancel {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

@media (max-width: 560px) {
  .language-settings-button {
    width: 44px;
    padding-inline: 0;
  }

  .language-settings-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .header-actions .refresh-button {
    width: 44px;
    min-width: 44px;
    padding-inline: 0;
  }

  .header-actions .refresh-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .language-options {
    grid-template-columns: 1fr;
  }

  .language-chooser-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .language-confirm,
  .language-cancel {
    width: 100%;
  }
}

@media (max-width: 374px) {
  .site-header:not(.bus-page-header) .brand-copy {
    display: none;
  }
}

@media (max-width: 600px) {
  .bus-page-header .bus-page-brand {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-chooser::backdrop {
    backdrop-filter: none;
  }
}
