/* R0174 language switcher + preview banners. Loaded only when the i18n preview
   (or a later flag-on apply) writes a tree. Not in production site/ while the
   flag is OFF. */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.lang-switcher a,
.lang-switcher span[aria-current="page"] {
  color: var(--muted, #9aa3b5);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
}
.lang-switcher span[aria-current="page"] {
  color: var(--text, #f4f6fb);
}
.lang-switcher a:hover {
  color: var(--text, #f4f6fb);
  background: rgba(255, 255, 255, 0.05);
}
.lang-switcher .lang-switcher-sep {
  color: var(--muted, #9aa3b5);
  opacity: 0.5;
  padding: 0 2px;
  pointer-events: none;
}
/* R0319: in the left rail the switcher lives inside #site-nav (before Follow),
   not under the logo. Keep the auto-margin only for a top-bar leftover. */
body.nav-sidebar .rail > .lang-switcher { margin-left: auto; }
body.nav-sidebar #site-nav > .lang-switcher {
  margin: 4px 2px 8px 0;
  margin-left: 0;
  font-size: 0.88rem;
  justify-content: flex-start;
}
@media (max-width: 960px) {
  .lang-switcher { margin-right: 4px; font-size: 12px; }
  body.nav-sidebar #site-nav > .lang-switcher {
    margin: 4px 0 10px;
    font-size: 0.95rem;
  }
}

.r0174-banner {
  background: #3a1d08;
  color: #ffd7a8;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 16px;
  text-align: center;
  border-bottom: 1px solid #7a4a1a;
}
.r0174-banner strong { color: #fff; }
.r0174-home-stub {
  max-width: 720px;
  margin: 48px auto 80px;
  padding: 0 20px;
}
.r0174-home-stub h1 { margin-bottom: 12px; }
.r0174-home-stub .r0174-note {
  color: var(--muted, #9aa3b5);
  margin-bottom: 24px;
}
.r0174-home-stub ul { padding-left: 1.2em; }
.r0174-home-stub li { margin: 8px 0; }

/* JA-only: keep the メニュー header toggle on one line. The language switcher
   shares the mobile top bar, which otherwise wraps the label (“メニュ / ー”).
   Scoped to html[lang="ja"] so English pages are unchanged even when this
   stylesheet is linked on EN counterparts. */
html[lang="ja"] .nav-toggle {
  flex-shrink: 0;
  white-space: nowrap;
  align-items: center;
}
html[lang="ja"] .nav-toggle-label {
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 960px) {
  html[lang="ja"] .nav-toggle {
    gap: 6px;
    padding: 7px 8px;
    font-size: 13px;
  }
  html[lang="ja"] .brand-text {
    font-size: 1.35rem;
    letter-spacing: 0.04em;
  }
  html[lang="ja"] .lang-switcher {
    margin-right: 0;
    font-size: 11px;
  }
  html[lang="ja"] .lang-switcher a,
  html[lang="ja"] .lang-switcher span[aria-current="page"] {
    padding: 4px 5px;
  }
  html[lang="ja"] body.nav-sidebar .rail {
    gap: 8px;
  }
}
