/* Brand-aligned revision; scoped to the consent module and its reopen entry. */
#httx-cookie-consent {
  --httx-consent-accent: #4166eb;
  --httx-consent-accent-text: #fff;
  --httx-consent-bg: #fff;
  --httx-consent-text: #202a3d;
  --httx-consent-border: #e1e6ee;
  --httx-consent-soft: var(--httx-consent-bg);
  --httx-consent-muted: var(--httx-consent-text);
  color: var(--httx-consent-text);
  font: 400 14px/1.6 "思源黑体 CN", "Source Han Sans CN", "noto sans", "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", Arial, tahoma, Helvetica, sans-serif;
  text-align: left;
}
@supports (color: color-mix(in srgb, black, white)) {
  #httx-cookie-consent {
    --httx-consent-border: color-mix(in srgb, var(--httx-consent-text) 13%, var(--httx-consent-bg));
  }
}
#httx-cookie-consent *, #httx-cookie-consent *::before, #httx-cookie-consent *::after { box-sizing: border-box; }
#httx-cookie-consent [hidden], #httx-cookie-consent[hidden] { display: none !important; }
#httx-cookie-backdrop { position: fixed; z-index: 2147482999; inset: 0; background: rgb(16 24 40 / 42%); pointer-events: auto; touch-action: none; }
#httx-cookie-banner, #httx-cookie-preferences {
  position: fixed;
  border: 1px solid var(--httx-consent-border);
  border-radius: 16px;
  background: var(--httx-consent-bg);
  color: var(--httx-consent-text);
  box-shadow: 0 24px 70px rgb(25 34 52 / 14%);
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
}
#httx-cookie-banner {
  z-index: 2147483000;
  inset: auto auto max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  width: min(460px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: 24px;
}
#httx-cookie-consent[data-position="right"] #httx-cookie-banner { left: auto; right: max(24px, env(safe-area-inset-right)); }
#httx-cookie-consent h2, #httx-cookie-consent h3 { color: inherit; font-family: inherit; font-size: 20px; font-weight: 600; line-height: 1.35; margin: 0; padding: 0; }
#httx-cookie-consent h3 { font-size: 16px; }
#httx-cookie-consent p { color: inherit; font-size: inherit; line-height: inherit; margin: 0 0 12px; }
#httx-cookie-consent p:last-child { margin-bottom: 0; }
#httx-cookie-consent a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
#httx-cookie-consent .httx-cookie-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
#httx-cookie-consent .httx-cookie-heading h2 { min-width: 0; }
#httx-cookie-consent .httx-cookie-icon { display: inline-flex; flex: 0 0 40px; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--httx-consent-border); border-radius: 12px; background: var(--httx-consent-soft); color: var(--httx-consent-text); }
#httx-cookie-consent .httx-cookie-icon svg { display: block; width: 22px; height: 22px; }
#httx-cookie-consent .httx-cookie-description { color: var(--httx-consent-muted); margin: 0 0 20px; }
#httx-cookie-consent button, [data-consent-action="settings"].httx-cookie-reopen { appearance: none; font: inherit; cursor: pointer; text-transform: none; letter-spacing: normal; }
#httx-cookie-consent button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  border: 1px solid var(--httx-consent-border);
  border-radius: 12px;
  padding: 10px 18px;
  background: var(--httx-consent-bg);
  color: var(--httx-consent-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}
#httx-cookie-consent [data-consent-action="accept"], #httx-cookie-consent [data-consent-action="save"] { color: var(--httx-consent-accent-text); background: var(--httx-consent-accent); border-color: var(--httx-consent-accent); }
#httx-cookie-consent button:hover { filter: brightness(.94); }
#httx-cookie-consent .httx-cookie-actions { display: flex; align-items: stretch; gap: 12px; margin: 0; }
#httx-cookie-consent .httx-cookie-actions > button { flex: 1 1 0; }
#httx-cookie-consent .httx-cookie-banner-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; border-top: 1px solid var(--httx-consent-border); margin-top: 18px; padding-top: 10px; font-size: 13px; }
#httx-cookie-consent .httx-cookie-banner-footer a { display: inline-flex; align-items: center; min-height: 44px; }
#httx-cookie-consent [data-consent-action="settings"] { border: 0; border-radius: 8px; margin: 0; padding: 10px 0; background: transparent; color: var(--httx-consent-text); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
#httx-cookie-consent :focus-visible, [data-consent-action="settings"].httx-cookie-reopen:focus-visible { outline: 3px solid var(--httx-consent-text, #202a3d); outline-offset: 3px; }
#httx-cookie-preferences {
  z-index: 2147483001;
  display: flex;
  flex-direction: column;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(600px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  max-height: min(720px, calc(100dvh - 48px));
  overflow: auto;
  padding: 0;
}
#httx-cookie-consent .httx-cookie-panel-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--httx-consent-border); padding: 20px 24px; }
#httx-cookie-consent .httx-cookie-panel-header h2 { min-width: 0; }
#httx-cookie-consent button[data-consent-action="close"] { flex: 0 0 44px; width: 44px; height: 44px; padding: 10px; border-color: transparent; border-radius: 12px; background: var(--httx-consent-soft); }
#httx-cookie-consent button[data-consent-action="close"] svg { display: block; width: 24px; height: 24px; flex: 0 0 24px; }
#httx-cookie-consent .httx-cookie-panel-body { flex: 1 1 auto; min-height: 160px; overflow: auto; overscroll-behavior: contain; padding: 24px; scrollbar-gutter: stable; }
#httx-cookie-consent .httx-cookie-panel-footer { flex: 0 0 auto; border-top: 1px solid var(--httx-consent-border); background: var(--httx-consent-bg); padding: 20px 24px; }
#httx-cookie-consent [data-consent-category-row], #httx-cookie-consent .httx-cookie-category { display: block; margin: 16px 0 0; border: 1px solid var(--httx-consent-border); border-radius: 12px; padding: 16px; background: var(--httx-consent-soft); }
#httx-cookie-consent .httx-cookie-panel-body > .httx-cookie-category:first-child { margin-top: 0; }
#httx-cookie-consent .httx-cookie-category-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
#httx-cookie-consent .httx-cookie-category-heading label { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; font-weight: 600; }
#httx-cookie-consent label { color: inherit; font-size: inherit; cursor: pointer; }
#httx-cookie-consent .httx-cookie-always-active { display: inline-block; border: 1px solid var(--httx-consent-border); border-radius: 999px; padding: 3px 9px; color: var(--httx-consent-text); background: var(--httx-consent-bg); font-size: 12px; font-weight: 600; line-height: 1.5; }
#httx-cookie-consent .httx-cookie-category p { color: var(--httx-consent-muted); }
#httx-cookie-consent input[type="checkbox"] { appearance: auto; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--httx-consent-accent); }
#httx-cookie-consent input:disabled { cursor: default; }
#httx-cookie-consent [data-consent-status] { position: fixed; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-consent-action="settings"].httx-cookie-reopen { min-height: 44px; background: transparent; color: inherit; border: 0; padding: 10px 4px; text-decoration: underline; text-underline-offset: 3px; }
/* The footer reopen control follows Privacy/Legal typography and menu wrapping. */
.httx-footer__bottom .httx-legal-menu { align-items: center; }
.httx-footer__bottom .httx-legal-menu .httx-cookie-reopen {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, .8);
  font: inherit;
  text-align: inherit;
  text-decoration: none;
  white-space: normal;
  box-shadow: none;
}
.httx-footer__bottom .httx-legal-menu .httx-cookie-reopen:hover { color: #fff; }
.httx-footer__bottom .httx-legal-menu .httx-cookie-reopen:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (max-width: 540px) {
  #httx-cookie-banner { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); width: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 20px; }
  #httx-cookie-consent[data-position="right"] #httx-cookie-banner { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); }
  #httx-cookie-preferences { width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  #httx-cookie-consent .httx-cookie-panel-header { padding: 16px 20px; gap: 12px; }
  #httx-cookie-consent .httx-cookie-panel-body { padding: 20px; }
  #httx-cookie-consent .httx-cookie-panel-footer { padding: 16px 20px; }
  #httx-cookie-consent .httx-cookie-actions { gap: 10px; }
  #httx-cookie-consent .httx-cookie-actions > button { padding-inline: 12px; }
  #httx-cookie-consent .httx-cookie-category { padding: 12px; }
}
/* Short/zoomed landscape views scroll the complete modal, including its actions. */
@media (max-height: 480px) {
  #httx-cookie-preferences { display: block; }
  #httx-cookie-consent .httx-cookie-panel-body { overflow: visible; scrollbar-gutter: auto; }
}
@media (prefers-reduced-motion: reduce) { #httx-cookie-consent * { scroll-behavior: auto; } }
