.language-switch {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  color: var(--ink);
  white-space: nowrap;
}

.language-switch summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 59px;
  padding: 0 10px;
  cursor: pointer;
  list-style: none;
  border: 1px solid #bbc8b9;
  border-radius: 6px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
}

.language-switch summary::-webkit-details-marker {
  display: none;
}

.language-switch summary > [lang] {
  font: inherit;
  transform: none;
}

.language-chevron {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  transform: rotate(45deg);
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
}

.language-switch[open] .language-chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}

.language-switch ul {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid #bbc8b9;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 22px #1b4a3324;
}

.language-switch li > * {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 14px;
}

.language-switch li > [aria-current],
.language-switch li > a:hover,
.language-switch summary:hover {
  background: #eaf0e6;
}

.language-switch li > [aria-current] { font-weight: 650; }

.language-switch a:focus-visible,
.language-switch summary:focus-visible {
  outline: 2px solid #a48135;
  outline-offset: -3px;
}

html:lang(zh-Hans) { --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif; }
html:lang(ja) { --sans: "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", system-ui, sans-serif; }

@media (min-width: 981px) and (max-width: 1190px) {
  .header .nav-wrap { gap: 12px; }
  .header .brand { width: 205px; }
  .header #main-nav { gap: 12px; }
  .header .header-profile { padding-inline: 10px; }
}

@media (min-width: 801px) and (max-width: 980px) {
  .header .nav-wrap { gap: 9px 12px; }
  .header .brand { width: 205px; }
  .header #main-nav { gap: 11px; }
}

@media (max-width: 800px) {
  .header .nav-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "brand language menu" "profile profile profile";
    gap: 8px;
  }
  .header .brand { grid-area: brand; max-width: 100%; }
  .header .language-switch { grid-area: language; }
  .header .menu-toggle { grid-area: menu; }
  .header .header-profile { grid-area: profile; }
}

.locale-content {
  padding-bottom: clamp(32px, 6vw, 82px);
}

.locale-section {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-block: clamp(22px, 4vw, 45px);
}

.locale-section h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  margin-bottom: 12px;
}

.locale-section p {
  max-width: 74ch;
  margin-block: 10px;
}

.locale-section-with-image {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 22px 36px;
}

.locale-section figure,
.locale-gallery figure {
  margin: 0;
}

.locale-section figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  border-radius: 7px;
  background: #eaf0e6;
}

.locale-section figure figcaption {
  padding-top: 7px;
  color: var(--ink);
}

.locale-gallery,
.locale-article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.locale-gallery figure img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.locale-gallery figcaption span {
  display: block;
  font-weight: 600;
}

.locale-article-grid article {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f2f5ed;
}

.locale-article-grid h3 { font-size: 1.12rem; }
.locale-article-grid h3 a:hover { text-decoration: underline; }
.locale-article-grid p { margin: 7px 0 0; }

.locale-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 21px;
  padding-top: 7px;
}

.locale-table caption {
  text-align: left;
  font-weight: 650;
  padding-bottom: 7px;
}

.locale-table { margin-top: 14px; overflow-x: auto; }
.locale-note { font-size: .9em; }
.locale-section details {
  max-width: 74ch;
  margin-block: 7px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.locale-section summary { cursor: pointer; font-weight: 650; }
.locale-section li { margin-block: 5px; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .locale-section-with-image,
  .locale-article-grid { grid-template-columns: 1fr; }
  .locale-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

@media print {
  .page-exportCharcoal .header,
  .page-exportCharcoal .social-topbar,
  .page-exportCharcoal footer,
  .page-exportCharcoal .floating-contact { display: none; }
}
