/* Scoped consent controls; the existing chapter layout is unchanged. */
#em-consent[hidden], #em-consent-close[hidden] { display: none !important; }
#em-consent {
  position: fixed; z-index: 10000; right: 20px; bottom: 20px;
  width: min(590px, calc(100vw - 40px)); box-sizing: border-box;
  padding: 22px 24px; border-radius: 18px;
  background: #101722f5; color: #f5f7fb;
  box-shadow: 0 12px 70px #0006; backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  font-family: inherit; text-align: left;
  max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain;
}
#em-consent .em-consent-top { display: flex; align-items: start; gap: 12px; }
#em-consent h2 {
  flex: 1; margin: 0 0 9px; color: #fff; 
  font-family: inherit; font-size: 20px; font-weight: 600; line-height: 1.2;
  letter-spacing: -.025em; text-transform: none;
}
#em-consent p { margin: 0; color: #c6ceda; font-size: 13px; line-height: 1.55; }
#em-consent .em-consent-actions { display: flex; gap: 10px; margin-top: 17px; }
#em-consent .em-consent-actions button {
  flex: 1; min-height: 44px; padding: 11px 16px;
  border: 1px solid #687587; border-radius: 999px;
  color: #f5f7fb; background: #ffffff08; box-shadow: none;
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2;
  letter-spacing: 0; cursor: pointer; transition: background .2s, border-color .2s;
}
#em-consent .em-consent-actions button:hover { background: #ffffff18; border-color: #c2cbd7; }
#em-consent button:focus-visible, #em-consent summary:focus-visible,
#em-consent a:focus-visible, #em-cookie-settings:focus-visible {
  outline: 2px solid #a1caff; outline-offset: 4px;
}
#em-consent-close {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 44px; width: 44px; height: 44px; margin: -12px -12px 0 0;
  border: 0; border-radius: 50%; background: transparent; color: #d1dae7;
  font-size: 24px; line-height: 1; cursor: pointer;
}
#em-consent details { margin-top: 11px; font-size: 11px; color: #c6ceda; }
#em-consent summary { display: list-item; cursor: pointer; padding: 5px 0; font-size: 11px; }
#em-consent details p { padding-top: 5px; font-size: 12px; }
#em-consent a { color: #b9d4ff; text-decoration: underline; text-underline-offset: 3px; }
#em-consent #em-consent-state { margin-top: 9px; font-size: 10px; color: #acb9cb; }
.studio-footer #em-cookie-settings {
  padding: 8px 0; min-height: 44px; border: 0; background: transparent;
  color: inherit; font: inherit; font-size: 11px; cursor: pointer;
}
.studio-footer #em-cookie-settings:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 600px) {
  #em-consent { right: 12px; bottom: 12px; width: calc(100vw - 24px); padding: 18px; border-radius: 16px; }
  #em-consent h2 { font-size: 18px; }
  #em-consent p { font-size: 12px; }
  #em-consent .em-consent-actions { gap: 8px; margin-top: 14px; }
  #em-consent .em-consent-actions button { padding: 11px 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #em-consent .em-consent-actions button { transition: none; }
}
