/* AIVELI v17 | mobile-safe editorial properties & AI render setup */
.embedded-visualizer .library-scroll .catalog{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
.embedded-visualizer .library-scroll .catalog .cat-card{min-width:0;max-width:100%;word-break:normal}
.embedded-visualizer .inspector{display:flex!important;flex-direction:column!important;max-height:calc(100dvh - 12px)!important}
.embedded-visualizer .inspector .inspector-top{flex:0 0 auto!important}
.embedded-visualizer .inspector .inspector-scroll{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain}
.embedded-visualizer .inspector .uce-property-section .model-meta{min-width:0;max-width:100%!important;overflow-wrap:break-word}
.embedded-visualizer .inspector .uce-inspector-actions button{min-width:0!important;max-width:100%!important;white-space:normal!important}
.render-modal{padding:clamp(8px,2vh,26px)!important;align-items:center!important;justify-content:center!important;overflow-y:auto}
.render-modal .profile-box{width:min(660px,calc(100vw - 22px))!important;max-width:100%;max-height:min(90dvh,920px)!important;overflow-y:auto!important;overflow-x:hidden!important;
  background:#fcfaf7!important;border:1px solid #e3ddd5!important;border-radius:18px!important;overscroll-behavior:contain;box-shadow:0 28px 80px #17110e50!important}
.render-modal .profile-modal-head{position:sticky;top:0;z-index:2;background:#fcfaf7;border-bottom:1px solid #ece5de}
.render-modal .render-group{min-width:0;max-width:100%;margin-inline:0}
.ai-render-options{border:1px solid #e8e1d8!important;border-radius:14px;background:#fffdfa!important;padding:14px!important}
.ai-mode-switch,.ai-presets,.ai-decor-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;min-width:0;margin:10px 0}
.ai-mode-switch label,.ai-presets label,.ai-decor-options label{display:flex;align-items:center;gap:8px;line-height:1.35;min-width:0;padding:10px 12px;
 border:1px solid #e7e0d7;background:#faf8f5;color:#4a423b;border-radius:10px;font-size:11px;cursor:pointer}
.ai-mode-switch label:has(input:checked),.ai-presets label:has(input:checked){background:#eae5dd;border-color:#c8b9a8;color:#2d2824}
.ai-mode-switch label:has(input:disabled){opacity:.56;cursor:not-allowed}
.ai-render-options input[type=radio],.ai-render-options input[type=checkbox]{accent-color:#51443b;flex:0 0 auto}
.ai-prompt-label{display:flex;flex-direction:column;gap:8px;margin-top:12px;color:#574f47;font-size:12px}
.ai-prompt-label textarea{width:100%;min-width:0;max-width:100%;resize:vertical;max-height:170px;min-height:70px;
 border:1px solid #dfd6ca!important;background:#fff!important;color:#37302b!important;border-radius:10px;padding:11px 12px;font:13px/1.5 Inter,Arial,sans-serif}
.ai-prompt-label textarea:focus{outline:2px solid #ae9983;outline-offset:1px}
.ai-endpoint-status{font:11px/1.55 Inter,Arial,sans-serif;color:#866e54;background:#f7f0e6;border-radius:8px;padding:10px;margin:10px 0}
.ai-options-title{font-size:11px;letter-spacing:.025em;font-weight:650;color:#4e433a;margin-top:12px}
.ai-check{display:flex;align-items:center;gap:9px;font-size:11px;color:#544b43;margin:12px 0}
.ai-privacy-note{font:10px/1.5 Inter,Arial,sans-serif;color:#877b70;margin:10px 0 0}
.render-modal .render-preset-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.render-modal .render-preset{min-width:0;max-width:100%;background:#f8f5f1;border:1px solid #e7ddd2;color:#474039}
.render-modal .render-preset.active{background:#e8e1d8;border-color:#9f8b75}
.render-modal .render-action-grid{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:15px}
.render-modal .render-action-grid button{flex:1 1 130px}
.render-modal #renderApply{background:#37312c;border-color:#37312c;color:#fff}
.render-modal #renderApply:disabled{opacity:.5;cursor:wait}
@media(max-width:650px){.embedded-visualizer .inspector{top:5px!important;bottom:5px!important;max-height:calc(100dvh - 10px)!important}
 .render-modal{padding:7px!important}.render-modal .profile-box{width:100%!important;max-height:calc(100dvh - 14px)!important;border-radius:14px!important}
 .render-modal .render-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ai-mode-switch{grid-template-columns:minmax(0,1fr)}
 .ai-presets,.ai-decor-options{gap:5px}
 .ai-mode-switch label,.ai-presets label,.ai-decor-options label{padding:9px;font-size:10px}
}

/* Render configuration remains usable in a short or narrow window. */
.render-modal{overflow-y:auto!important}
.render-modal .profile-box{max-height:calc(100dvh - 16px)!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin}
.ai-render-options .ai-decor-options,.ai-render-options .ai-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ai-render-options textarea{display:block;width:100%;max-width:100%;min-width:0;resize:vertical}
.ai-render-options input[type=checkbox],.ai-render-options input[type=radio]{accent-color:#3c3732}
@media(max-width:560px){.render-modal{padding:4px!important}.render-modal .profile-box{width:calc(100vw - 8px)!important;max-height:calc(100dvh - 8px)!important;border-radius:12px!important}}
