.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

:global(html[data-theme='dark']) .header {
  border-color: rgb(30 58 138 / 0.8);
  background: rgb(23 37 84 / 0.76);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

.inner {
  display: flex;
  min-height: 3.5rem;
  max-width: var(--container-wide);
  margin-inline: auto;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 2rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brandLink {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #1c1917;
  text-decoration: none;
}

:global(html[data-theme='dark']) .brandLink {
  color: #f5f5f4;
}

@media (min-width: 640px) {
  .brandLink {
    font-size: 0.875rem;
    letter-spacing: 0.2em;
  }
}

.mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  object-fit: contain;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .mark {
    width: 2.25rem;
    height: 2.25rem;
  }
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

@media (min-width: 1024px) {
  .controls {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
}

.pill {
  display: flex;
  align-items: center;
  align-self: flex-start;
  border-radius: 999px;
  border: 1px solid rgb(231 229 228 / 0.8);
  background: rgb(255 255 255 / 0.95);
  padding: 0.125rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

:global(html[data-theme='dark']) .pill {
  border-color: #1e40af;
  background: rgb(23 37 84 / 0.85);
}

@media (min-width: 640px) {
  .pill {
    align-self: auto;
    padding: 0.25rem;
  }
}

.localeBtn {
  display: inline-flex;
  min-width: 4.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: 999px;
  padding: 0.375rem 0.625rem;
  font-size: 11px;
  font-weight: 600;
  color: #44403c;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.localeBtn:hover {
  background: #f5f5f4;
}

:global(html[data-theme='dark']) .localeBtn {
  color: #e7e5e4;
}

:global(html[data-theme='dark']) .localeBtn:hover {
  background: rgb(30 58 138 / 0.4);
}

@media (min-width: 640px) {
  .localeBtn {
    min-width: 5.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
}

.chevron {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform 0.15s;
}

.chevronOpen {
  transform: rotate(180deg);
}

.localeMenuWrap {
  position: relative;
}

.localeMenu {
  position: absolute;
  top: 100%;
  z-index: 30;
  margin-top: 0.5rem;
  width: 12rem;
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  background: rgb(255 255 255 / 0.95);
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px);
  left: 0;
}

@media (min-width: 640px) {
  .localeMenu {
    left: auto;
    right: 0;
  }
}

:global(html[data-theme='dark']) .localeMenu {
  border-color: #1e3a8a;
  background: rgb(23 37 84 / 0.95);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.localeOption {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #44403c;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.localeOption:hover {
  background: #f5f5f4;
  color: #1e3a8a;
}

:global(html[data-theme='dark']) .localeOption {
  color: #e7e5e4;
}

:global(html[data-theme='dark']) .localeOption:hover {
  background: rgb(30 58 138 / 0.4);
  color: #fff;
}

.divider {
  width: 1px;
  height: 1.5rem;
  margin: 0 0.25rem;
  background: #e7e5e4;
}

:global(html[data-theme='dark']) .divider {
  background: #334155;
}

.themeBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.themeBtn:hover {
  background: #f5f5f4;
}

:global(html[data-theme='dark']) .themeBtn:hover {
  background: rgb(30 58 138 / 0.4);
}

@media (min-width: 640px) {
  .themeBtn {
    padding: 0.375rem 0.625rem;
  }
}

.themeLabel {
  border-radius: 999px;
  background: #1e3a8a;
  padding: 0.25rem 0.75rem;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

:global(html[data-theme='dark']) .themeLabel {
  background: #fb923c;
}

@media (min-width: 640px) {
  .themeLabel {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
  }
}
