.em-cookie-banner {
  position: fixed;
  z-index: 10050;
  inset: auto auto calc(16px + env(safe-area-inset-bottom)) 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(920px, calc(100vw - 32px));
  padding: 18px 20px;
  transform: translateX(-50%);
  border: 1px solid #d4d5c7;
  border-radius: 18px;
  background: #fffdf8;
  color: #26352b;
  box-shadow: 0 16px 52px rgba(17, 39, 25, .24);
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.em-cookie-banner[hidden] { display: none; }
.em-cookie-copy { min-width: 0; }
.em-cookie-title { display: block; margin-bottom: 4px; color: #173827; font-weight: 750; }
.em-cookie-copy p { margin: 0; }
.em-cookie-copy a, .em-cookie-dialog a { color: #214a32; text-decoration: underline; text-underline-offset: 3px; }
.em-cookie-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.em-cookie-button {
  min-height: 46px;
  padding: 10px 15px;
  border: 1px solid #365b40;
  border-radius: 999px;
  background: #fffdf8;
  color: #173827;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.em-cookie-button:hover { background: #edf1e8; }
.em-cookie-button:focus-visible, .em-cookie-manage:focus-visible {
  outline: 3px solid #a07d3f;
  outline-offset: 3px;
}
.em-cookie-button-primary { background: #214a32; color: #fffdf8; }
.em-cookie-button-primary:hover { background: #173827; }
.em-cookie-dialog {
  width: min(560px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #d4d5c7;
  border-radius: 20px;
  background: #fffdf8;
  color: #26352b;
  box-shadow: 0 20px 65px rgba(17, 39, 25, .28);
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.em-cookie-dialog::backdrop { background: rgba(16, 31, 22, .48); }
.em-cookie-dialog-inner { padding: 24px; }
.em-cookie-dialog h2 { margin: 0 0 9px; color: #173827; font: 700 25px/1.15 Georgia, "Times New Roman", serif; }
.em-cookie-dialog p { margin: 0 0 16px; }
.em-cookie-choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid #d4d5c7;
  border-radius: 14px;
  background: #f4f5ed;
}
.em-cookie-choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #214a32; }
.em-cookie-choice strong { display: block; margin-bottom: 3px; color: #173827; }
.em-cookie-choice span { display: block; }
.em-cookie-dialog .em-cookie-actions { justify-content: flex-start; margin-top: 18px; }
.em-cookie-manage {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 680px) {
  .em-cookie-banner {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: calc(100vw - 24px);
    padding: 16px;
  }
  .em-cookie-actions { justify-content: stretch; }
  .em-cookie-banner .em-cookie-button { flex: 1 1 30%; padding-inline: 10px; }
  .em-cookie-dialog-inner { padding: 20px; }
  .em-cookie-dialog .em-cookie-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .em-cookie-dialog .em-cookie-button { width: 100%; }
}

@media (max-width: 390px) {
  .em-cookie-banner .em-cookie-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .em-cookie-banner .em-cookie-button[data-cookie-settings] { grid-column: 1 / -1; }
}
