/* The on-page language palette has no hidden pages. The welcome rail stays
   separate so the first-visit gesture keeps its continuous selection lens. */
#panel.language-panel {
  box-sizing:border-box;
  padding:10px 12px 12px;
}
#panel.language-panel .panel-top { margin-block-end:7px; }
.locale-palette {
  display:grid;
  grid-template-columns:repeat(var(--locale-columns,2),minmax(max-content,1fr));
  align-items:stretch;
  gap:8px;
}
#panel.language-panel .locale-palette .lang-option {
  position:relative;
  display:grid;
  grid-template:1fr / minmax(0,1fr);
  place-items:center;
  place-content:center;
  box-sizing:border-box;
  min-inline-size:0;
  min-block-size:var(--control);
  margin:0;
  border:1px solid var(--liquid-ink);
  background:var(--liquid-fill);
  padding:.29em .6em;
  text-align:center;
  font:550 .9rem/1.25 var(--sans);
  color:var(--ink);
  white-space:nowrap;
  touch-action:pan-y;
}
.locale-palette bdi { display:block; inline-size:max-content; }
#panel.language-panel .locale-palette .lang-option[aria-pressed=true] {
  border-color:var(--gold);
  background:var(--liquid-accent);
  box-shadow:var(--liquid-rim);
  text-decoration:underline;
  text-underline-offset:.2em;
}
#panel.language-panel .locale-palette .lang-option:focus-visible { outline-offset:-3px; }
#panel.language-panel .locale-palette .lang-option[data-contact] {background:var(--liquid-accent);}
:root[data-touch=true] .locale-palette .lang-option,
:root[data-large=true] .locale-palette .lang-option {min-block-size:52px;}
#panel.language-panel #closePanel {
  background:var(--liquid-fill);
  border:1px solid var(--liquid-ink);
  box-shadow:var(--liquid-rim),var(--liquid-glow);
}
@media (forced-colors:active) {
  #panel.language-panel .lang-option[aria-pressed=true] {border-color:Highlight;}
}
@media(max-width:375px) {
  #panel.language-panel { padding-inline:8px; }
  #panel.language-panel .locale-palette .lang-option { padding-inline:2px; }
}
/* Keep text underneath the footer menu faint while the glass transmits color. */
#panel.language-panel:not([data-flight]) {
  background:linear-gradient(112deg,color-mix(in srgb,var(--surface) 70%,transparent),color-mix(in srgb,var(--surface) 44%,transparent)),var(--liquid-sheet);
}
