/* Only page surfaces inherit the chosen background; artwork/text boxes retain their own fills. */
html.has-page-background,body.has-page-background{background:var(--page-background,#fff)}
body.has-page-background>.site-header,body.has-page-background>.site-copyright,body.has-page-background main,body.has-page-background .public-canvas-stage{background-color:var(--page-background,#fff)!important}
.page-edit-viewport.has-page-background,.page-edit-viewport.has-page-background>.virtual-site-header,.page-edit-viewport.has-page-background>.canvas-stage,.page-edit-viewport.has-page-background>footer{background-color:var(--page-background,#fff)!important}
.element-link,.element-link:visited{color:inherit;text-decoration:none}
.element-link,.element-link *{cursor:pointer!important}
.element-link:focus-visible{outline:1px solid #999;outline-offset:3px}
.canvas-object.has-element-link:not(.is-selected){cursor:pointer}
.page-background-tools{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 0;font-size:12px}
.page-background-tools input[type=color]{width:42px;height:30px;padding:2px;border:1px solid #ddd;background:white}
.page-background-tools input[type=text]{width:85px;padding:6px;border:1px solid #ddd}
.page-background-tools label{display:flex;align-items:center;gap:6px}
.element-link-controls{border-top:1px solid #ddd;margin-top:12px;padding-top:12px}

/* Image planes are viewport-sized, behind content, and never receive editor input. */
body.has-page-image,.page-edit-viewport.has-page-image,.note-admin-preview.has-page-image{isolation:isolate}
.page-edit-viewport.has-page-image,.note-admin-preview.has-page-image{position:relative}
.abstrough-background-plane{pointer-events:none!important;z-index:-1;box-sizing:border-box;overflow:hidden}
body.has-page-image>.site-header,body.has-page-image>.site-copyright,body.has-page-image main,body.has-page-image .public-canvas-stage,
.page-edit-viewport.has-page-image>.virtual-site-header,.page-edit-viewport.has-page-image>.canvas-stage,.page-edit-viewport.has-page-image>footer{background-color:transparent!important}
.note-admin-preview.has-page-background{background-color:var(--page-background,#fff)}
details.page-background-tools{display:block;border:1px solid #ddd;padding:12px;margin:12px 0}
.page-background-tools>summary{cursor:pointer;font-weight:600;margin-bottom:10px}
.page-background-color,.page-background-image-controls,.page-background-image-settings{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:8px 0}
.page-background-tools .page-background-image-settings[hidden]{display:none}
.page-background-tools input[type=number]{width:80px;padding:6px;border:1px solid #ddd}
.page-background-tools select{padding:6px;max-width:100%}.page-background-tools .help{font-size:11px;line-height:1.6;margin:8px 0;max-width:900px}
.page-background-tools [data-page-background-file]{font-size:11px;overflow-wrap:anywhere}

.page-background-dialog{width:min(820px,calc(100vw - 36px));max-width:none;max-height:88dvh;padding:20px;border:1px solid #aaa;background:#fff;color:#171717;font:13px/1.6 Arial,sans-serif;overflow:auto;z-index:1000}
.page-background-dialog::backdrop{background:#0006}.page-background-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:14px}.page-background-dialog h2{font-size:18px;margin:0}.page-background-dialog .help{font-size:12px}.page-background-launcher{border-color:#888!important;font-weight:600}
