/* Language picker and i18n helpers. Black and gold, quiet. */
.i18n-picker { position: relative; display: inline-flex; align-items: center; margin-inline-start: auto; margin-inline-end: 0.35rem; z-index: 60; }
.i18n-globe {
  display: inline-flex; align-items: center; gap: 0.3rem; min-height: 34px; padding: 0.2rem 0.6rem;
  background: transparent; color: #d4af37; border: 1px solid rgba(212,175,55,0.45); border-radius: 999px;
  font: 400 0.72rem/1 Outfit, system-ui, sans-serif; letter-spacing: 0.06em; cursor: pointer;
}
.i18n-globe:hover, .i18n-globe:focus-visible { border-color: #d4af37; box-shadow: 0 0 10px rgba(212,175,55,0.25); outline: none; }
.i18n-menu {
  position: absolute; inset-block-start: calc(100% + 6px); inset-inline-end: 0; margin: 0; padding: 0.35rem 0;
  list-style: none; min-width: 10.5rem; background: #050505; border: 1px solid rgba(212,175,55,0.5);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.i18n-menu li {
  display: flex; align-items: center; min-height: 44px; padding: 0 0.9rem;
  color: #f2e6c4; font-size: 0.95rem; cursor: pointer; text-align: start;
  white-space: nowrap;
}
.i18n-menu li:hover, .i18n-menu li:focus-visible { background: rgba(212,175,55,0.12); outline: none; }
.i18n-menu li[aria-selected="true"] { color: #d4af37; }
.i18n-menu li[aria-selected="true"]::after { content: " ✓"; }
/* v376: English gloss is smaller and a warm gray. #b5a88e on #050505 is about 8.7:1. */
.i18n-native { flex: none; }
.i18n-dot { flex: none; margin-inline: 0.4rem; color: #b5a88e; font-weight: 300; line-height: 1; }
.i18n-en { flex: none; color: #b5a88e; font-size: 0.8em; font-weight: 400; letter-spacing: 0.01em; }
/* v382: All languages stays last in the open list and links to the hub. */
.i18n-menu li.i18n-hub { display: flex; padding: 0; margin-top: 0.15rem; border-top: 1px solid rgba(212, 175, 55, 0.35); }
.i18n-menu a.i18n-all {
  display: flex; align-items: center; flex: 1 1 auto; box-sizing: border-box;
  min-height: 44px; min-width: 44px; width: 100%; padding: 0 0.9rem;
  color: #d4af37; text-decoration: none;
}
.i18n-menu a.i18n-all:hover, .i18n-menu a.i18n-all:focus-visible { background: rgba(212, 175, 55, 0.12); outline: none; }
@media (prefers-reduced-motion: reduce) { .i18n-menu a.i18n-all { transition: none; animation: none; } }
/* The open list is wider than the Language row. Grow the menu to the left so the longest gloss stays on one line inside the phone. */
.sit-menu:has(.i18n-menu:not([hidden])) { width: max-content; max-width: calc(100vw - 1.2rem); }
.sit-menu:has(.i18n-menu:not([hidden])) .sit-menu-lang,
.sit-menu:has(.i18n-menu:not([hidden])) .i18n-picker { width: auto; max-width: none; }
.sit-menu:has(.i18n-menu:not([hidden])) .i18n-menu { width: max-content; min-width: 100%; max-width: none; }
.i18n-motto-sub { display: block; margin-block-start: 0.25em; font-size: 0.62em; font-style: normal; letter-spacing: 0.02em; color: rgba(242,230,196,0.72); text-transform: none; }
.i18n-audio-note {
  display: inline-block; margin: 0.5rem 0 0; padding: 0.15rem 0.6rem; font-size: 0.72rem; color: rgba(212,175,55,0.9);
  border: 1px solid rgba(212,175,55,0.3); border-radius: 999px;
}
.i18n-audio-note[hidden] { display: none; }

/* Script fallbacks: Latin display fonts first, then a font that has the script. */
html[lang="hi"] body, html[lang="hi"] button, html[lang="hi"] input, html[lang="hi"] textarea { font-family: Outfit, "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif; }
html[lang="pa"] body, html[lang="pa"] button, html[lang="pa"] input, html[lang="pa"] textarea { font-family: Outfit, "Noto Sans Gurmukhi", "Raavi", "Nirmala UI", sans-serif; }
html[lang="zh-Hans"] body, html[lang="zh-Hans"] button, html[lang="zh-Hans"] input, html[lang="zh-Hans"] textarea { font-family: Outfit, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif; }
html[lang="ja"] body, html[lang="ja"] button, html[lang="ja"] input, html[lang="ja"] textarea { font-family: Outfit, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP", "Source Han Sans JP", sans-serif; }
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3 { font-family: "Cormorant Garamond", "Noto Sans Devanagari", serif; }
html[lang="pa"] h1, html[lang="pa"] h2, html[lang="pa"] h3 { font-family: "Cormorant Garamond", "Noto Sans Gurmukhi", serif; }
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2, html[lang="zh-Hans"] h3 { font-family: "Cormorant Garamond", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", serif; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3 { font-family: "Cormorant Garamond", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP", serif; }
/* Scripts without case or tracking conventions: drop uppercase and wide letter-spacing. */
html:is([lang="hi"],[lang="pa"]) body { line-height: 1.65; }


/* v267: quiet, always-shown "Best with headphones" line under Begin sit. */
.sit-headphones {
  flex-basis: 100%; display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  margin: 0.45rem 0 0; font-size: 0.78rem; letter-spacing: 0.02em; color: rgba(242,230,196,0.62);
}
.sit-headphones-icon { flex: none; width: 16px; height: 16px; fill: none; stroke: #d4af37; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; filter: none; }

/* v383: header language pill. Slim dark gold capsule, left of Connect wallet.
   html[data-lang-in-header] is set by LANG_IN_HEADER in i18n.js. Removing that
   attribute (or flipping the constant) restores the in-menu globe. */
html[data-lang-in-header] .sit-menu-lang { display: none !important; }
html[data-lang-in-header] .i18n-header-host { margin: 0; flex: 0 0 auto; min-width: 44px; z-index: 70; }
html[data-lang-in-header] .sit-header > .i18n-header-host { margin-left: auto; margin-right: 0.35rem; }
html[data-lang-in-header] .sit-header .wallet-chip { margin-left: 0; }
html[data-lang-in-header] .sit-header .sit-menu-toggle { margin-left: 0.35rem; }
html[data-lang-in-header] .header-actions .i18n-header-host { margin: 0; }
/* The site header's Connect wallet moves into the bar so the pill can sit on its left.
   It stays a compact 44px control, not the full-width phone-menu row. */
html[data-lang-in-header] .header-actions > [data-dogeos-connect] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: auto;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 0.75rem;
  border: 1px solid rgba(228, 190, 92, 0.9);
  border-radius: 999px;
  background: transparent;
  color: #f3e6c4;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: none;
  text-align: center;
  white-space: nowrap;
}
html[data-lang-in-header] .header-actions > [data-dogeos-connect]:hover,
html[data-lang-in-header] .header-actions > [data-dogeos-connect]:focus-visible {
  border-color: #e8c878;
  color: #f3e6c4;
}
@media (max-width: 980px) {
  html[data-lang-in-header] .nav .dd-share { width: 100%; justify-content: center; }
}
@media (max-width: 720px) {
  html[data-lang-in-header] .header-actions > [data-dogeos-connect] {
    padding: 0 0.55rem;
    font-size: 0.72rem;
    letter-spacing: 0;
  }
}
/* v421: a little lighter beside the wallet chip. The button stays 44px tall
   (the tap target). The painted capsule is 32px, the same painted height as
   the wallet chip, with slightly less padding and a slightly smaller face.
   Weight stays 400 so the name stays easy to read. */
html[data-lang-in-header] .i18n-header-pill {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.32rem;
  width: auto;
  max-width: none;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0 0.65rem 0 0.42rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #f3e6c4;
  font-family: Outfit, "Noto Sans Gurmukhi", "Noto Sans KR", "Nanum Gothic", "Noto Sans SC", "Noto Sans Devanagari", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans", system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}
html[data-lang-in-header] .i18n-header-pill::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: calc(50% - 16px);
  height: 32px;
  box-sizing: border-box;
  border: 1px solid rgba(212, 175, 55, 0.78);
  border-radius: 999px;
  background: #0c0b09;
  box-shadow: inset 0 1px 0 rgba(243, 226, 168, 0.08);
  pointer-events: none;
}
html[data-lang-in-header] .i18n-header-pill:hover::before,
html[data-lang-in-header] .i18n-header-pill:focus-visible::before {
  border-color: #e8c878;
  box-shadow: inset 0 1px 0 rgba(243, 226, 168, 0.12), 0 0 14px rgba(212, 175, 55, 0.16);
}
html[data-lang-in-header] .i18n-header-pill:focus-visible {
  outline: none;
}
html[data-lang-in-header] .i18n-header-pill:focus-visible::before {
  outline: 2px solid rgba(243, 226, 168, 0.95);
  outline-offset: 2px;
}
html[data-lang-in-header] .i18n-header-pill .i18n-fine-globe {
  position: relative;
  z-index: 1;
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  color: #e8c878;
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 3px rgba(232, 200, 120, 0.62));
}
html[data-lang-in-header] .i18n-header-pill .i18n-code { display: none; }
html[data-lang-in-header] .i18n-name-slot {
  position: relative;
  z-index: 1;
  display: inline-grid;
  align-items: center;
}
html[data-lang-in-header] .i18n-name,
html[data-lang-in-header] .i18n-name-sizer {
  grid-area: 1 / 1;
  white-space: nowrap;
}
html[data-lang-in-header] .i18n-name-sizer { visibility: hidden; }
html[data-lang-in-header] .i18n-name { transition: opacity 0.9s ease; }
html[data-lang-in-header] .i18n-header-pill::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: calc(50% - 16px);
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(105deg, transparent 36%, rgba(243, 226, 168, 0.2) 50%, transparent 64%);
  background-size: 220% 100%;
  background-repeat: no-repeat;
  background-position: 130% 0;
  pointer-events: none;
}
html[data-lang-in-header] .i18n-header-host .i18n-menu {
  z-index: 80;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100vw - 16px);
}
/* v442: the open list stays inside the screen. It is still aligned to the
   pill, and i18n.js shifts it so both edges keep an 8px gutter. Rows wrap
   only when a name is wider than that gutter. */
html[data-lang-in-header] .i18n-header-host .i18n-menu li {
  white-space: normal;
  max-width: 100%;
}
html[data-lang-in-header] .i18n-header-host .i18n-menu .i18n-native,
html[data-lang-in-header] .i18n-header-host .i18n-menu .i18n-en {
  flex: 0 1 auto;
  min-width: 0;
}
html[data-lang-in-header] .i18n-header-pill.is-globe-only {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
  gap: 0;
}
html[data-lang-in-header] .i18n-header-pill.is-globe-only::before,
html[data-lang-in-header] .i18n-header-pill.is-globe-only::after {
  left: calc(50% - 16px);
  right: auto;
  width: 32px;
}
html[data-lang-in-header] .i18n-header-pill.is-globe-only .i18n-name-slot { display: none; }
@media (max-width: 720px) {
  /* v394: Connect wallet no longer shares this bar, so the language pill
     keeps a quiet gap in the seat that button used, just left of the menu. */
  html[data-lang-in-header] .header-actions { gap: 0.75rem; }
  html[data-lang-in-header] .site-header { gap: 0.45rem; }
  html[data-lang-in-header] .i18n-header-pill {
    gap: 0.28rem;
    padding: 0 0.5rem 0 0.36rem;
    font-size: 0.84rem;
  }
  html[data-lang-in-header] .sit-header .i18n-header-pill {
    gap: 0.22rem;
    padding: 0 0.4rem 0 0.3rem;
    font-size: 0.76rem;
  }
  html[data-lang-in-header] .i18n-header-pill .i18n-fine-globe { width: 15px; height: 15px; }
}
@media (prefers-reduced-motion: no-preference) {
  html[data-lang-in-header] .i18n-header-pill .i18n-fine-globe {
    animation: i18n-globe-quarter 2.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  html[data-lang-in-header] .i18n-header-pill:hover::after,
  html[data-lang-in-header] .i18n-header-pill:focus-visible::after {
    animation: i18n-pill-shimmer 1.25s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-lang-in-header] .i18n-name { transition: none; }
  html[data-lang-in-header] .i18n-header-pill .i18n-fine-globe { animation: none; }
  html[data-lang-in-header] .i18n-header-pill::after { content: none; animation: none; }
}
@keyframes i18n-globe-quarter { from { transform: rotate(0deg); } to { transform: rotate(90deg); } }
@keyframes i18n-pill-shimmer { from { background-position: 130% 0; } to { background-position: -30% 0; } }
