/* Age check — based on the supplied paper artwork. This file is loaded last
   so it only controls the entry overlay and does not affect page sections. */
html:not(.age-confirmed) body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;
}

html:not(.age-confirmed) {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.age-confirmed .age-gate {
  display: none !important;
}

.age-gate {
  position: fixed !important;
  z-index: 5000 !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  min-height: 100dvh !important;
  padding: clamp(28px, 3vw, 56px) !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  background: var(--green, #17352d) !important;
  isolation: isolate;
}

/* The entry check uses the exact document grain stack.  Placing it below
   the dialogue content lets it blend only with the green base. */
.age-gate::before,
.age-gate::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-position: center top, 0 0;
  background-repeat: repeat-y, repeat;
}

.age-gate::before {
  background-image: url("../images/textures/paper-grain.jpg"), url("../images/textures/grain.svg");
  background-size: max(100%, 1200px) auto, 160px 160px;
  background-blend-mode: multiply;
  mix-blend-mode: overlay;
  opacity: .48;
  filter: grayscale(1) contrast(1.8);
}

.age-gate::after {
  background-image: url("../images/textures/paper-grain.jpg"), url("../images/textures/grain.svg");
  background-size: max(100%, 1200px) auto, 220px 220px;
  background-blend-mode: multiply;
  mix-blend-mode: multiply;
  opacity: .34;
  filter: grayscale(1) contrast(1.38);
}

.age-gate__masthead {
  position: fixed !important;
  z-index: 2 !important;
  top: clamp(22px, 3vw, 48px) !important;
  left: clamp(22px, 3vw, 48px) !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}

.age-gate__masthead .age-gate__logo,
.age-gate__logo {
  display: block !important;
  width: clamp(142px, 12vw, 220px) !important;
  height: auto !important;
  /* Turn both logo layers into the same light paper tone. */
  filter: brightness(0) saturate(100%) invert(94%) sepia(16%) saturate(686%) hue-rotate(336deg) brightness(103%) contrast(92%) !important;
}

.age-gate__paper {
  position: relative !important;
  z-index: 1 !important;
  box-sizing: border-box !important;
  width: clamp(560px, 40vw, 820px) !important;
  max-width: calc(100vw - 48px) !important;
  aspect-ratio: 1108 / 1140 !important;
  margin: 0 !important;
  overflow: visible !important;
  background: url("../images/cards/age-verification-paper.webp") center / 100% 100% no-repeat !important;
  filter: drop-shadow(10px 10px 0 rgb(0 0 0 / .22));
  clip-path: none !important;
  -webkit-mask: none !important;
  mask: none !important;
  container-type: inline-size;
}

.age-gate__paper::before,
.age-gate__paper::after,
.age-gate__panel::before,
.age-gate__panel::after {
  content: none !important;
  display: none !important;
}

.age-gate__panel {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  /* Reset the older menu-panel flex gap so spacing is deliberate below. */
  gap: 0 !important;
  /* Wider inner margins keep the typography clear of the torn paper edge. */
  padding: 16cqw 16cqw 14cqw !important;
  color: var(--green, #17352d) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  animation: none !important;
}

.age-gate__age {
  margin: 0 0 4.5cqw !important;
  color: var(--orange, #c35c32) !important;
  font-family: "Bebas Neue", Impact, sans-serif !important;
  font-size: 21cqw !important;
  font-weight: 400 !important;
  line-height: .84 !important;
  letter-spacing: -.02em !important;
}

.age-gate h1 {
  max-width: none !important;
  margin: 0 !important;
  color: var(--green, #17352d) !important;
  font-family: "Bebas Neue", Impact, sans-serif !important;
  font-size: 9.2cqw !important;
  font-weight: 400 !important;
  line-height: .96 !important;
  letter-spacing: .01em !important;
}

.age-gate__copy {
  max-width: 25ch !important;
  margin: 3.2cqw 0 0 !important;
  color: var(--green, #17352d) !important;
  font-family: "Iosevka Charon Mono", ui-monospace, monospace !important;
  font-size: 3.5cqw !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

.age-gate__actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 1fr !important;
  gap: 2.2cqw !important;
  width: min(100%, 78cqw) !important;
  margin: 2.6cqw 0 0 !important;
  padding: 0 !important;
}

.age-gate__button {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 7.5cqw !important;
  padding: .5em .65em .45em !important;
  color: var(--paper, #f4ead7) !important;
  font-family: "Bebas Neue", Impact, sans-serif !important;
  font-size: 4.05cqw !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: .015em !important;
  text-align: center !important;
  white-space: nowrap !important;
  cursor: pointer;
  border: .6cqw solid var(--paper, #f4ead7) !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}

.age-gate__button--confirm {
  background: var(--orange, #c35c32) !important;
  /* The approval action is intentionally a clean orange fill, with no white
     or dark perimeter competing with the paper panel. */
  border: 0 !important;
  outline: 0 !important;
  box-shadow: 5px 5px 2px rgb(0 0 0 / .25) !important;
}

.age-gate__button--deny {
  /* Match the existing dark site CTA: the action keeps its age-gate size and
     placement, but uses the same solid green, paper lettering and soft raw
     shadow as “Mehr erfahren”. */
  background: var(--green, #17352d) !important;
  border: 0 !important;
  box-shadow: 5px 5px 2px rgb(0 0 0 / .25) !important;
}

.age-gate__button:hover,
.age-gate__button:focus-visible {
  transform: translate(.25cqw, .25cqw) !important;
  box-shadow: none !important;
}

.age-gate__button:focus-visible {
  outline: .35cqw solid var(--orange, #c35c32) !important;
  outline-offset: .45cqw !important;
}

.age-gate__button--confirm:focus-visible {
  outline: 0 !important;
  outline-offset: 0 !important;
}

@media (max-width: 700px) {
  .age-gate {
    place-items: start center !important;
    padding: clamp(96px, 12dvh, 132px) 14px 24px !important;
  }

  .age-gate__masthead {
    position: absolute !important;
    top: 20px !important;
    left: 22px !important;
  }

  .age-gate__masthead .age-gate__logo,
  .age-gate__logo {
    width: clamp(126px, 37vw, 170px) !important;
  }

  .age-gate__paper {
    width: min(100%, 560px) !important;
    max-width: 100% !important;
    aspect-ratio: 1108 / 1140 !important;
    filter: drop-shadow(7px 7px 0 rgb(0 0 0 / .22));
  }

  .age-gate__panel {
    padding: 15.5cqw 15.5cqw 13cqw !important;
  }

  .age-gate__age {
    margin-bottom: 4.5cqw !important;
    font-size: 21cqw !important;
  }

  .age-gate h1 {
    font-size: 9.2cqw !important;
  }

  .age-gate__copy {
    max-width: 26ch !important;
    margin-top: 3.2cqw !important;
    font-size: 3.5cqw !important;
  }

  .age-gate__actions {
    gap: 2.2cqw !important;
    width: min(100%, 78cqw) !important;
    margin-top: 2.6cqw !important;
  }
}

@media (max-width: 430px) {
  .age-gate {
    padding: 68px 10px 16px !important;
  }

  .age-gate__masthead {
    top: 16px !important;
    left: 18px !important;
  }

  .age-gate__paper {
    width: 100% !important;
  }

  .age-gate__panel {
    padding: 15.5cqw 15.5cqw 12.5cqw !important;
  }

  .age-gate__copy {
    max-width: 25ch !important;
  }

  .age-gate__actions {
    width: min(100%, 78cqw) !important;
    gap: 2.4cqw !important;
  }

  .age-gate__button {
    min-height: 44px !important;
    font-size: clamp(15px, 4.05cqw, 31px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .age-gate__button { transition: none !important; }
}
