/* D-179: 英語・中国語では購入入口を隠す。日本語の表示・処理はそのまま。 */
html:is([lang="en"], [lang="zh-CN"]) [data-purchase-entry],
html:is([lang="en"], [lang="zh-CN"]) .i18n-purchase-dialog .ui-dialog-buttonpane button:not(:last-child) {
  display: none !important;
}
html:is([lang="en"], [lang="zh-CN"]) [data-purchase-trigger] { cursor: default; }

.language-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 21;
  display: flex;
  justify-content: flex-end;
  height: 44px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #e5eef4;
  color: #17364c;
  box-sizing: border-box;
  width: 100%;
  font: 13px/1.5 system-ui, sans-serif;
}
html body .parentH { top: 44px; }
html body .container { padding-top: 44px; }
.language-picker {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: min(100%, 600px);
  margin: 0 auto;
}
.language-disclosure { position: relative; }
.language-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 4px;
  list-style: none;
  color: #527089;
  cursor: pointer;
  font: inherit;
}
.language-disclosure > summary::-webkit-details-marker { display: none; }
.language-disclosure > summary > svg { position: static; display: block; }
.language-globe { width: 17px; height: 17px; flex-shrink: 0; }
.language-chevron { width: 13px; height: 13px; flex-shrink: 0; }
.language-disclosure[open] .language-chevron { transform: rotate(180deg); }
.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 208px;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  padding: 8px;
  background: #fff;
  border: 1px solid #deebf2;
  border-radius: 14px;
  box-shadow: 0 9px 30px rgba(28,78,110,.15);
}
.language-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #17364c;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.language-options button:hover { background: #effaff; }
.language-options button[aria-pressed="true"] { background: #effaff; color: #0875ad; font-weight: 600; }
.language-options button[aria-pressed="true"]::after { content: '\2713'; }
.language-disclosure > summary:focus-visible,
.language-options button:focus-visible { outline: 2px solid #087fae; outline-offset: 2px; }
/* 固定ヘッダーを持たない文書ページでも言語バーと重ならないようにする。 */
.language-bar + header { margin-top: 44px; top: 44px; }
.nav_content { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 40px; }
/* 翻訳による長さの差は、原文を省略せず同じ列・行の中で折り返す。 */
html:is([lang="en"], [lang="zh-CN"]) .container,
html:is([lang="en"], [lang="zh-CN"]) .parentF,
html:is([lang="en"], [lang="zh-CN"]) .ui-dialog {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
html:is([lang="en"], [lang="zh-CN"]) .menu_item { overflow-wrap: break-word; gap: 10px; align-items: center; }
html:is([lang="en"], [lang="zh-CN"]) .menu_item > span:first-child { min-width: 0; }
html:is([lang="en"], [lang="zh-CN"]) .menu_item > span:last-child { flex-shrink: 0; }
html:is([lang="en"], [lang="zh-CN"]) .tab_list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
html:is([lang="en"], [lang="zh-CN"]) .tab_list li { min-width: 0; }
html:is([lang="en"], [lang="zh-CN"]) .tab_list label {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  overflow-wrap: break-word;
  padding: 8px 4px;
  min-height: 56px;
  height: 100%;
  font-size: 13px;
  line-height: 1.35;
  border-bottom: 6px solid transparent;
}
html:is([lang="en"], [lang="zh-CN"]) .footer_container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  width: 100%;
  gap: 12px 16px;
  padding: 16px 12px;
}
html:is([lang="en"], [lang="zh-CN"]) .footer_list { display: contents; }
html:is([lang="en"], [lang="zh-CN"]) .footer_list li {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-width: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: break-word;
}
html:is([lang="en"], [lang="zh-CN"]) .button_area { align-items: stretch; }
html:is([lang="en"], [lang="zh-CN"]) .button_area .all_pt {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
}
html:is([lang="en"], [lang="zh-CN"]) .fancy-button > span[data-i18n] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  height: 100%;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: normal;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
}
html:is([lang="en"], [lang="zh-CN"]) .ui-dialog-buttonset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  float: none;
}
html:is([lang="en"], [lang="zh-CN"]) .ui-dialog-buttonset button {
  flex: 1 1 100px;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: break-word;
}
