/* A translated skip link can be taller than a fixed negative top offset. */
.premium-body .skip { top: 0; transform: translateY(calc(-100% - 1rem)); max-width: calc(100vw - 2rem); }
.premium-body .skip:focus { top: 1rem; transform: none; }
.royal-topbar > .header-preferences {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  max-width: 100%;
}
.header-preferences > .appearance-controls { display: contents; }
.locale-control { flex: 0 0 auto; }
.locale-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 62px;
  min-height: 44px;
  padding: 7px 9px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text, var(--ink));
  background: var(--soft, var(--surface));
  box-shadow: none;
  cursor: pointer;
  line-height: 1;
}
.locale-trigger svg {
  width: 18px; height: 18px; flex: 0 0 18px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
}
.locale-code {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(12px, .75rem, 16px);
  font-weight: 600;
  letter-spacing: .025em;
}
.locale-trigger:hover, .locale-trigger[aria-expanded="true"] { background: var(--panel, var(--surface)); }
.locale-trigger:focus-visible, .locale-menu button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.locale-menu {
  position: fixed;
  z-index: 1250;
  width: min(17rem, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text, var(--ink));
  background: var(--panel, var(--surface));
  box-shadow: 0 8px 30px #00000020;
}
.locale-menu[hidden] { display: none; }
.locale-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%; min-height: 44px;
  padding: 10px 12px; margin: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  color: inherit; background: transparent;
  box-shadow: none;
  font: inherit; font-size: .9375rem; line-height: 1.4; text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.locale-menu button:hover, .locale-menu button:focus-visible { background: var(--soft, var(--surface)); }
.locale-menu button[aria-checked="true"] { background: var(--soft, var(--surface)); font-weight: 600; }
.locale-check { flex: 0 0 auto; visibility: hidden; }
[aria-checked="true"] > .locale-check { visibility: visible; }
@media (max-width: 1200px) { .royal-topbar > .header-preferences { margin-left: 0; } }
@media (max-width: 600px) {
  .royal-topbar > .header-preferences { margin-inline: auto; justify-content: center; }
  .locale-trigger { min-width: 58px; padding-inline: 7px; }
}
