#attachments.issue-attachments{--ladno:#f5f0e6;--panel:#fffdf8;--ink:#24201a;--teal:#1b7774;--line:#e2dac9;font:14px/1.45 system-ui,sans-serif;color:var(--ink);background:var(--ladno);border:1px solid var(--line);border-radius:10px;overflow:hidden}
#attachments .attachment-panel-header{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 12px;background:var(--panel);border-bottom:1px solid var(--line)}
#attachments .attachment-panel-header h3,#attachments .attachment-panel-header .attachment-panel-title{margin:0;font-size:15px;font-weight:650;flex:1 1 auto;min-width:120px}
#attachments button[data-attachment-toggle],#attachments button[data-attachment-add],#attachments .attachment-card-actions button,#attachments [data-attachment-status]{min-height:40px;min-width:40px}
#attachments button{font:inherit;color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:0 12px;cursor:pointer}
#attachments button:hover{border-color:var(--teal);color:var(--teal)}
#attachments button:focus-visible,#attachments [data-attachment-dropzone]:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
#attachments button[disabled]{opacity:.55;cursor:not-allowed;background:#ece7dc;color:#6b655c;border-style:dashed}
#attachments [data-attachment-status],#attachments [data-attachment-card-status]{display:inline-flex;align-items:center;padding:0 10px;font-size:13px;color:#5c564c;background:#efeade;border:1px solid var(--line);border-radius:8px}
#attachments [data-attachment-dropzone]{margin:10px 12px;padding:14px;min-height:56px;text-align:center;font-size:13px;color:#5c564c;background:#f9f5ec;border:1.5px dashed #cfc5b1;border-radius:10px}
#attachments [data-attachment-dropzone]:hover,#attachments [data-attachment-dropzone]:focus-within{border-color:var(--teal);color:var(--teal)}
#attachments [data-attachment-staged]{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 8px}
#attachments [data-attachment-staged] span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;padding:4px 8px;background:var(--panel);border:1px solid var(--line);border-radius:6px}
#attachments [data-attachment-staged]:empty{display:none}
#attachments .attachment-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;padding:12px}
#attachments .attachment-card{display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden;box-shadow:0 1px 2px rgba(36,32,26,.06)}
#attachments .attachment-card button[data-attachment-view]{display:flex;flex-direction:column;gap:6px;align-items:stretch;flex:1;padding:10px;min-height:40px;text-align:left;background:var(--panel);border:0;border-bottom:1px solid var(--line);cursor:pointer;color:inherit}
#attachments .attachment-card button[data-attachment-view]:hover{background:#f7f2e8}
#attachments .attachment-card .attachment-thumb{width:100%;height:104px;object-fit:contain;background:#efeade;border:1px solid var(--line);border-radius:6px}
#attachments .attachment-card .attachment-name{font-weight:600;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#attachments .attachment-card .attachment-meta{font-size:12px;color:#6b655c;display:flex;gap:8px;flex-wrap:wrap}
#attachments .attachment-card-actions{display:flex;flex-wrap:wrap;gap:6px;padding:8px}
#attachments .attachment-card-actions button{flex:1 1 auto;padding:0 8px;font-size:13px}
#attachments button[data-attachment-view][aria-pressed=true],#attachments .attachment-card-actions button[aria-pressed=true]{background:#e4efee;border-color:var(--teal);color:var(--teal);box-shadow:inset 0 0 0 1px var(--teal)}
#attachments button[data-attachment-toggle][aria-expanded=false]::after{content:" ▸"}
#attachments button[data-attachment-toggle][aria-expanded=true]::after{content:" ▾"}
#attachment-viewer[role=dialog],#issue-image-annotator[role=dialog]{position:fixed;inset:0;z-index:110;display:grid;place-items:center;width:100%;height:100dvh;margin:0;padding:24px;box-sizing:border-box;font:14px/1.45 system-ui,sans-serif;color:#24201a;background:transparent;border:0;overflow:hidden}
#attachment-viewer[role=dialog] *,#issue-image-annotator[role=dialog] *{box-sizing:border-box}
#attachment-viewer[role=dialog] .dialog-header,#issue-image-annotator[role=dialog] .dialog-header,#attachment-viewer[role=dialog] header,#issue-image-annotator[role=dialog] header{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 10px;background:#fffdf8;border-bottom:1px solid #e2dac9;color:#24201a}
#attachment-viewer[role=dialog] header h2,#issue-image-annotator[role=dialog] header h2,#attachment-viewer[role=dialog] .dialog-title,#issue-image-annotator[role=dialog] .dialog-title{flex:1 1 140px;min-width:0;margin:0;font-size:15px;font-weight:650;overflow-wrap:anywhere}
#attachment-viewer[role=dialog] button,#issue-image-annotator[role=dialog] button{min-height:40px;min-width:40px;padding:0 12px;font:inherit;color:#24201a;background:#fffdf8;border:1px solid #e2dac9;border-radius:8px;cursor:pointer}
#attachment-viewer[role=dialog] button:hover,#issue-image-annotator[role=dialog] button:hover{border-color:#1b7774;color:#1b7774}
#attachment-viewer[role=dialog] button:focus-visible,#issue-image-annotator[role=dialog] button:focus-visible,#attachment-viewer[role=dialog] [data-attachment-media]:focus-visible,#issue-image-annotator[role=dialog] [data-annotation-canvas]:focus-visible{outline:2px solid #1b7774;outline-offset:2px}
#attachment-viewer[role=dialog] button[disabled],#issue-image-annotator[role=dialog] button[disabled]{opacity:.5;cursor:not-allowed;background:#ece7dc;color:#6b655c}
#attachment-viewer[role=dialog] .dialog-body,#issue-image-annotator[role=dialog] .dialog-body,#attachment-viewer[role=dialog] .dialog-scroll{flex:1 1 auto;min-height:0;overflow:auto;padding:10px;background:#1c1a17;display:flex;align-items:center;justify-content:center}
#attachment-viewer[role=dialog] .dialog-body>*{max-width:100%;max-height:100%}
#attachment-viewer[role=dialog] [data-attachment-media]{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;border-radius:6px;background:#24201a}
#attachment-viewer[role=dialog] .dialog-toolbar,#issue-image-annotator[role=dialog] .dialog-toolbar,#attachment-viewer[role=dialog] footer,#issue-image-annotator[role=dialog] footer,#issue-image-annotator[role=dialog] [data-annotation-status]{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:8px 10px;background:#fffdf8;border-top:1px solid #e2dac9}
#issue-image-annotator[role=dialog] .dialog-body{background:#f5f0e6;align-items:stretch;padding:8px}
#issue-image-annotator[role=dialog] [data-annotation-canvas]{display:block;max-width:100%;max-height:100%;width:auto;height:auto;touch-action:none;background:#fffdf8;border:1px solid #e2dac9;border-radius:6px}
#issue-image-annotator[role=dialog] .dialog-toolbar button[aria-pressed=true],#issue-image-annotator[role=dialog] button[data-annotation-tool][aria-pressed=true],#issue-image-annotator[role=dialog] button[data-annotation-color][aria-pressed=true]{background:#e4efee;border-color:#1b7774;color:#1b7774;box-shadow:inset 0 0 0 1px #1b7774}
#issue-image-annotator[role=dialog] button[data-annotation-color][aria-pressed=true]::before{content:"✓ ";}
#issue-image-annotator[role=dialog] [data-annotation-status]{flex:1 1 100%;font-size:13px;color:#5c564c;min-height:40px}

/* Root: adapt the exact scoped provider source to the actual overlay/dialog DOM. */
#attachments button{min-width:40px;min-height:40px;margin:0}
#attachments .attachment-panel-content{min-width:0}
#attachments .attachment-status{margin:8px 12px;max-width:calc(100% - 24px);overflow-wrap:anywhere}
#attachments .attachment-status.is-error,#attachments .is-error .attachment-file-result{color:#9a3c2d}
#attachments .attachment-count,#attachments .attachment-size,#attachments .attachment-meta{font-variant-numeric:tabular-nums}
#attachments [data-attachment-dropzone]{display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center}
#attachments .attachment-empty{margin:12px;color:#6b655c}
#attachments [data-attachment-results],#attachments [data-attachment-staged]{display:flex;flex-direction:column;gap:6px;list-style:none;margin:0;padding:8px 12px}
#attachments .attachment-staged-file{display:flex;flex-wrap:wrap;gap:6px;align-items:baseline;min-width:0}
#attachments [data-attachment-staged] span,#attachments [data-attachment-results] span{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
#attachments .attachment-staged-file .attachment-name{flex:1 1 180px;min-width:0}
#attachments .attachment-card .attachment-thumb{display:grid;place-items:center;overflow:hidden;font-size:28px}
#attachments .attachment-thumb img,#attachments .attachment-thumb video{display:block;max-width:100%;max-height:100px;object-fit:contain;outline:1px solid rgba(0,0,0,.1);border-radius:5px}
#attachment-viewer .attachment-viewer-backdrop,#issue-image-annotator .annotation-backdrop{position:absolute;inset:0;background:rgba(30,26,22,.48)}
#attachment-viewer .attachment-viewer-dialog,#issue-image-annotator .annotation-dialog{position:relative;display:flex;flex-direction:column;width:min(860px,100%);max-height:85dvh;min-height:0;overflow:hidden;border:1px solid #e2dac9;border-radius:14px;background:#fffdf8;box-shadow:0 16px 46px rgba(30,26,22,.24)}
#attachment-viewer .attachment-viewer-header,#attachment-viewer .attachment-viewer-footer,#issue-image-annotator .annotation-header,#issue-image-annotator .annotation-toolbar,#issue-image-annotator [data-annotation-status]{flex:0 0 auto}
#attachment-viewer .attachment-viewer-actions{padding:0;border:0;background:transparent;flex:0 0 auto}
#attachment-viewer .attachment-viewer-body,#issue-image-annotator .annotation-image-scroll{min-height:0;max-height:65dvh;overscroll-behavior:contain}
#attachment-viewer [data-attachment-media]{max-height:60dvh}
#attachment-viewer .attachment-viewer-generic,#attachment-viewer [data-viewer-loading]{color:#fffdf8;overflow-wrap:anywhere}
#attachment-viewer [data-viewer-status]{margin:0;min-width:0;overflow-wrap:anywhere}
#issue-image-annotator [data-annotation-canvas]{max-height:60dvh;object-fit:contain;align-self:center;outline:1px solid rgba(0,0,0,.1)}
#issue-image-annotator .annotation-tools,#issue-image-annotator .annotation-colors{display:flex;flex-wrap:wrap;gap:6px}
#issue-image-annotator [data-annotation-color]{display:grid;place-items:center;padding:0}
#issue-image-annotator [data-annotation-color] span{display:block;width:18px;height:18px;border:1px solid rgba(0,0,0,.2);border-radius:50%}
#issue-image-annotator button[data-annotation-color][aria-pressed=true]::before{content:none}
#issue-image-annotator [data-annotation-status]{margin:0;overflow-wrap:anywhere}
#issue-image-annotator [data-annotation-status]:empty{display:none}
#attachment-viewer.is-fullscreen,#attachment-viewer:fullscreen,#issue-image-annotator.is-fullscreen,#issue-image-annotator:fullscreen{padding:0}
#attachment-viewer.is-fullscreen .attachment-viewer-dialog,#attachment-viewer:fullscreen .attachment-viewer-dialog,#issue-image-annotator.is-fullscreen .annotation-dialog,#issue-image-annotator:fullscreen .annotation-dialog{width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}
#attachment-viewer.is-fullscreen .attachment-viewer-body,#attachment-viewer:fullscreen .attachment-viewer-body,#issue-image-annotator.is-fullscreen .annotation-image-scroll,#issue-image-annotator:fullscreen .annotation-image-scroll{max-height:none}
#attachment-viewer.is-fullscreen [data-attachment-media],#attachment-viewer:fullscreen [data-attachment-media],#issue-image-annotator.is-fullscreen [data-annotation-canvas],#issue-image-annotator:fullscreen [data-annotation-canvas]{max-height:100%;max-width:100%}
@media (max-width:640px){
#attachment-viewer[role=dialog],#issue-image-annotator[role=dialog]{padding:0}
#attachment-viewer .attachment-viewer-dialog,#issue-image-annotator .annotation-dialog{width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}
#attachment-viewer .attachment-viewer-body,#issue-image-annotator .annotation-image-scroll{max-height:none}
#attachment-viewer [data-attachment-media],#issue-image-annotator [data-annotation-canvas]{max-height:100%;max-width:100%}
#issue-image-annotator .annotation-toolbar{max-height:40dvh;overflow:auto}
#attachments .attachment-grid{grid-template-columns:minmax(0,1fr)}
}

#attachments [data-attachment-card-status]{min-height:40px;margin:0 8px 8px;overflow-wrap:anywhere}

/* Clipboard receipt stays in the current editor header without moving focus. */
.composer-file-paste-status { flex: 1 0 100%; margin: 0; font-size: .8rem; color: var(--teal); overflow-wrap: anywhere; }
