.legal-notice {
  box-sizing: border-box;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(760px, calc(100% - 32px));
  max-width: none;
  max-height: min(540px, calc(100vh - 32px));
  max-height: min(540px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #fff3;
  border-radius: 16px;
  background: #222120;
  color: #fff;
  box-shadow: 0 20px 70px #0009;
  font: 400 1rem/1.58 Arial, sans-serif;
  text-align: left;
}

.legal-notice[open] { display: grid; }

.legal-notice::backdrop {
  background: #090909bf;
  backdrop-filter: blur(7px);
}

html:has(.legal-notice[open]) { overflow: hidden; }

.legal-notice-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 13px clamp(16px, 4vw, 36px);
  border-bottom: 1px solid #fff3;
}

.legal-notice h2, .legal-notice h3 {
  margin: 0;
  font-family: var(--heading, "DIN Condensed", "Arial Narrow", Impact, sans-serif);
  line-height: 1.08;
  text-transform: uppercase;
}

.legal-notice h2 { font-size: clamp(1.7rem, 3.8vw, 2.7rem); }
.legal-notice h3 { font-size: 1.3rem; }

.legal-notice-close {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #fff6;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.legal-notice-close::before, .legal-notice-close::after {
  position: absolute;
  top: calc(50% - 1.5px);
  left: calc(50% - 10px);
  width: 20px;
  height: 3px;
  background: currentColor;
  content: "";
}

.legal-notice-close::before { transform: rotate(45deg); }
.legal-notice-close::after { transform: rotate(-45deg); }
.legal-notice-close:hover { background: #fff2; }

.legal-notice-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 23px clamp(16px, 4vw, 36px) 28px;
  color: #ddd;
  scrollbar-color: #9c9996 #302f2e;
}

.legal-notice-content:focus-visible { outline: 2px solid #ff70b6; outline-offset: -3px; }
.legal-notice-content h3 { color: #fff; }
.legal-notice-content p { margin: 8px 0 0; overflow-wrap: anywhere; }
.legal-notice-content section + section { margin-top: 21px; }
.legal-notice-content a { color: inherit; text-underline-offset: .16em; }
