/* Native disclosure: compact by default, usable even without JavaScript. */
.language-switcher {
  --language-bg: var(--sbw-theme-panel, var(--surface, #fff));
  --language-ink: var(--sbw-theme-text, var(--ink, #101318));
  --language-border: var(--sbw-theme-border, #c5d0d9);
  --language-hover: var(--sbw-theme-soft, #edf4f8);
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  max-width: 100%;
  color: var(--language-ink);
  font: 600 .875rem/1.3 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: normal;
  text-transform: none;
  text-align: start;
}
.language-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--language-border);
  border-radius: 12px;
  background: var(--language-bg);
  color: inherit;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s ease, background .15s ease;
}
.language-trigger::-webkit-details-marker { display: none; }
.language-trigger::marker { content: ''; }
.language-trigger:hover { background: var(--language-hover); }
.language-switcher[open] > .language-trigger { border-color: var(--sbw-theme-accent, #078db7); }
.language-switcher .language-flag {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 16px;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgb(16 35 51 / 12%);
  object-fit: cover;
}
.language-chevron { flex-shrink: 0; margin-left: 3px; transition: transform .15s ease; }
.language-switcher[open] .language-chevron { transform: rotate(180deg); }
.language-menu {
  position: absolute;
  z-index: 110;
  top: calc(100% + 10px);
  right: 0;
  width: 200px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid var(--language-border);
  border-radius: 16px;
  background: var(--language-bg);
  box-shadow: 0 14px 40px rgb(9 28 43 / 16%), 0 3px 8px rgb(9 28 43 / 5%);
}
/* Explicitly hide closed content even if a page stylesheet changes div display. */
.language-switcher:not([open]) > .language-menu { display: none; }
.language-switcher .language-menu a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--language-ink);
  font: inherit;
  letter-spacing: normal;
  text-decoration: none;
  white-space: nowrap;
}
.language-switcher .language-menu a[aria-current="true"] { display: none; }
.language-switcher .language-menu a:hover { background: var(--language-hover); color: var(--language-ink); }
.language-trigger:focus-visible,
.language-switcher .language-menu a:focus-visible { outline: 3px solid var(--sbw-theme-focus, #078db7); outline-offset: 3px; }
.site-nav .language-menu a::after { display: none; }
.hub-topbar { flex-wrap: wrap; }
.hub-topbar .language-switcher { margin-left: auto; }
.dlucca-header-inner { flex-wrap: wrap; }
.dlucca-header-inner .language-switcher { margin-left: auto; }
.landing > .language-switcher {
  --language-bg: #10212e;
  --language-ink: #edf6fa;
  --language-border: #526170;
  --language-hover: #1d3545;
  display: block;
  width: max-content;
  margin: 0 auto 24px;
}
.landing > .language-switcher .language-menu { right: 50%; transform: translateX(50%); }
@media (min-width: 821px) {
  .site-nav { flex-wrap: wrap; justify-content: flex-end; column-gap: 18px; row-gap: 8px; }
  .header-inner { padding-block: 12px; }
}
@media (max-width: 820px) {
  .site-nav { overflow-y: auto; }
  .site-nav .language-switcher { margin-top: 4px; }
  .site-nav .language-menu { position: static; margin-top: 10px; }
}
@media (max-width: 480px) {
  .hub-topbar .language-switcher { margin-left: 0; }
  .hub-topbar .language-menu { right: auto; left: 0; }
  .hub-topbar__label { order: -1; flex-basis: 100%; }
  .dlucca-header-inner { gap: 14px; }
  .dlucca-header-label { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .language-trigger, .language-chevron { transition: none; }
}

/* Japanese text uses local CJK fonts and natural Japanese line breaking. */
html:lang(ja) body {
  --font-sans: "Noto Sans CJK JP", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-family: var(--font-sans);
  line-break: strict;
  word-break: normal;
}
html:lang(ja) :is(h1, h2, h3, .hero-copy h1 span) { font-family: var(--font-sans); letter-spacing: .01em; }
html:lang(ja) .hero-copy h1 { font-size: clamp(2rem, 3.6vw, 3.5rem); line-height: 1.35; }
html:lang(ja) .page-hero h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1.4; }
html:lang(ja) .section h2 { font-size: clamp(1.65rem, 3.5vw, 3rem); line-height: 1.45; }
html:lang(ja) :is(.hero-lead, .section-copy, .prose p, .section-heading p) { line-height: 1.9; }
html:lang(ja) .eyebrow { letter-spacing: .08em; }
html:lang(ja) .hero-stats dd { letter-spacing: normal; }
html:lang(ja) .hub-description { line-height: 1.85; }
html:lang(ja) .landing { font-family: var(--font-sans); }
html:lang(ja) .landing .hero h1 { font-size: clamp(1.65rem, 5vw, 2.4rem); line-height: 1.5; }
html:lang(ja) .landing .card small { line-height: 1.75; }
