/* Shared panel geometry and standalone annotations. */
:root{--storai-panel-radius:12px;}
#editorView #outlineNav{border-radius:var(--storai-panel-radius);}
#editorView.script-storyboard-mode #scriptMasterPanel>#directorMainVideo{border-radius:var(--storai-panel-radius);}
:is(#characterModal,#locationModal,#propModal,#styleAssetModal) :is(.entity-main-image,.entity-inline-prompt,.entity-prompt-input-box){border-radius:var(--storai-panel-radius);}
:is(#characterModal,#locationModal,#propModal,#styleAssetModal) .entity-form-prompt{border-radius:var(--storai-panel-radius) var(--storai-panel-radius) 0 0!important;}
#editorView .editor-main{position:relative;}
:is(#characterModal,#locationModal,#propModal,#styleAssetModal) .entity-shared-frame .entity-prompt-input-box{border-radius:var(--storai-panel-radius)!important;}
:is(#characterModal,#locationModal,#propModal,#styleAssetModal) .entity-shared-frame .entity-prompt-input-box>.entity-generating-overlay{border-radius:var(--storai-panel-radius);}
:is(#characterModal,#locationModal,#propModal,#styleAssetModal) .entity-shared-frame:not(.is-image){border-radius:var(--storai-panel-radius)!important;}
.sticky-comment-layer{position:absolute;inset:0;z-index:2;pointer-events:none;overflow:hidden;}
.sticky-comment-layer[hidden],.sticky-comment-pin[hidden],.sticky-comment-card[hidden]{display:none;}
.sticky-comment-pin{position:absolute;pointer-events:auto;width:20px;height:26px;padding:0;border:0;background:transparent;cursor:pointer;}
.sticky-comment-pin svg{width:20px;height:26px;}
.sticky-comment-card{position:absolute;pointer-events:auto;box-sizing:border-box;width:220px;max-width:calc(100% - 16px);padding:10px;border:1px solid #dfce8f;border-radius:6px;background:#fff8d9;color:#5d5436;box-shadow:0 3px 12px #65501b20;}
.sticky-comment-heading{display:flex;align-items:center;justify-content:space-between;font:12px/20px system-ui;color:#8b7028;}
.sticky-comment-heading button{padding:0 3px;border:0;background:transparent;color:inherit;font-size:18px;cursor:pointer;}
.sticky-comment-card textarea{display:block;box-sizing:border-box;width:100%;height:110px;padding:5px 0;border:0!important;background:transparent!important;color:inherit;font:12px/1.65 system-ui;resize:none;overflow:auto;outline:none;box-shadow:none!important;}
html.dark-mode .sticky-comment-card{background:#383324;border-color:#665735;color:#e2d9b9;}
html.dark-mode .sticky-comment-heading{color:#e6c76e;}
::highlight(storai-revision-explanations){background:#f0cb4d66;}
html.dark-mode ::highlight(storai-revision-explanations){background:#d6ad344d;}

.sticky-comment-pin{width:30px;height:40px;}
.sticky-comment-pin svg{width:30px;height:40px;}
.sticky-comment-actions{display:flex;align-items:center;gap:3px;}
.sticky-comment-heading .sticky-comment-actions button{display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;padding:3px;border:0;border-radius:4px;}
.sticky-comment-actions button svg{width:15px;height:15px;}
.sticky-comment-actions button:hover{background:#b8993520;}
.sticky-comment-actions button:focus-visible,.sticky-comment-pin:focus-visible{outline:1px solid #b89935;outline-offset:2px;}

/* A small comment bubble replaces the paperclip marker. */
.sticky-comment-pin{width:22px;height:24px;color:#c6a032;}
.sticky-comment-pin svg{width:22px;height:22px;}
.sticky-comment-pin:hover{color:#a9851c;}
html.dark-mode .sticky-comment-pin{color:#dfc26b;--comment-symbol-ink:#383324;}

.ai-edit-preview{position:absolute;right:16px;bottom:42px;z-index:25;display:flex;align-items:center;gap:8px;max-width:calc(100% - 32px);padding:9px 12px;border:1px solid var(--border,#d5d9df);border-radius:8px;background:var(--bg,#fff);color:var(--text,#24282d);box-shadow:0 3px 14px #0002;font:12px/1.5 system-ui;}
.ai-edit-preview[hidden]{display:none;}
.ai-edit-preview button{flex-shrink:0;border:0;border-radius:5px;padding:6px 10px;background:var(--brand,#315ba6);color:white;cursor:pointer;font:inherit;}
.ai-edit-preview button:last-child{background:transparent;color:inherit;}
.ai-edit-preview button:focus-visible{outline:2px solid var(--brand);outline-offset:2px;}
html.dark-mode .ai-edit-preview{background:#252525;color:#eee;border-color:#555;}
.ai-edit-previewing .screenplay-toolbar button{pointer-events:none;}
@media(max-width:600px){.ai-edit-preview{right:8px;bottom:36px;max-width:calc(100% - 16px);gap:5px;padding:8px;flex-wrap:wrap;}}
.project-sharing-dialog{position:fixed;inset:0;margin:auto;width:440px;height:fit-content;max-width:calc(100% - 32px);max-height:calc(100dvh - 32px);overflow:auto;padding:22px;border:1px solid #dce0e5;border-radius:12px;background:#fff;color:#25282c;box-shadow:0 12px 50px #0003;}
.project-sharing-dialog::backdrop{background:#0009;}
.project-sharing-dialog header,.project-sharing-dialog footer,.project-share-link{display:flex;align-items:center;gap:10px;}
.project-sharing-dialog header{justify-content:space-between;}.project-sharing-dialog h2{margin:0;font:600 18px/1.5 system-ui;}
.project-sharing-dialog p{font:13px/1.7 system-ui;color:#717780;}.project-sharing-dialog [data-status]{min-height:22px;}
.project-sharing-dialog button{border:0;border-radius:6px;padding:7px 12px;font:13px/1.5 system-ui;cursor:pointer;background:#f0f1f3;color:inherit;}
.project-sharing-dialog button:hover{filter:brightness(.95);}.project-sharing-dialog button:disabled{opacity:.5;cursor:wait;}
.project-sharing-dialog button:focus-visible{outline:2px solid var(--brand,#315ba6);outline-offset:2px;}
.project-sharing-dialog [data-close]{font-size:22px;padding:0 5px;background:transparent;}.project-sharing-dialog footer{justify-content:flex-end;margin-top:20px;}
.project-sharing-dialog [data-save]{background:var(--brand,#315ba6);color:#fff;}.project-sharing-dialog [data-revoke]{color:#b34f4c;background:transparent;margin-right:auto;}
.project-share-link[hidden]{display:none;}.project-share-link input{min-width:0;flex:1;padding:8px;border:1px solid #dde0e5;border-radius:6px;font-size:12px;background:transparent;color:inherit;}.project-share-link button{white-space:nowrap;}
.community-project-card{display:block;padding:20px;border:1px solid #dfe2e6;border-radius:10px;background:white;color:inherit;text-decoration:none;}.community-project-card:hover{border-color:#aab1bb;}.community-project-card h3{font-size:16px;margin:0 0 12px;}.community-project-card p{font-size:13px;color:#747a82;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}.community-project-card small{color:#8a8f96;}
html.dark-mode .project-sharing-dialog,html.dark-mode .community-project-card{background:#252525;color:#eee;border-color:#444;}html.dark-mode .project-sharing-dialog button:not([data-save]):not([data-revoke]):not([data-close]){background:#383838;}html.dark-mode .project-share-link input{border-color:#555;}html.dark-mode .project-sharing-dialog p,html.dark-mode .community-project-card p{color:#b8bbc0;}

/* Keep annotation controls above the paper without blocking other editor regions. */
.sticky-comment-layer{z-index:6;}

/* Expanded annotations escape editor clipping, below modal dialogs and above toolbars. */
body>.sticky-comment-card{position:fixed;z-index:200;inset:auto;margin:0;overflow:auto;max-width:calc(100vw - 16px);}
