
.vd-embed[data-scheme] {
  color-scheme: light;
  background-color: var(--vd-surface, #1b1b1f);
}

/* A theme's scheme gives the canvas a surface to match unless the host gave
   one (theme.surface, set on the element itself, wins), and page names
   that read on it. */
.vd-embed[data-scheme='light'] {
  --vd-surface: #eef0f3;
  --vd-page-label: rgb(26 26 31 / 0.55);
  --vd-page-label-hover: #1a1a1f;
}

/* The dark scheme: the editor's surfaces in dark, set on the
   embed's own element. The accent and the canvas stay the host's. */
.vd-embed[data-scheme='dark'] {
  --vd-surface: #141518;
}

.vd-embed[data-scheme='dark'] {
  color-scheme: dark;
  --vd-panel-bg: #1f2023;
  --vd-ink: #ececf1;
  --vd-muted: rgb(236 236 241 / 0.62);
  --vd-rule: rgb(255 255 255 / 0.14);
  --vd-surface-raised: #2a2b2f;
  --vd-input-bg: #26272b;
  --vd-strip-bg: #1f2023;
  --vd-thumb-bg: #2a2b2f;
  --vd-plate: rgb(255 255 255 / 0.06);
  --vd-row-hover: rgb(255 255 255 / 0.08);
  --vd-row-selected: rgb(255 255 255 / 0.12);
  --vd-on-chosen: #1f2023;
  --vd-error: #ff7a5c;
  --vd-warning: #f0b45a;
  --vd-page-label: rgb(236 236 241 / 0.62);
  --vd-page-label-hover: #ececf1;
}

@media (prefers-color-scheme: light) {
  .vd-embed[data-scheme='auto'] {
    --vd-surface: #eef0f3;
    --vd-page-label: rgb(26 26 31 / 0.55);
    --vd-page-label-hover: #1a1a1f;
  }
}

@media (prefers-color-scheme: dark) {
  .vd-embed[data-scheme='auto'] {
    --vd-surface: #141518;
  }

  .vd-embed[data-scheme='auto'] {
    color-scheme: dark;
    --vd-panel-bg: #1f2023;
    --vd-ink: #ececf1;
    --vd-muted: rgb(236 236 241 / 0.62);
    --vd-rule: rgb(255 255 255 / 0.14);
    --vd-surface-raised: #2a2b2f;
    --vd-input-bg: #26272b;
    --vd-strip-bg: #1f2023;
    --vd-thumb-bg: #2a2b2f;
    --vd-plate: rgb(255 255 255 / 0.06);
    --vd-row-hover: rgb(255 255 255 / 0.08);
    --vd-row-selected: rgb(255 255 255 / 0.12);
    --vd-on-chosen: #1f2023;
    --vd-error: #ff7a5c;
    --vd-warning: #f0b45a;
    --vd-page-label: rgb(236 236 241 / 0.62);
    --vd-page-label-hover: #ececf1;
  }
}
