.cpk {
  position: relative;
  display: inline-flex;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}
.cpk *,
.cpk *::before,
.cpk *::after {
  box-sizing: border-box;
}

.cpk-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px 0 9px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #1d1d1f;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cpk-btn:hover, .cpk.is-open .cpk-btn {
  border-color: rgba(0, 0, 0, 0.22);
  background: #f6f5f4;
}
.cpk-btn:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}
.cpk-btn .bi {
  font-size: 0.95rem;
  line-height: 1;
}

.cpk-flag,
.cpk-item__flag {
  display: block;
  flex: none;
  width: 20px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.cpk-flag[hidden],
.cpk-item__flag[hidden] {
  display: none;
}

.cpk-globe[hidden] {
  display: none;
}

.cpk-chev {
  font-size: 0.65rem !important;
  color: #86868b;
  transition: transform 0.2s;
}
.cpk.is-open .cpk-chev {
  transform: rotate(180deg);
}

.cpk-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 300px;
  max-height: min(440px, 70vh);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  overflow: hidden;
  animation: cpk-in 0.18s ease-out;
}
.cpk-panel[hidden] {
  display: none;
}
.cpk--up .cpk-panel {
  top: auto;
  right: 0;
  bottom: calc(100% + 10px);
  left: auto;
  width: min(300px, 100vw - 48px);
}

.cpk-search {
  position: relative;
  padding: 12px 12px 8px;
}
.cpk-search i {
  position: absolute;
  top: 50%;
  left: 24px;
  margin-top: 2px;
  color: #86868b;
  font-size: 0.85rem;
  transform: translateY(-50%);
}
.cpk-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #f5f5f7;
  color: inherit;
  font: inherit;
  font-size: 16px;
  outline: none;
}
.cpk-search input:focus {
  border-color: #0071e3;
  background: #fff;
}
@media (hover: hover) {
  .cpk-search input {
    font-size: 0.88rem;
  }
}

.cpk-list {
  flex: 1;
  min-height: 0;
  padding: 2px 6px 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

:is(#siteNav, body) .cpk .cpk-label {
  margin: 10px 8px 4px;
  color: #86868b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
:is(#siteNav, body) .cpk .cpk-label[hidden] {
  display: none;
}

:is(#siteNav, body) .cpk .cpk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}
:is(#siteNav, body) .cpk .cpk-item[hidden] {
  display: none;
}
:is(#siteNav, body) .cpk .cpk-item:hover, :is(#siteNav, body) .cpk .cpk-item:focus-visible {
  background: #f5f5f7;
  outline: none;
}
:is(#siteNav, body) .cpk .cpk-item.is-current {
  font-weight: 600;
}
:is(#siteNav, body) .cpk .cpk-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
:is(#siteNav, body) .cpk .cpk-item__cur {
  flex: none;
  color: #86868b;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}
:is(#siteNav, body) .cpk .cpk-item__tick {
  flex: none;
  color: #0071e3;
}

:is(#siteNav, body) .cpk .cpk-empty {
  margin: 0;
  padding: 18px 10px;
  color: #86868b;
  font-size: 0.85rem;
  text-align: center;
}

:is(#siteNav, body) .cpk .cpk-note {
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: #86868b;
  font-size: 0.74rem;
  line-height: 1.4;
}

@keyframes cpk-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cpk-panel {
    animation: none;
  }
}
#siteNav .endblock-navigation > .cpk {
  margin-left: auto;
}
