/* Warm paper controls, with a local, accessible language listbox. */
.language-picker {
  position: relative;
  flex-shrink: 0;
}
.language-picker.is-enhanced .language-native {
  display: none;
}
.language-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 191px;
  min-height: 46px;
  padding: 7px 11px 7px 8px;
  border: 1px solid #d9dccf;
  border-radius: 12px;
  background: #fffef8;
  color: #424b36;
  text-align: start;
  box-shadow: 0 2px 3px #323b2103;
  transition:
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
.language-trigger:hover {
  background: #fffdf2;
  border-color: #c2c5ae;
}
.language-trigger:focus-visible {
  outline: 3px solid #d9bc5d55;
  outline-offset: 3px;
}
.is-open > .language-trigger {
  border-color: #baa34d;
  background: #fffdf3;
  box-shadow: 0 0 0 3px #d5b95a16;
}
.language-trigger-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1efdf;
  color: #737a5f;
}
.language-trigger-icon > .icon {
  width: 17px;
  height: 17px;
}
#language-current-label,
#language-current-short {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
#language-current-short {
  display: none;
}
.language-trigger-chevron {
  width: 13px;
  height: 13px;
  color: #7d856c;
  transition: transform 0.2s;
}
.is-open .language-trigger-chevron {
  transform: rotate(180deg);
}
.language-popover {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 11px);
  z-index: 30;
  width: 280px;
  padding: 9px;
  border: 1px solid #dedfcf;
  border-radius: 17px;
  background: #fffef9;
  box-shadow:
    0 20px 50px #313a2821,
    0 4px 12px #313a2808;
  animation: language-appear 0.18s var(--ease) both;
  transform-origin: top right;
}
.language-popover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 39px;
  margin: 0 5px 6px;
  padding: 0 4px 7px;
  border-bottom: 1px solid #eeeee3;
  color: #737d63;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15px;
}
.language-count {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 20px;
  border: 1px solid #e5e4d6;
  border-radius: 6px;
  color: #8b917c;
  font-size: 10px;
  font-weight: 400;
}
.language-listbox {
  display: grid;
  gap: 3px;
  max-height: min(390px, calc(100dvh - 178px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d1d2bf transparent;
}
.language-option {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 43px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #49513e;
  text-align: start;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.language-option:hover {
  background: #f4f4e9;
}
.language-option[aria-selected="true"] {
  border-color: #ead99f;
  background: #fbf2d1;
  color: #685422;
}
.language-option:focus-visible {
  outline: 2px solid #ad8c30;
  outline-offset: -2px;
  background: #f7efd5;
}
.language-code {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 27px;
  border: 1px solid #e4e5d9;
  border-radius: 7px;
  background: #f8f8f0;
  color: #879077;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.7px;
}
[aria-selected="true"] > .language-code {
  border-color: #e1c875;
  background: #f3dc8b;
  color: #7d6223;
}
.language-option-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}
.language-option-check {
  width: 16px;
  height: 16px;
  color: #9c7b27;
  opacity: 0;
}
[aria-selected="true"] > .language-option-check {
  opacity: 1;
}
.site-header .wallet-button {
  min-height: 46px;
  max-width: 253px;
  gap: 10px;
  padding: 7px 12px 7px 8px;
  border: 1px solid #343c2d;
  border-radius: 12px;
  background: #30382a;
  color: #fffef5;
  box-shadow: 0 3px 6px #30382a0c;
  font-size: 12px;
}
.site-header .wallet-button:hover {
  border-color: #444e3a;
  background: #424c37;
}
.site-header .wallet-button > .header-action-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 1px solid #ffffff15;
  border-radius: 8px;
  background: #ffffff0b;
  color: #e2d89e;
}
.wallet-button .header-action-icon > .icon {
  width: 16px;
  height: 16px;
}
.wallet-button .header-action-arrow {
  width: 14px;
  height: 14px;
  margin-inline-start: 2px;
  color: #ddcf8d;
  transition: transform 0.2s;
}
.wallet-button:hover .header-action-arrow {
  transform: translate(1px, -1px);
}
@keyframes language-appear {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 1199px) {
  .language-trigger {
    width: 179px;
  }
  .site-header .wallet-button {
    gap: 8px;
    font-size: 11px;
  }
}
@media (min-width: 768px) and (max-width: 899px) {
  .language-trigger {
    width: 150px;
    gap: 6px;
    padding-inline: 7px;
  }
  #language-current-label {
    font-size: 10px;
  }
  .language-trigger-icon {
    width: 24px;
    height: 26px;
  }
  .site-header .wallet-button {
    max-width: 160px;
    font-size: 10px;
    gap: 7px;
    padding-inline-end: 9px;
  }
  .wallet-button .header-action-arrow {
    display: none;
  }
}
@media (max-width: 767px) {
  .language-picker {
    position: static;
  }
  .language-popover {
    top: calc(100% + 8px);
    inset-inline-end: 20px;
    width: min(304px, calc(100vw - 40px));
  }
  .language-trigger {
    width: 146px;
    min-height: 40px;
    gap: 7px;
    padding: 7px 8px;
    border-radius: 11px;
  }
  .language-trigger-icon {
    width: 23px;
    height: 24px;
    border-radius: 7px;
  }
  .language-trigger-icon > .icon {
    width: 15px;
    height: 15px;
  }
  #language-current-label {
    display: none;
  }
  #language-current-short {
    display: block;
    font-size: 11px;
  }
  .language-trigger-chevron {
    width: 11px;
    height: 11px;
  }
  .header-actions > .menu-button {
    width: 36px;
    min-width: 36px;
    height: 40px;
    padding: 7px;
    border: 1px solid #dcdfd0;
    border-radius: 10px;
    background: #fffef8;
  }
  .menu-button .icon {
    width: 19px;
    height: 19px;
  }
}
@media (max-width: 359px) {
  .header-inner .brand {
    font-size: 20px;
    gap: 6px;
  }
  .language-trigger {
    width: 112px;
    gap: 5px;
    padding-inline: 6px;
  }
  .language-trigger-icon {
    width: 18px;
    height: 22px;
    background: transparent;
  }
  #language-current-short {
    font-size: 10px;
  }
  .header-actions > .menu-button {
    width: 30px;
    min-width: 30px;
    padding-inline: 4px;
  }
  .language-popover {
    inset-inline-end: 16px;
    width: calc(100vw - 32px);
  }
}
