@font-face {
  font-family: "Illustrationz Picker JP";
  src: url("illustrationz-picker-ja.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Illustrationz Picker KR";
  src: url("illustrationz-picker-ko.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Illustrationz Picker SC";
  src: url("illustrationz-picker-zh-hans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Keep the shared treatment ahead of selectors from the host site's header. */
:root body details.td-language-picker[data-td-language-picker] {
  position: relative;
  flex: none;
  font: 14px/1.4 Arial, sans-serif;
  color: var(--td-color-text, #20221f);
}

:root body details.td-language-picker[data-td-language-picker] > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  list-style: none;
  text-align: start;
}

details[data-td-language-picker] > summary::-webkit-details-marker {
  display: none;
}

:root body details.td-language-picker[data-td-language-picker] > summary:hover,
:root body details.td-language-picker[data-td-language-picker] [data-td-language-list] > a:hover {
  background: var(--td-color-surface, #efe9dc);
}

:root body details.td-language-picker[data-td-language-picker] > summary:focus-visible,
:root body details.td-language-picker[data-td-language-picker] [data-td-language-list] > a:focus-visible {
  outline: 2px solid var(--td-color-focus, #a62441);
  outline-offset: 2px;
}

:root body details.td-language-picker[data-td-language-picker] > summary > svg {
  flex: none;
  width: 19px;
  height: 19px;
}

:root body details.td-language-picker[data-td-language-picker] > [data-td-language-list] {
  position: absolute;
  inset: calc(100% + 10px) 0 auto auto;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  box-sizing: border-box;
  width: max-content;
  min-width: 190px;
  max-width: calc(100vw - 20px);
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  padding: 10px;
  margin: 0;
  overflow: auto;
  background: var(--td-color-page, #f8f8f2);
  color: inherit;
  border: 1px solid var(--td-color-border, #ded6c7);
  border-radius: 8px;
  box-shadow: 0 8px 24px #20221f14;
  translate: var(--td-language-shift, 0px) 0;
  z-index: 20;
}

:root body details.td-language-picker[data-td-language-picker][open] > [data-td-language-list] {
  display: flex;
}

:root body details.td-language-picker[data-td-language-picker]:not([open]) > [data-td-language-list] {
  display: none;
}

:root body details.td-language-picker[data-td-language-picker] [data-td-language-list] > a {
  display: flex;
  align-items: center;
  flex: none;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 10px;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  background: transparent;
  color: inherit;
  font: 700 16px/1.4 Arial, sans-serif;
  letter-spacing: normal;
  text-decoration: none;
  white-space: nowrap;
}

:root body details.td-language-picker[data-td-language-picker] [data-td-language-list] > a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

:root body details.td-language-picker[data-td-language-picker] :is(summary span, [data-td-language-list] > a)[lang="ja"] {
  font-family: "Illustrationz Picker JP", sans-serif;
}

:root body details.td-language-picker[data-td-language-picker] :is(summary span, [data-td-language-list] > a)[lang="ko"] {
  font-family: "Illustrationz Picker KR", sans-serif;
}

:root body details.td-language-picker[data-td-language-picker] :is(summary span, [data-td-language-list] > a)[lang="zh-Hans"] {
  font-family: "Illustrationz Picker SC", sans-serif;
}

@media (max-width: 760px) {
  :root body details.td-language-picker[data-td-language-picker] > summary { padding-inline: 0; }
}

@media (max-width: 360px) {
  :root body details.td-language-picker[data-td-language-picker] > summary > span[lang|="pt"] {
    max-width: 6em;
    white-space: normal;
    line-height: 1.15;
  }
}
