.privacy-banner[hidden] {
  display: none !important;
}

.privacy-banner,
.privacy-dialog {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 12px 40px #11151b26;
  font-size: 1rem;
}

.privacy-banner {
  position: fixed;
  z-index: 110;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(28rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: auto;
}

.privacy-banner h2,
.privacy-dialog h2 {
  max-width: none;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.privacy-banner a,
.privacy-dialog a,
.privacy-settings,
.legal-page a:not(.legal-brand) {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.privacy-settings {
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  border: 0;
  background: transparent;
  font-size: 0.875rem;
}

.privacy-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.privacy-actions .button {
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
}

.privacy-actions .button:hover {
  background: var(--light);
}

.privacy-dialog {
  width: min(30rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
}

.privacy-dialog:not([open]) {
  display: none;
}

.privacy-dialog[data-inline] {
  position: fixed;
  z-index: 120;
  inset: auto 1rem 1rem auto;
  margin: 0;
  overflow: auto;
}

.privacy-dialog::backdrop {
  background: #11151b99;
}

.privacy-dialog label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 0.6rem;
}

.privacy-dialog label:first-of-type {
  margin-top: 0.75rem;
}

.privacy-dialog input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--blue);
}

.privacy-status:not(:empty) {
  position: fixed;
  z-index: 110;
  right: 1rem;
  bottom: 1rem;
  width: min(27rem, calc(100% - 2rem));
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px #11151b1a;
}

.legal-header {
  padding-block: 1rem;
  background: var(--dark);
  color: white;
}

.legal-header .container,
.legal-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.legal-header img {
  width: 100px;
  height: auto;
}

.legal-page .legal-header a:not(.legal-brand),
.legal-page .legal-footer a,
.legal-footer button {
  color: white;
}

.legal-document {
  width: min(70ch, calc(100% - 2rem));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 7vw, 5rem);
  overflow-wrap: anywhere;
}

.legal-document h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  margin-bottom: 1.25rem;
}

.legal-document h2 {
  font-size: 1.25rem;
  max-width: none;
  margin: 1.75rem 0 0.6rem;
}

.legal-document p + p {
  margin-top: 0.7rem;
}

.legal-draft-note {
  padding: 0.75rem 1rem;
  margin-block: 0.75rem;
  background: #fff;
  border-inline-start: 3px solid var(--blue);
}

.legal-document :is(ul, ol) {
  padding-inline-start: 1.5rem;
}

.legal-footer .container {
  justify-content: flex-start;
}

.legal-footer button {
  font-size: 1rem;
}

@media (max-width: 380px) {
  .privacy-actions .button {
    flex: 1 1 auto;
  }
}
