/* JD19 site languages (package jd19-website-multilanguage, 2026-11-29): the header language picker and the
   per-language type adjustments. Loaded on every page by php/i18n.php. */

/* ---------- picker: a gold-edged plate with the two-letter code, as in Yan's reference ---------- */
.lang-pick{display:inline-flex;align-items:center;gap:10px;margin:0;flex-shrink:0}
.lang-pick-box{position:relative;display:inline-flex;align-items:center}
.lang-pick select{appearance:none;-webkit-appearance:none;min-width:70px;height:44px;margin:0;padding:0 28px 0 14px;
  border:1px solid #C9A25E;border-radius:2px;background:#061326cc;color:#FFF4DA;cursor:pointer;
  font:600 15px/1 var(--serif,Georgia,serif);letter-spacing:.14em;box-shadow:inset 0 0 0 1px #06132699,0 2px 8px #06132666;
  transition:border-color .2s,box-shadow .2s,background-color .2s}
.lang-pick-box svg{position:absolute;right:9px;top:50%;width:13px;height:13px;margin-top:-6px;pointer-events:none;
  fill:none;stroke:#E8C98A;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lang-pick select option{background:#0F1F3A;color:#EAF4FF;letter-spacing:.08em}
.lang-pick select:hover{border-color:#FFC247;background-color:#0F1F3Aee}
.lang-pick select:focus-visible{outline:2px solid var(--focus-on-dark,#C4D8F5);outline-offset:3px}
.lang-pick noscript button{min-height:44px;margin-left:6px}
.site-header>.lang-pick{order:0}

/* phone menu: a full row with its label */
.lang-pick-menu{display:flex;justify-content:space-between;width:100%;margin:6px 0 4px}
.lang-pick-label{font:600 14px/1.3 var(--serif,Georgia,serif);letter-spacing:.16em;text-transform:uppercase;color:var(--on-navy-soft,#C5D7F4)}
.lang-pick-menu select{min-width:190px;height:48px;font-size:17px;letter-spacing:.06em}

/* tablets: a compact code box beside the theme button; phones (520 px and under): the header has no room,
   the picker sits in the menu with its label */
@media (max-width:1100px){.site-header>.lang-pick{margin-left:auto}.site-header>.lang-pick~*{margin-left:0}
  .site-header>.lang-pick select{min-width:0;width:56px;height:40px;padding:0 20px 0 9px;font-size:13px;letter-spacing:.08em}
  .site-header>.lang-pick .lang-pick-box svg{right:6px;width:11px}}
@media (max-width:520px){.site-header>.lang-pick{display:none}}

/* ---------- Chinese: system CJK faces behind the Latin serif, no tracking on CJK, no forced capitals ---------- */
html[lang="zh-CN"]{--serif:'Cormorant Garamond','Noto Serif SC','Source Han Serif SC','Songti SC','STSong','SimSun',serif;
  --body:system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei','Noto Sans SC',sans-serif}
html[lang="zh-CN"] body{font-family:var(--body);line-break:strict;word-break:normal}
html[lang="zh-CN"] :is(h1,h2,h3,h4,.eyebrow,.text-link,.pill,.paint-button,.site-nav a,.bf-col h2,.menu-realm-title,label,th){letter-spacing:.02em!important}

/* ---------- longer words (ru, pt, es, vi): let long labels wrap or break instead of spilling ---------- */
html:is([lang="ru"],[lang="pt-BR"],[lang="es"],[lang="vi"]) :is(h1,h2,h3){overflow-wrap:anywhere;hyphens:auto}
html:is([lang="ru"],[lang="pt-BR"],[lang="es"],[lang="vi"]) :is(.pill,.paint-button,button){overflow-wrap:break-word;hyphens:auto}
html:is([lang="ru"],[lang="pt-BR"],[lang="es"],[lang="vi"]) .site-nav a{letter-spacing:.04em}

/* ---------- desktop nav in the longer languages: type scales with the window; under 1300 px the Home link
   (the logo already goes home) makes room. Measured 2026-11-29 at 1110/1280/1440 px, no overflow. ---------- */
@media (min-width:1101px){
  html:is([lang="ru"],[lang="pt-BR"],[lang="es"],[lang="vi"]) .site-header .site-nav{column-gap:clamp(6px,.75vw,13px)}
  html:is([lang="ru"],[lang="pt-BR"],[lang="es"],[lang="vi"]) .site-header .site-nav a{font-size:clamp(13px,1.08vw,16.5px);letter-spacing:.01em;white-space:nowrap}
}
@media (min-width:1101px) and (max-width:1300px){
  html:is([lang="ru"],[lang="pt-BR"],[lang="es"],[lang="vi"]) .site-header .site-nav>a:first-child{display:none}
}

/* painted buttons hold one line: the longer languages get a smaller, untracked label (EN and CN unchanged) */
html:is([lang="ru"],[lang="pt-BR"],[lang="es"],[lang="vi"]) .paint-button{white-space:nowrap;letter-spacing:0;padding-inline:clamp(14px,1.6vw,24px)}
html:is([lang="ru"],[lang="pt-BR"],[lang="es"],[lang="vi"]) .hero-actions .paint-button{font-size:clamp(16px,calc(1.45vw + 6px),24px)}
/* the server-time scroll label ("HORÁRIO DO SERVIDOR") stays inside its painted scroll */
html:is([lang="ru"],[lang="pt-BR"],[lang="es"],[lang="vi"]) .gem-time-label{letter-spacing:.02em;font-size:12px;white-space:nowrap}
