/* Language selector (shared by index and policy pages; literal colours, self-contained) */
.topbar-end { display: flex; align-items: center; gap: 14px; }

.lang-switch { position: relative; flex: none; font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace; font-size: 11px; letter-spacing: .06em; line-height: 1; }
.lang-switch img { display: block; flex: none; width: 20px; height: 14px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.lang-switch .lang-name { white-space: nowrap; }

.lang-switch-btn { display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; margin: 0; padding: 0 12px; border: 1px solid #24342a; border-radius: 0; background: #0b110d; color: #cfdcd3; font: inherit; letter-spacing: inherit; cursor: pointer; }
.lang-switch-btn::after { width: 0; height: 0; margin-left: 2px; border-top: 4px solid #829187; border-right: 4px solid transparent; border-left: 4px solid transparent; content: ''; transition: transform .15s ease; }
.lang-switch-btn[aria-expanded="true"]::after { transform: rotate(180deg); }
.lang-switch-btn:hover { border-color: #3F7A55; color: #edf5ef; }
.lang-switch-btn:focus-visible, .lang-menu a:focus-visible { outline: 2px solid #37df7a; outline-offset: 2px; }

.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 176px; margin: 0; padding: 6px 0; border: 1px solid #24342a; background: #0b110d; box-shadow: 4px 4px 0 #020403; list-style: none; }
.lang-menu[hidden] { display: none; }
.lang-menu li { margin: 0; padding: 0; }
.lang-menu a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; color: #cfdcd3; text-decoration: none; }
.lang-menu a:hover { background: #0b2515; color: #edf5ef; }
.lang-menu a[aria-current="true"] { color: #37df7a; }
.lang-menu a[aria-current="true"]::after { margin-left: auto; padding-left: 10px; content: '\25CF'; font-size: 8px; }

@media (max-width: 480px) {
  .topbar-end { gap: 8px; }
  .status-label { display: none; }
  .lang-switch { font-size: 10px; letter-spacing: .02em; }
  .lang-switch-btn { gap: 6px; padding: 0 8px; }
  .lang-switch-btn::after { display: none; }
}

/* CJK glyph shapes: override the font variables from css/launch.css */
:root:lang(ja) { --sans: 'Manrope', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif; --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Hiragino Sans', 'Yu Gothic', 'Meiryo', monospace; }
:root:lang(zh) { --sans: 'Manrope', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif; --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'PingFang SC', 'Microsoft YaHei', monospace; }
