/* Full contextual editors. Existing theme tokens, responsive forms and actions remain authoritative. */
#qivya-studio-root .ref-create-shortcut{display:inline-flex;align-items:center;justify-content:flex-start;gap:7px;min-height:38px;max-width:100%;padding:8px 10px;margin:5px 0 2px;border:1px dashed var(--fs-input-line,#889c98);border-radius:9px;background:var(--fs-soft,#f1f5f3);color:var(--fs-ink,#18332c);font:600 12px/1.45 var(--fs-font,system-ui);white-space:normal;text-align:left;cursor:pointer;}
#qivya-studio-root .ref-create-shortcut:hover:not(:disabled){border-style:solid;border-color:var(--fs-focus,#08786e);background:var(--fs-tint,#e8f1ed);}
#qivya-studio-root .ref-create-shortcut[hidden]{display:none!important;}
#qivya-studio-root .ref-create-shortcut:disabled{opacity:.6;cursor:not-allowed;}
#qivya-studio-root .ref-editor:not([open]){display:none!important;}
#qivya-studio-root .ref-editor[open]{display:flex;position:fixed;inset:0;width:min(960px,calc(100vw - 40px));max-width:calc(100vw - 40px);height:auto;max-height:calc(100dvh - 40px);padding:0;margin:auto;border:1px solid var(--fs-line,#dbe5df);border-radius:22px;background:var(--fs-surface,#fff);color:var(--fs-ink,#18332c);box-shadow:0 30px 100px #071c304d;overflow:hidden;}
#qivya-studio-root .ref-editor::backdrop{background:#0c1d2b99;backdrop-filter:blur(4px);}
#qivya-studio-root .workspace .ref-editor>.modal-card{display:flex!important;flex-direction:column!important;width:100%!important;max-width:none!important;min-width:0!important;max-height:calc(100dvh - 42px)!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:hidden!important;}
#qivya-studio-root .ref-editor form{display:flex;flex-direction:column;min-height:0;max-height:100%;overflow:hidden;}
#qivya-studio-root .ref-editor .modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;max-height:none!important;}
#qivya-studio-root .ref-editor :is(.modal-head,.modal-foot){flex:0 0 auto;}
#qivya-studio-root .ref-context{flex:0 0 auto;padding:12px 24px;border-bottom:1px solid var(--fs-line,#dbe5df);background:var(--fs-soft,#f1f5f3);color:var(--fs-ink,#18332c);}
#qivya-studio-root .ref-context:empty{display:none;}
#qivya-studio-root .ref-context strong{font-size:13px;}
#qivya-studio-root .ref-context p{font-size:12px;line-height:1.6;margin:5px 0;color:var(--fs-muted,#586b64);}
#qivya-studio-root .ref-context .ref-error{padding:9px 12px;border:1px solid #e8beb9;border-radius:9px;background:#fff0ed;color:#8f241e;}
#qivya-studio-root .ref-editor form[inert]{opacity:.55;}
@media(max-width:680px){#qivya-studio-root .ref-create-shortcut{min-height:44px;width:100%;font-size:13px;}
#qivya-studio-root .ref-editor[open]{inset:auto 0 0;width:100%;max-width:100%;max-height:calc(100dvh - env(safe-area-inset-top) - 12px);margin:0;border-radius:23px 23px 0 0;}
#qivya-studio-root .workspace .ref-editor>.modal-card{max-height:calc(100dvh - env(safe-area-inset-top) - 14px)!important;}
#qivya-studio-root .ref-editor .modal-head{padding:18px!important;}
#qivya-studio-root .ref-context{padding:10px 18px;}
#qivya-studio-root .ref-editor .modal-foot{padding-bottom:calc(14px + env(safe-area-inset-bottom))!important;flex-wrap:wrap;}
#qivya-studio-root .ref-editor :is(input,select,textarea){font-size:16px!important;}}

/* A pending background module must not hide an open native editor. */
#qivya-studio-root .workspace:has(> .q10-tab-busy) > .ref-editor[open]{visibility:visible!important;pointer-events:auto!important;}
