/*!
 * 大枝普洱 · 多语言切换器样式
 * 与主题「绿 × 暖黄」配色一致
 */

/* ---------- 切换器 ---------- */
.lang-switch {
  position: relative;
  flex: 0 0 auto;
  margin-left: 10px;
  z-index: 120;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--c-line, #e3e6d3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: var(--c-ink, #2f3a30);
  font-size: .8rem;
  line-height: 1;
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.lang-btn:hover {
  border-color: var(--c-green, #4a7c59);
  color: var(--c-green-deep, #2c5f3f);
  background: #fff;
}
.lang-btn svg { color: var(--c-green, #4a7c59); flex: 0 0 auto; }
.lang-cur { font-weight: 700; letter-spacing: .02em; }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  min-width: 172px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fffdf7;
  border: 1px solid var(--c-line, #e3e6d3);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(20, 30, 22, .16);
  display: none;
  animation: lang-drop .16s ease;
}
@keyframes lang-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lang-switch.is-open .lang-menu { display: block; }

.lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--c-ink, #2f3a30);
  font-size: .87rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}
.lang-opt:hover { background: rgba(74, 124, 89, .09); }
.lang-opt.is-active {
  background: rgba(74, 124, 89, .12);
  color: var(--c-green-deep, #2c5f3f);
  font-weight: 700;
}
.lang-opt-short {
  flex: 0 0 22px;
  text-align: center;
  font-size: .7rem;
  letter-spacing: .04em;
  color: var(--c-gold, #e0a03c);
}

/* 手机端：按钮更紧凑，菜单贴右不溢出 */
@media (max-width: 700px) {
  .lang-switch { margin-left: 8px; }
  .lang-btn { height: 40px; padding: 0 10px; gap: 5px; }
  .lang-btn svg { width: 15px; height: 15px; }
  .lang-menu { min-width: 158px; }
}

/* ---------- 繁体 / 日文 / 韩文字体栈 ---------- */
html[data-lang="zh-Hant"] body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Source Han Sans TC", "Noto Sans CJK TC", sans-serif;
}
html[data-lang="zh-Hant"] h1,
html[data-lang="zh-Hant"] h2,
html[data-lang="zh-Hant"] h3,
html[data-lang="zh-Hant"] .section-head h2,
html[data-lang="zh-Hant"] .hero h1,
html[data-lang="zh-Hant"] .page-hero h1 {
  font-family: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
}

html[data-lang="ja"] body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.9;
}
html[data-lang="ja"] h1,
html[data-lang="ja"] h2,
html[data-lang="ja"] h3 {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

html[data-lang="ko"] body {
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Nanum Gothic", sans-serif;
  line-height: 1.9;
  word-break: keep-all;
}
html[data-lang="ko"] h1,
html[data-lang="ko"] h2,
html[data-lang="ko"] h3 {
  font-family: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
}

html[data-lang="en"] body { line-height: 1.8; }
html[data-lang="en"] h1,
html[data-lang="en"] h2,
html[data-lang="en"] h3 {
  font-family: "Noto Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  letter-spacing: .01em;
}

/* 非中文语言下，字距略松的排版微调（中文用的 letter-spacing .3em 之类在大写字母上会散架） */
html[data-lang="en"] .brand .logo-text strong,
html[data-lang="ja"] .brand .logo-text strong,
html[data-lang="ko"] .brand .logo-text strong,
html[data-lang="zh-Hant"] .brand .logo-text strong { letter-spacing: .16em; }

html[data-lang="en"] .eyebrow,
html[data-lang="ja"] .eyebrow,
html[data-lang="ko"] .eyebrow { letter-spacing: .14em; }
