/* Styles for the language layer. Served from the same origin so the document
   needs no inline <style> and a strict style-src 'self' policy holds. */
.ng-lang-wrap{display:inline-flex;align-items:center;align-self:center;margin-inline-start:8px;font:inherit;vertical-align:middle}
.ng-lang-wrap.ng-lang-fixed{position:fixed;top:max(12px,env(safe-area-inset-top));inset-inline-end:12px;z-index:2147482000;margin:0}
.ng-lang-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;height:40px;min-width:44px;padding:0 10px;border-radius:999px;border:1px solid rgba(127,127,127,.45);background:transparent;color:inherit;font:inherit;font-size:12px;font-weight:800;letter-spacing:.3px;cursor:pointer;-webkit-tap-highlight-color:transparent}
/* The visible pill stays inside the header's own height; the hit area is 44 px. */
.ng-lang-btn::after{content:"";position:absolute;inset:-2px;border-radius:inherit}
.ng-lang-btn:hover{border-color:rgba(127,127,127,.8)}
.ng-lang-btn:focus-visible{outline:2px solid #FF6B4A;outline-offset:2px}
.ng-lang-globe{font-size:15px;line-height:1}
.ng-lang-code{direction:ltr;font-variant-numeric:tabular-nums}

/* The app has no header button; its row follows the Me screen's settings row
   styling, so it only needs the button reset the shared class lacks. */
.ng-lang-row{width:100%;min-height:44px;background:transparent;border:0;border-bottom:1px solid var(--glass-border,rgba(127,127,127,.25));color:inherit;font:inherit;text-align:start;cursor:pointer;-webkit-tap-highlight-color:transparent}
.ng-lang-row:last-child{border-bottom:0}
.ng-lang-row:hover{background:rgba(127,127,127,.08)}
.ng-lang-row .val{display:inline-flex;align-items:center;gap:6px;flex:none}
.ng-lang-row-globe{font-size:15px;line-height:1}
.ng-lang-row-chevron{font-size:17px;opacity:.55}
.ng-lang-row:focus-visible{outline:2px solid #FF6B4A;outline-offset:-2px}

.ng-lang-scrim{position:fixed;inset:0;z-index:2147483000;background:rgba(10,14,24,.42)}
.ng-lang-scrim[hidden],.ng-lang-sheet[hidden]{display:none !important}
.ng-lang-sheet{position:fixed;z-index:2147483001;display:flex;flex-direction:column;width:min(380px,calc(100vw - 16px));max-height:min(70vh,560px);border-radius:16px;border:1px solid rgba(22,32,58,.14);background:#fff;color:#16203A;box-shadow:0 24px 60px rgba(10,14,24,.32);overflow:hidden;text-align:start;font:15px/1.35 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.ng-lang-head{display:flex;align-items:center;gap:12px;padding:10px 10px 10px 16px;border-bottom:1px solid rgba(127,127,127,.22)}
.ng-lang-title{flex:1;min-width:0;margin:0;font-size:15px;font-weight:800;line-height:1.3}
.ng-lang-close{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border:0;border-radius:999px;background:transparent;color:inherit;font-size:20px;line-height:1;cursor:pointer}
.ng-lang-close:hover{background:rgba(127,127,127,.14)}
.ng-lang-close:focus-visible{outline:2px solid #FF6B4A;outline-offset:-2px}
.ng-lang-list{overflow-y:auto;overscroll-behavior:contain;padding:6px 8px 10px}
.ng-lang-opt{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px 10px;border:0;border-radius:10px;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer}
.ng-lang-opt:hover{background:rgba(127,127,127,.12)}
.ng-lang-opt:focus-visible{outline:2px solid #FF6B4A;outline-offset:-2px}
.ng-lang-opt-name{flex:1;min-width:0;overflow-wrap:anywhere}
.ng-lang-check{flex:none;color:#FF6B4A;font-weight:900}
.ng-lang-auto{flex-wrap:wrap;border-bottom:1px solid rgba(127,127,127,.18);border-radius:10px 10px 0 0;margin-bottom:4px}
.ng-lang-device{flex:none;font-size:12.5px;opacity:.7;margin-inline-start:auto}

:root[data-theme=dark] .ng-lang-sheet{background:#151d2c;color:#eef2f8;border-color:rgba(255,255,255,.16)}
:root[data-theme=dark] .ng-lang-head{border-color:rgba(255,255,255,.14)}
:root[data-theme=dark] .ng-lang-opt:hover{background:rgba(255,255,255,.1)}
:root[data-theme=dark] .ng-lang-auto{border-color:rgba(255,255,255,.14)}

/* The page stays hidden only until the catalog has been applied. This reveal
   is driven by the stylesheet clock, so it happens even when the catalog
   request never settles and even if the script fails before its own timer. */
html.ng-i18n-pending body{visibility:hidden}
html.ng-i18n-pending body{animation:ng-i18n-reveal 0.01s linear 4s forwards}
@keyframes ng-i18n-reveal{to{visibility:visible}}

/* CJK link text has no spaces, so without this a tight header breaks a label
   mid-word instead of moving it to the next line. */
header.site nav a{white-space:nowrap}

@media (max-width:720px){
  .ng-lang-wrap{margin-inline-start:6px}
  /* Icon-only in the phone header; the button keeps its accessible label. */
  .ng-lang-code{display:none}
  .ng-lang-btn{min-width:40px;padding:0 8px}
  /* A bottom sheet on phones: the full list stays reachable and scrolls. */
  .ng-lang-sheet{top:auto;left:0;right:0;bottom:0;width:auto;max-width:none;max-height:80vh;border-radius:18px 18px 0 0;border-bottom:0}
}

/* The proxied public group and event templates already fill a phone's header
   with their own links, so the picker takes the top row and the links move to
   a second row instead of being pushed past the right edge. */
@media (max-width:720px){
  html.ng-share header.site{flex-wrap:wrap;row-gap:4px}
  html.ng-share header.site>nav{order:3;flex:1 0 100%;justify-content:flex-start;margin-left:0;flex-wrap:wrap;gap:8px 14px}
  html.ng-share header.site>.ng-lang-wrap{order:2;margin-inline-start:auto}
}
