/* Preserve DrawDomain's toolbar, canvas and inspector dimensions.
 * PicPlayer parity: 316px rail, 300 x 250 default units, desktop >=1280px.
 * Shadow-DOM slot styling lives in the unmodified shared/ads-rail.css.
 */
.shared-ad-rail {
  display: none;
  width: 316px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
@media (min-width: 1280px) {
  .shared-ad-rail:not([hidden]) { display: block; }
  .editor-layout:has(> .shared-ad-rail:not([hidden])) {
    grid-template-columns: var(--toolbar-width) minmax(0, 1fr) var(--inspector-width) 316px;
  }
}
/* An explicit manager pause or ADS_ENABLED=0 removes the entire fourth column. */
#ad-preferences-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 24px;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
#ad-preferences-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.ad-preferences-content { display: grid; gap: 14px; line-height: 1.6; }
.ad-preferences-content h2, .ad-preferences-content p { margin: 0; }
.ad-preferences-content p { color: var(--text-2); }
.ad-preferences-content a { color: var(--accent-2); }
.ad-preferences-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.ad-preferences-actions button {
  border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 12px; background: var(--bg-3); color: var(--text);
}
.ad-preferences-actions button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
