.cookie-consent {
  position: fixed;
  inset: auto clamp(12px, 2vw, 28px) clamp(12px, 2vw, 28px) auto;
  z-index: 60;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent.is-visible {
  pointer-events: auto;
}

.cookie-consent__panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(46, 77, 63, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 249, 0.96)),
    var(--selko-pattern-light);
  background-size: auto, 380px auto;
  color: #111;
  box-shadow: 0 18px 54px rgba(12, 10, 8, 0.18);
  padding: clamp(14px, 2vw, 18px);
  transform: translateY(14px) scale(0.985);
  opacity: 0;
  transition: opacity 240ms ease, transform 280ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.cookie-consent.is-visible .cookie-consent__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cookie-consent__main {
  padding-right: 28px;
}

.cookie-consent__eyebrow {
  margin: 0 0 6px;
  color: var(--gold-strong);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  line-height: 1;
  text-transform: uppercase;
}

.cookie-consent h2,
.cookie-consent p {
  margin: 0;
}

.cookie-consent h2 {
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 1.75vw, 1.48rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.cookie-consent__main > p {
  margin-top: 8px;
  color: #3c3933;
  font-size: 0.82rem;
  line-height: 1.42;
}

.cookie-consent__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  margin-top: 10px;
}

.cookie-consent__links a {
  color: #111;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-decoration-color: rgba(46, 77, 63, 0.5);
  text-underline-offset: 4px;
  text-transform: uppercase;
}

.cookie-consent__preferences {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.cookie-consent__preferences[hidden] {
  display: none;
}

.cookie-consent__toggle {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.cookie-consent__toggle input {
  width: 34px;
  height: 20px;
  margin: 0;
  accent-color: #2e4d3f;
}

.cookie-consent__toggle strong,
.cookie-consent__toggle small {
  display: block;
}

.cookie-consent__toggle strong {
  font-size: 0.8rem;
  line-height: 1.2;
}

.cookie-consent__toggle small {
  margin-top: 3px;
  color: #686158;
  font-size: 0.7rem;
  line-height: 1.28;
}

.cookie-consent__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  min-width: 0;
}

.cookie-consent__button {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  padding: 0 16px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.cookie-consent__button:hover,
.cookie-consent__button:focus-visible {
  transform: translateY(-1px);
}

.cookie-consent__button--primary,
.cookie-consent__button--save {
  border-color: #101010;
  background: #101010;
  color: #fff;
}

.cookie-consent__button--ghost {
  background: rgba(255, 255, 255, 0.64);
  color: #111;
}

.cookie-consent__button--ghost:hover,
.cookie-consent__button--ghost:focus-visible {
  border-color: rgba(46, 77, 63, 0.44);
  background: #fff;
}

.cookie-consent__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.04);
  color: #111;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.cookie-consent__close:hover,
.cookie-consent__close:focus-visible {
  background: rgba(17, 17, 17, 0.08);
  transform: scale(1.04);
}

.cookie-consent__close svg {
  display: block;
  width: 13px;
  height: 13px;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  fill: none;
  pointer-events: none;
}


@media (max-width: 760px) {
  .cookie-consent {
    inset: auto auto 10px 10px;
    width: calc(100vw - 20px);
    max-width: 340px;
  }

  .cookie-consent__panel {
    max-height: calc(100dvh - 20px);
    overflow: auto;
    border-radius: 18px;
  }

  .cookie-consent__button {
    min-height: 42px;
    padding: 0 8px;
    font-size: 0.64rem;
    letter-spacing: 0.08em;
  }
}

@media (min-width: 761px) {
  body.home .cookie-consent {
    bottom: clamp(102px, 10dvh, 128px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent__panel,
  .cookie-consent__button,
  .cookie-consent__close {
    transition: none;
  }
}


/* Collectible mode: light theme — kept gold action buttons + light-bg-adapted secondary buttons. */
body[data-page-mode="collectible"] .cookie-consent__button--primary,
body[data-page-mode="collectible"] .cookie-consent__button--save {
  border-color: #02412e;
  background: #02412e;
  color: #f3efe7;
}

body[data-page-mode="collectible"] .cookie-consent__button--ghost {
  border-color: rgba(2, 65, 46, 0.32);
  background: rgba(46, 77, 63, 0.08);
  color: #02412e;
}

