.em-consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 180;
  max-width: 1100px; margin-inline: auto; padding: clamp(18px, 2vw, 28px);
  border-radius: 28px; background: #fff; border: 1.5px solid var(--em-border-soft); box-shadow: 0 24px 60px rgba(79,49,154,.25);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 28px; align-items: center;
  max-height: 70vh; overflow-y: auto;
}
.em-consent[hidden] { display: none; }
.em-consent h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.em-consent p { font-size: .98rem; color: var(--em-ink); }
.em-consent a { color: var(--em-violet); font-weight: 600; }
.em-consent__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.em-consent__actions .em-btn { font-size: 1rem; min-height: 46px; padding: .4em 1.1em; }

.em-dialog:not(.em-player) {
  border: 0; padding: 0; border-radius: 32px; width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 24px);
  background: var(--em-cream); color: var(--em-muted); box-shadow: 0 30px 80px rgba(59,36,110,.35);
}
.em-dialog::backdrop { background: rgba(59,36,110,.45); backdrop-filter: blur(2px); }
.em-dialog__inner { padding: clamp(22px, 3vw, 40px); display: grid; gap: 18px; }
.em-dialog__head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.em-dialog__head h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); font-weight: 800; }
.em-x { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--em-violet); font-size: 1.5rem; cursor: pointer; box-shadow: var(--em-shadow-card); }
.em-pref { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 16px 18px; border-radius: 20px; background: #fff; }
.em-pref h3 { font-size: 1.05rem; font-weight: 700; }
.em-pref p { grid-column: 1 / -1; font-size: .93rem; color: var(--em-ink); }
.em-switch { position: relative; width: 56px; height: 32px; flex: 0 0 auto; }
.em-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.em-switch span { position: absolute; inset: 0; border-radius: 99px; background: #d8cdea; transition: background-color .2s; }
.em-switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s var(--em-ease); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.em-switch input:checked + span { background: var(--em-violet); }
.em-switch input:checked + span::after { transform: translateX(24px); }
.em-switch input:disabled + span { opacity: .6; }
.em-switch input:focus-visible + span { outline: 3px solid var(--em-red); outline-offset: 2px; }

@media (max-width: 760px) {
  .em-consent { grid-template-columns: 1fr; left: 8px; right: 8px; bottom: 8px; }
  .em-consent__actions { justify-content: stretch; }
  .em-consent__actions .em-btn { flex: 1 1 140px; }
}
