.cookie-consent,
.cookie-panel {
  /* Component adapters preserve dark exactly; only public light roots remap them. */
  --cookie-border: rgba(255, 255, 255, .14);
  --cookie-surface: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025)), linear-gradient(145deg, rgba(106, 20, 39, .2), rgba(12, 13, 18, .94) 34%, rgba(8, 9, 13, .98));
  --cookie-shadow: 0 26px 76px rgba(0, 0, 0, .56), inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(255, 255, 255, .035);
  --cookie-eyebrow: #f6bf52;
  --cookie-text: #fff;
  --cookie-muted: rgba(230, 232, 240, .82);
  --cookie-button-border: rgba(255, 255, 255, .13);
  --cookie-button-surface: rgba(255, 255, 255, .055);
  --cookie-button-hover-border: rgba(255, 255, 255, .28);
  --cookie-button-hover-surface: rgba(255, 255, 255, .09);
  --cookie-focus-shadow: 0 0 0 3px rgba(134, 26, 51, .38), 0 0 0 7px rgba(134, 26, 51, .16);
  --cookie-primary-border: rgba(255, 226, 232, .42);
  --cookie-primary-hover-border: rgba(255, 226, 232, .56);
  --cookie-ghost-surface: rgba(255, 255, 255, .02);
  --cookie-overlay: rgba(0, 0, 0, .58);
  --cookie-scrollbar-border: #101014;
  --cookie-close: rgba(255, 255, 255, .9);
  --cookie-focus-ring: rgba(134, 26, 51, .34);
  --cookie-category-border: rgba(255, 255, 255, .1);
  --cookie-category-surface: rgba(255, 255, 255, .035);
  --cookie-switch-border: rgba(255, 255, 255, .14);
  --cookie-switch-surface: rgba(255, 255, 255, .08);
  --cookie-switch-inset: inset 0 1px 0 rgba(255, 255, 255, .06);
  --cookie-switch-knob: rgba(255, 255, 255, .9);
  --cookie-switch-shadow: 0 6px 16px rgba(0, 0, 0, .28);
  --cookie-switch-checked-border: rgba(255, 226, 232, .48);
  --cookie-link: rgba(255, 255, 255, .9);
}

html[data-theme="light"][data-theme-surface="public"] .cookie-consent,
html[data-theme="light"][data-theme-surface="public"] .cookie-panel {
  --cookie-border: var(--yk-public-border, rgba(48, 41, 36, .18));
  --cookie-surface: var(--yk-public-surface, #fffdf9);
  --cookie-shadow: var(--yk-public-shadow-panel, 0 26px 76px rgba(48, 41, 36, .2), inset 0 1px 0 rgba(255, 255, 255, .8));
  --cookie-eyebrow: var(--yk-public-gold, #7d5721);
  --cookie-text: var(--yk-public-text, #302924);
  --cookie-muted: var(--yk-public-muted, #6e645d);
  --cookie-button-border: var(--yk-public-border-strong, #8b7c6f);
  --cookie-button-surface: var(--yk-public-secondary, #eee7de);
  --cookie-button-hover-border: rgba(134, 26, 51, .46);
  --cookie-button-hover-surface: #e7ddd1;
  --cookie-focus-shadow: 0 0 0 3px var(--yk-public-focus-ring, rgba(134, 26, 51, .72)), 0 0 0 7px rgba(134, 26, 51, .12);
  --cookie-primary-border: #861a33;
  --cookie-primary-hover-border: #651225;
  --cookie-ghost-surface: transparent;
  --cookie-overlay: var(--yk-public-overlay, rgba(48, 41, 36, .42));
  --cookie-scrollbar-border: var(--yk-public-surface, #fffdf9);
  --cookie-close: var(--yk-public-text, #302924);
  --cookie-focus-ring: var(--yk-public-focus-ring, rgba(134, 26, 51, .72));
  --cookie-category-border: var(--yk-public-border, rgba(48, 41, 36, .18));
  --cookie-category-surface: var(--yk-public-secondary, #eee7de);
  --cookie-switch-border: rgba(48, 41, 36, .55);
  --cookie-switch-surface: #d7c9bb;
  --cookie-switch-inset: inset 0 1px 0 rgba(48, 41, 36, .06);
  --cookie-switch-knob: var(--yk-public-surface, #fffdf9);
  --cookie-switch-shadow: 0 3px 8px rgba(48, 41, 36, .2);
  --cookie-switch-checked-border: #651225;
  --cookie-link: var(--yk-brand-primary, #861a33);
}

.footer__link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--yk-public-footer-text, rgba(255, 255, 255, .82));
  padding: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer__link-button:hover,
.footer__link-button:focus-visible {
  color: var(--yk-public-link, #fff);
}

.cookie-consent,
.cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.cookie-consent[hidden],
.cookie-panel[hidden] {
  display: none !important;
}

.cookie-consent {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  pointer-events: none;
}

.cookie-consent__card,
.cookie-panel__dialog {
  border: 1px solid var(--cookie-border, rgba(255, 255, 255, .14));
  background: var(--cookie-surface, linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025)), linear-gradient(145deg, rgba(106, 20, 39, .2), rgba(12, 13, 18, .94) 34%, rgba(8, 9, 13, .98)));
  box-shadow: var(--cookie-shadow, 0 26px 76px rgba(0, 0, 0, .56), inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(255, 255, 255, .035));
  backdrop-filter: saturate(135%) blur(18px);
  -webkit-backdrop-filter: saturate(135%) blur(18px);
}

.cookie-consent__card {
  width: min(760px, calc(100vw - 28px));
  pointer-events: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
}

.cookie-consent__eyebrow {
  margin: 0 0 5px;
  color: var(--cookie-eyebrow, #f6bf52);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.cookie-consent h2,
.cookie-panel h2,
.cookie-category h3 {
  margin: 0;
  color: var(--cookie-text, #fff);
  letter-spacing: 0;
}

.cookie-consent h2,
.cookie-panel h2 {
  font-size: clamp(1.18rem, 1rem + .65vw, 1.52rem);
  line-height: 1.15;
  font-weight: 900;
}

.cookie-consent p,
.cookie-panel p {
  color: var(--cookie-muted, rgba(230, 232, 240, .82));
}

.cookie-consent__copy p:last-child {
  margin: 7px 0 0;
  max-width: 62ch;
  font-size: .92rem;
  line-height: 1.5;
}

.cookie-consent__actions,
.cookie-panel__actions {
  display: flex;
  gap: 8px;
}

.cookie-consent__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cookie-button {
  min-height: 42px;
  border: 1px solid var(--cookie-button-border, rgba(255, 255, 255, .13));
  border-radius: 12px;
  background: var(--cookie-button-surface, rgba(255, 255, 255, .055));
  color: var(--cookie-text, #fff);
  padding: .62rem .84rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.cookie-button:hover,
.cookie-button:focus-visible {
  border-color: var(--cookie-button-hover-border, rgba(255, 255, 255, .28));
  background: var(--cookie-button-hover-surface, rgba(255, 255, 255, .09));
}

.cookie-button:focus-visible {
  outline: 0;
  box-shadow: var(--cookie-focus-shadow, 0 0 0 3px rgba(134, 26, 51, .38), 0 0 0 7px rgba(134, 26, 51, .16));
}

.cookie-button:active {
  transform: translateY(1px) scale(.99);
}

.cookie-button--primary {
  border-color: var(--cookie-primary-border, rgba(255, 226, 232, .42));
  color: #fff;
  background: linear-gradient(180deg, #a42d49, #7d1d34);
  box-shadow: 0 12px 24px rgba(134, 26, 51, .28);
}

.cookie-button--primary:hover,
.cookie-button--primary:focus-visible {
  background: linear-gradient(180deg, #b23552, #861f39);
  border-color: var(--cookie-primary-hover-border, rgba(255, 226, 232, .56));
}

.cookie-button--ghost {
  background: var(--cookie-ghost-surface, rgba(255, 255, 255, .02));
}

.cookie-panel {
  display: grid;
  place-items: center;
  padding: 16px;
}

.cookie-panel__backdrop {
  position: absolute;
  inset: 0;
  background: var(--cookie-overlay, rgba(0, 0, 0, .58));
}

.cookie-panel__dialog {
  position: relative;
  z-index: 1;
  width: min(660px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 32px));
  max-height: min(760px, calc(100svh - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  overflow: auto;
  padding: 18px;
  border-radius: 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 31, 47, .82) transparent;
}

.cookie-panel__dialog::-webkit-scrollbar {
  width: 10px;
}

.cookie-panel__dialog::-webkit-scrollbar-track {
  background: transparent;
}

.cookie-panel__dialog::-webkit-scrollbar-thumb {
  border: 3px solid var(--cookie-scrollbar-border, #101014);
  border-radius: 999px;
  background: linear-gradient(180deg, #7d1f2f, rgba(85, 18, 31, .82));
}

.cookie-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.cookie-panel__close {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  opacity: .82;
  transition: opacity .2s ease, transform .16s ease;
}

.cookie-panel__close::before,
.cookie-panel__close::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--cookie-close, rgba(255, 255, 255, .9));
}

.cookie-panel__close::before {
  transform: rotate(45deg);
}

.cookie-panel__close::after {
  transform: rotate(-45deg);
}

.cookie-panel__close:hover,
.cookie-panel__close:focus-visible {
  opacity: 1;
  background: transparent;
}

.cookie-panel__close:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--cookie-focus-ring, rgba(134, 26, 51, .34));
}

.cookie-panel__lead {
  margin: 12px 0 16px;
  font-size: .94rem;
  line-height: 1.52;
}

.cookie-panel__list {
  display: grid;
  gap: 10px;
}

.cookie-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--cookie-category-border, rgba(255, 255, 255, .1));
  border-radius: 16px;
  background: var(--cookie-category-surface, rgba(255, 255, 255, .035));
}

.cookie-category h3 {
  font-size: 1rem;
  font-weight: 900;
}

.cookie-category p {
  margin: 5px 0 0;
  font-size: .86rem;
  line-height: 1.48;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 78px;
  min-height: 38px;
  cursor: pointer;
}

.cookie-switch input {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  appearance: none;
  -webkit-appearance: none;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  pointer-events: none;
}

.cookie-switch span {
  position: relative;
  width: 58px;
  height: 32px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  text-indent: -999px;
  border: 1px solid var(--cookie-switch-border, rgba(255, 255, 255, .14));
  border-radius: 999px;
  background: var(--cookie-switch-surface, rgba(255, 255, 255, .08));
  box-shadow: var(--cookie-switch-inset, inset 0 1px 0 rgba(255, 255, 255, .06));
  transition: background .2s ease, border-color .2s ease;
}

.cookie-switch span::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--cookie-switch-knob, rgba(255, 255, 255, .9));
  box-shadow: var(--cookie-switch-shadow, 0 6px 16px rgba(0, 0, 0, .28));
  transition: transform .2s ease, background .2s ease;
}

.cookie-switch input:checked + span {
  border-color: var(--cookie-switch-checked-border, rgba(255, 226, 232, .48));
  background: linear-gradient(180deg, #8f243c, #65172a);
}

.cookie-switch input:checked + span::before {
  transform: translateX(26px);
  background: #fff;
}

.cookie-switch input:focus-visible + span {
  box-shadow: 0 0 0 3px var(--cookie-focus-ring, rgba(134, 26, 51, .34)), var(--cookie-switch-inset, inset 0 1px 0 rgba(255, 255, 255, .06));
}

.cookie-switch--locked {
  cursor: not-allowed;
}

.cookie-switch--locked span {
  opacity: .72;
}

.cookie-switch--locked input:checked + span::before {
  transform: translateX(26px);
}

.cookie-panel__actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 16px;
}

.cookie-panel__note {
  margin: 14px 0 0;
  font-size: .82rem;
  text-align: center;
}

.cookie-panel__note a {
  color: var(--cookie-link, rgba(255, 255, 255, .9));
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.cookie-panel-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .cookie-consent {
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .cookie-consent__card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .cookie-consent__actions .cookie-button--primary {
    grid-column: 1 / -1;
  }

  .cookie-panel {
    align-items: end;
    padding: 10px;
  }

  .cookie-panel__dialog {
    width: 100%;
    max-height: min(760px, calc(100vh - 20px));
    max-height: min(760px, calc(100svh - 20px));
    max-height: min(760px, calc(100dvh - 20px));
    padding: 16px;
    border-radius: 20px;
  }

  .cookie-category {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cookie-panel__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-button {
    width: 100%;
  }
}
