.canvas-preview{isolation:isolate;background:var(--background,#191919)!important;color:var(--foreground,#ddd);box-shadow:0 10px 24px #0005;border:1px solid var(--border,#404040);border-radius:8px;overflow:visible!important;font:13px Inter,system-ui,sans-serif}
.preview-breadcrumb{position:absolute;bottom:calc(100% + 8px);left:8px;display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:12px;color:var(--muted-foreground,#999)}
.preview-local{font-size:10px;border-radius:4px;background:var(--muted,#333);padding:2px 5px}
.preview-surface{height:100%;display:flex;flex-direction:column;overflow:hidden;border-radius:8px}
.live-preview-bar{height:38px;min-height:38px;display:flex;align-items:center;gap:4px;padding:4px 6px;border-bottom:1px solid var(--border,#333);background:var(--background,#202020)}
.live-preview-bar button,.preview-context button,.preview-setup-card button,.preview-edit button{font:inherit;color:inherit;background:var(--muted,#282828);border:1px solid var(--border,#383838);border-radius:5px;padding:4px 8px;white-space:nowrap;cursor:pointer}
.live-preview-bar input{flex:1;min-width:50px;margin:0;padding:4px 8px;border:0;background:transparent;color:inherit;font:inherit}
.live-preview-bar [data-part=state]{white-space:nowrap;font-size:12px}
.live-frame-wrap{position:relative;flex:1;min-height:0;background:var(--background,#191919)}
.live-frame-wrap iframe{display:block;width:100%;height:100%;border:0;background:white}
.live-frame-wrap iframe[hidden],.preview-placeholder[hidden],.preview-edit[hidden]{display:none}
.preview-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.preview-setup-card{width:340px;border:1px solid var(--border,#333);border-radius:8px;padding:16px;background:var(--background,#1c1c1c);font-size:12px}
.preview-setup-card strong,.preview-setup-card small{display:block;margin-bottom:6px}.preview-setup-card p{color:var(--muted-foreground,#999);white-space:pre-wrap;max-height:180px;overflow:auto}.preview-setup-card button{display:block;margin-left:auto}
.preview-edit{position:absolute;top:48px;right:12px;width:280px;background:var(--background,#202020);border:1px solid var(--border,#444);border-radius:8px;padding:12px;z-index:3;box-shadow:0 8px 24px #0005}
.preview-edit label{display:block;margin-bottom:8px}.preview-edit input{display:block;width:100%;margin-top:4px;background:var(--input,#292929);color:inherit}.preview-edit [role=status]{font-size:11px;white-space:normal}
.canvas-preview button:focus-visible,.canvas-preview input:focus-visible{outline:2px solid var(--ring,#ad46e6);outline-offset:2px}
#workspace:has(.canvas-preview.selected) #selection-name{display:none}
.canvas-preview .preview-breadcrumb{color:var(--shell-muted,#999)}
/* Capture region picker (web/live-preview.js pickRegion) over the live iframe or a page screenshot. */
.capture-picker{position:absolute;inset:0;z-index:4;cursor:crosshair;outline:none;background:rgb(0 0 0 / .08)}
.capture-picker-hint{position:absolute;left:50%;top:8px;transform:translateX(-50%);padding:4px 10px;border-radius:999px;background:var(--background,#202020);color:var(--foreground,#ddd);font:12px Inter,system-ui,sans-serif;white-space:nowrap;pointer-events:none;box-shadow:0 4px 12px #0004}
.capture-picker-highlight,.capture-picker-rect{position:absolute;pointer-events:none;box-sizing:border-box}
.capture-picker-highlight{border:2px solid var(--ring,#ad46e6);background:rgb(173 70 230 / .12)}
.capture-picker-highlight span{position:absolute;left:-2px;bottom:100%;padding:1px 5px;border-radius:3px 3px 0 0;background:var(--ring,#ad46e6);color:#fff;font:11px Inter,system-ui,sans-serif;white-space:nowrap}
.capture-picker-rect{border:1.5px dashed var(--ring,#ad46e6);background:rgb(173 70 230 / .16)}
.capture-picker-highlight[hidden],.capture-picker-rect[hidden]{display:none}
#capture-web-dialog{width:min(920px,calc(100vw - 48px));max-height:calc(100vh - 48px);overflow:auto;border:1px solid var(--border,#404040);border-radius:10px;background:var(--background,#1c1c1c);color:var(--foreground,#ddd);font:13px Inter,system-ui,sans-serif;padding:16px}
#capture-web-dialog::backdrop{background:#0007}
#capture-web-dialog header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
#capture-web-dialog p{color:var(--muted-foreground,#999);margin:4px 0 12px}
#capture-web-form{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}
#capture-web-form label{display:flex;flex-direction:column;gap:4px;font-size:12px}
#capture-web-form .capture-web-check{flex-direction:row;align-items:center;grid-column:1/-1}
#capture-web-form input[type=url],#capture-web-form select{background:var(--input,#292929);color:inherit;border:1px solid var(--border,#404040);border-radius:6px;padding:6px 8px;font:inherit}
.capture-web-actions{display:flex;gap:8px;grid-column:1/-1}
#capture-web-dialog button{font:inherit;color:inherit;background:var(--muted,#282828);border:1px solid var(--border,#383838);border-radius:6px;padding:5px 10px;cursor:pointer}
#capture-web-dialog button:disabled{opacity:.5;cursor:default}
#capture-web-stage{position:relative;margin-top:12px;border:1px solid var(--border,#404040);border-radius:6px;overflow:hidden;line-height:0}
#capture-web-stage[hidden]{display:none}
#capture-web-shot{display:block;width:100%;height:auto;user-select:none;-webkit-user-drag:none}
