/* UNITED EARTH — ACCESSIBLE QUICK LANGUAGE SWITCH.
   Native select, preserves location, input contents, zoom and country selection.
   The normal header selector remains, and a small floating one follows the reader. */
.ue-quick-language{
  display:flex;align-items:center;justify-content:center;gap:5px;
  width:67px;height:44px;min-width:44px;min-height:44px;
  padding:0 7px;box-sizing:border-box;
  position:relative;isolation:isolate;border-radius:999px;
  border:1px solid rgba(227,239,247,.29);
  background:linear-gradient(155deg,rgba(51,75,91,.91),rgba(26,49,66,.88));
  color:#f4fafc;
  box-shadow:0 9px 22px rgba(3,14,27,.18),inset 0 1px 0 rgba(255,255,255,.13);
  -webkit-backdrop-filter:blur(20px) saturate(110%);
  backdrop-filter:blur(20px) saturate(110%);
  direction:ltr!important;
  font:660 11px/1 system-ui,-apple-system,sans-serif;
  letter-spacing:.02em;
}
.ue-quick-language-globe{display:block;width:18px;height:18px;flex:0 0 18px;opacity:.83;pointer-events:none}
.ue-quick-language-code{pointer-events:none;font-size:11px;font-weight:675;line-height:1;text-transform:uppercase;min-width:17px}
.ue-quick-language-native{
  position:absolute!important;inset:0!important;z-index:2;
  width:100%!important;height:100%!important;min-width:0!important;
  border:0!important;border-radius:inherit!important;
  padding:0!important;margin:0!important;opacity:0!important;
  appearance:menulist!important;-webkit-appearance:menulist!important;
  cursor:pointer;font-size:16px!important;
}
.ue-quick-language:focus-within{outline:3px solid rgba(138,195,229,.72);outline-offset:3px}
.ue-quick-language--global{
  position:fixed;
  right:max(12px,env(safe-area-inset-right));
  bottom:max(13px,env(safe-area-inset-bottom) + 11px);
  z-index:17000;
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease;
}
body.immersive .ue-quick-language--global,
body[data-language-dock="show"] .ue-quick-language--global{
  opacity:1;visibility:visible;pointer-events:auto;
}
/* Fullscreen editing/country information includes an in-context picker. */
body:has(dialog[open]) .ue-quick-language--global,
body:has(.ue-country-window-overlay:not([hidden])) .ue-quick-language--global,
body.nav-open .ue-quick-language--global{
  opacity:0!important;visibility:hidden!important;pointer-events:none!important;
}
.ue-quick-language--scanner{
  position:fixed;z-index:9;
  top:max(1rem,env(safe-area-inset-top));
  right:calc(max(1rem,env(safe-area-inset-right)) + 111px);
  width:52px;height:46px;
  border-color:rgba(161,184,202,.4);
  background:rgba(255,255,255,.62);
  color:#2b5873;
  box-shadow:inset 0 1px 0 #fff,0 3px 13px rgba(32,80,110,.055);
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
}
.ue-quick-language--scanner .ue-quick-language-globe{width:17px;height:17px;flex-basis:17px}
.ue-quick-language--scanner .ue-quick-language-code{font-size:10px}
@media(max-width:375px){
 .ue-quick-language--scanner{
    width:45px;height:44px;padding:0 3px;gap:3px;
    right:calc(max(.75rem,env(safe-area-inset-right)) + 105px);
    top:max(.75rem,env(safe-area-inset-top));
 }
 .ue-quick-language--scanner .ue-quick-language-globe{width:15px;height:15px;flex-basis:15px}
 .ue-quick-language--scanner .ue-quick-language-code{font-size:10px}
}
@media(min-width:780px){
 .ue-quick-language--global{right:max(22px,env(safe-area-inset-right) + 10px);bottom:max(24px,env(safe-area-inset-bottom) + 10px);}
}
@media(prefers-reduced-motion:reduce){
  .ue-quick-language--global{transition:none}
}
@media(prefers-reduced-transparency:reduce){
  .ue-quick-language{background:#334756}
  .ue-quick-language--scanner{background:#f7fafc}
}

/* Gallery chrome is fullscreen even while the ordinary site header remains
   in the DOM. Keep language access in the unused title-bar corner instead
   of covering children's drawings. */
body:has(.ue-global-gallery:not([hidden])) .ue-quick-language--global,
body:has(.ue-stage2[data-phase="gallery"]) .ue-quick-language--global,
body:has(.ue-stage2[data-phase="viewer"]) .ue-quick-language--global {
  opacity:1;visibility:visible;pointer-events:auto;
  top:calc(82px + env(safe-area-inset-top));
  bottom:auto;
  right:max(13px,env(safe-area-inset-right));
}
body:has(.ue-global-gallery:not([hidden])) .ue-quick-language--global{
  top:calc(76px + env(safe-area-inset-top));
}
/* The immersive full-screen photo viewer needs an unobstructed gesture
   surface; return to the collection to switch languages. */
body:has(.ue-stage2[data-phase="viewer"]) .ue-quick-language--global{
  opacity:0;visibility:hidden;pointer-events:none;
}

/* On wide screens the help link expands to its text label. Keep the language
   control separate rather than overlapping its hit target. */
@media(min-width:780px){
  .ue-quick-language--scanner{
    right:calc(max(1rem,env(safe-area-inset-right)) + 285px);
  }
}
@media(max-width:375px){
  .ue-quick-language--scanner{
    right:calc(max(.75rem,env(safe-area-inset-right)) + 102px);
  }
}

/* Both gallery entry points provide their own accessible language picker
   inside the header. Never float the shared page picker above drawings. */
body:has(.ue-global-gallery:not([hidden])) .ue-quick-language--global,
body:has(.ue-stage2[data-phase="gallery"]) .ue-quick-language--global,
body:has(.ue-stage2[data-phase="viewer"]) .ue-quick-language--global{
  visibility:hidden!important;opacity:0!important;pointer-events:none!important;
}
