.an-marking, .an-marking *:not(#annotationShell *, #annotationEditor *, #annotationPins *) { cursor: var(--annotation-cursor, crosshair) !important; }
#annotationShell { position: fixed; right: 20px; bottom: 18px; z-index: 1001; color: #1c1e40; }
#annotationShell svg, #annotationEditor svg { width: 18px; height: 18px; flex: 0 0 18px; }
.an-toolbar { display: flex; justify-content: end; gap: 3px; }
.an-toolbar button { min-width: 44px; height: 44px; padding: 10px; border: 1px solid #bbbccd; background: white; color: #1c1e40; box-shadow: 0 2px 8px #1c1e4020; border-radius: 4px; display: inline-flex; align-items: center; gap: 7px; }
.an-toolbar button[aria-pressed=true] { color: white; background: #1c1e40; }
#annotationPanel { width: 370px; max-width: calc(100vw - 28px); max-height: min(640px,calc(100dvh - 90px)); overflow-y: auto; background: white; border: 1px solid #bdbfca; border-radius: 6px; box-shadow: 0 5px 24px #1c1e4030; margin-bottom: 10px; padding: 18px; }
#annotationPanel[hidden] { display: none; }
#annotationShell header, #annotationEditor header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#annotationShell h2, #annotationEditor h2 { font-size: 18px; margin: 0; }
#annotationWorker, #annotationTarget { color: #696c7c; font-size: 12px; overflow-wrap: anywhere; }
#annotationList { list-style: none; padding: 0; margin: 12px 0; }
#annotationList li { border-top: 1px solid #dfe1e8; }
#annotationList button { display: flex; align-items: start; gap: 10px; text-align: left; width: 100%; background: transparent; color: #1c1e40; padding: 13px 0; border: 0; font-weight: 400; font-size: 14px; }
#annotationList button span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#annotationList small { display: block; color: #777a87; font-size: 11px; margin-top: 5px; }
#annotationSend { width: 100%; display: flex; gap: 8px; align-items: center; justify-content: center; white-space: normal; }
#annotationHistory details { border-top: 1px solid #dfe1e8; padding: 12px 0; font-size: 13px; }
#annotationHistory summary { display: flex; gap: 8px; justify-content: space-between; cursor: pointer; }
#annotationHistory p { overflow-wrap: anywhere; }
.an-state { font-weight: 650; }
.an-state[data-state=live] { color: #007b5f; }
.an-state[data-state=blocked], .an-state[data-state=failed], .an-state[data-state=rolled_back] { color: #9a442d; }
#annotationHistory time { font-size: 11px; color: #777a87; }
#annotationMessage, #annotationEditMessage { font-size: 13px; overflow-wrap: anywhere; }
#annotationEditor { width: 440px; max-width: calc(100vw - 28px); border-radius: 6px; }
#annotationEditor form { gap: 8px; }
#annotationEditor p { margin: 4px 0; }
#annotationEditor p:empty { display: none; }
#annotationEditor textarea { width: 100%; resize: vertical; min-height: 100px; }
.an-recipient { display: grid; grid-template-columns: repeat(2,1fr); gap: 0; padding: 0; border: 1px solid #bdbfca; border-radius: 4px; margin: 16px 0 4px; }
.an-recipient[hidden], .an-recipient label:has(input[value="document"]) { display:none; }
.an-recipient label { display: flex; gap: 6px; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 6px; font-size: 14px; cursor: pointer; }
.an-recipient label:has(:checked) { background: #1c1e40; color: white; }
.an-recipient label:has(:disabled) { opacity: .5; cursor: default; }
.an-recipient label:has(:focus-visible) { outline: 2px solid #7c568e; outline-offset: 2px; }
.an-recipient input { position: absolute; opacity: 0; width: 1px; height: 1px; }
#annotationRecipientLabel { margin: 4px 0; font-size: 12px; color: #696c7c; }
#annotationList small svg { width: 13px; height: 13px; vertical-align: middle; margin-right: 4px; }
.an-state[data-state=ready] { color: #007b5f; }
#annotationEditor footer { display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; }
#annotationEditor footer button { display: flex; align-items: center; gap: 8px; }
#annotationPins { position: fixed; inset: 0; pointer-events: none; z-index: 1000; }
.annotation-leader { position: absolute; height: 0; border-top: 1px solid #aab0ba; transform-origin: 0 0; pointer-events: none; }
.annotation-pin { position: absolute; pointer-events: auto; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 2px solid white; background: #1c1e40; color: white; border-radius: 50%; box-shadow: 0 1px 6px #1c1e4050; font-size: 13px; }
.annotation-pin { background: white; color: #1c1e40; border: 0; box-shadow: 0 1px 5px #1c1e4030; }
.annotation-pin svg { width: 28px; height: 28px; }
.annotation-pin span { position: absolute; right: -4px; top: -6px; min-width: 14px; height: 14px; line-height: 14px; background: white; font-size: 10px; font-weight: 700; border-radius: 3px; }
.annotation-pin[data-state=open] { color: #787b89; }
.annotation-pin[data-state=pending] { color: #9b6c00; }
.annotation-pin[data-state=checked], .annotation-pin[data-state=working] { color: #1c1e40; }
.annotation-pin[data-state=released] { color: #08795d; }
.annotation-pin[data-state=failed] { color: #a33739; }
#annotationReview { border-top: 1px solid #dfe1e8; margin-top: 12px; padding-top: 8px; }
#annotationReview[hidden] { display: none; }
#annotationReviewStatus { margin: 0 0 6px; font-size: 12px; }
#annotationReview > div { display: flex; flex-wrap: wrap; gap: 6px; }
#annotationReview button { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; min-height: 36px; padding: 6px; }
.an-empty { padding: 12px 0; font-size: 13px; color: #777a87; }
.an-attachment-picker { display:inline-flex; align-items:center; gap:6px; min-height:40px; padding:6px 10px; border:1px solid #bdbfca; border-radius:4px; cursor:pointer; }
#annotationAttachments { margin-top:8px; padding:10px; border:1px dashed #bdbfca; border-radius:4px; }
#annotationAttachments[hidden] { display:none; }
#annotationAttachmentList { list-style:none; margin:8px 0; padding:0; }
#annotationAttachmentList li { display:flex; align-items:center; gap:7px; min-height:38px; border-top:1px solid #e3e4e9; }
#annotationAttachmentList li span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#annotationAttachmentList li > img { width:52px; height:40px; flex:0 0 52px; object-fit:cover; border:1px solid #d7d9e0; border-radius:3px; background:#f2f3f6; }
#annotationAttachmentList button { min-width:36px; min-height:36px; padding:6px; }
#annotationAttachments small { color:#696c7c; }
.an-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
@media(max-width: 600px) { #annotationShell { right: 14px; bottom: 12px; } #annotationPanel { padding: 14px; } }

#annotationShell [hidden] { display: none !important; }
#annotationPanel { width: 440px; box-sizing: border-box; }
#annotationPanel.an-expanded { width: 780px; max-height: calc(100dvh - 86px); }
.an-window-controls { display: flex; gap: 2px; flex: 0 0 auto; }
.an-window-controls button { min-width: 40px; min-height: 40px; }
.an-tabs { display: flex; gap: 12px; border-bottom: 1px solid #dfe1e8; margin: 6px 0 14px; }
.an-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 0; font-size: 13px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: #696c7c; background: transparent; }
.an-tabs button[aria-selected=true] { color: #1c1e40; border-bottom-color: #1c1e40; }
#vpsCount { font-variant-numeric: tabular-nums; }
#vpsActiveDot { width: 8px; height: 8px; background: #08795d; border-radius: 50%; }
#annotationVps { min-width: 0; }
#vpsJob { width: 100%; min-width: 0; min-height: 42px; font-size: 13px; text-overflow: ellipsis; }
.vps-state-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 12px 0 8px; font-size: 12px; }
#vpsState[data-active=true] { color: #08795d; }
#vpsLogKind, #vpsClipped, #vpsConnection, #vpsEmpty { font-size: 12px; color: #696c7c; overflow-wrap: anywhere; }
#vpsOutput { box-sizing: border-box; width: 100%; height: min(290px, 37dvh); margin: 0; padding: 12px; overflow: auto; overscroll-behavior: contain; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #f3f4f8; background: #17192c; border: 1px solid #35384c; border-radius: 4px; }
.an-expanded #vpsOutput { height: min(540px, 56dvh); }
.vps-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vps-actions button, .vps-actions a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 12px; white-space: normal; }
#vpsFollow[aria-pressed=true] { background: #ebedf3; color: #1c1e40; }
#vpsConnection:empty { display: none; }
@media(max-height: 650px) { #annotationPanel #vpsOutput { height: max(110px, calc(100dvh - 420px)); } }
@media(max-height: 650px) {
  #annotationEditor { padding: 16px; }
  #annotationEditor form { gap: 6px; }
  #annotationEditor h2 { font-size: 16px; }
  #annotationEditor .an-recipient { margin-top: 6px; }
  #annotationEditor textarea { min-height: 72px; height: 72px; }
  #annotationEditor footer { margin-top: 2px; }
}

/* Owner pen shares the compact feedback interaction, without sharing recipients. */
#workspaceHeader { flex-wrap: wrap; }
#workspaceHeader #annotationShell { position: relative; inset: auto; flex: 0 0 100%; width: 100%; margin-top: 6px; }
#annotationShell .an-toolbar { align-items: center; gap: 8px; }
#annotationShell .an-toolbar button { box-shadow: none; border-color: #d5dde3; }
.an-numbers { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #53616a; }
.an-numbers input { width: 16px; height: 16px; margin: 0; }
#annotationPanel { position: fixed; right: 20px; top: 124px; bottom: auto; max-height: calc(100dvh - 146px); }
#annotationPanel.an-expanded { max-height: calc(100dvh - 146px); }
.an-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.an-filters select { min-width: 0; width: 100%; font-size: 12px; }
#annotationResume { width: 100%; text-align: left; overflow-wrap: anywhere; margin-top: 10px; }
#annotationEditor { width: 500px; padding: 20px; max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; }
#annotationEditor[open] { display: block; }
#annotationEditor form { display: flex; flex-direction: column; min-width: 0; }
#annotationEditor [hidden] { display: none !important; }
#annotationEditor header { align-items: start; }
#annotationEditor footer { flex-wrap: wrap; justify-content: end; }
#annotationEditor footer button { font-size: 13px; white-space: normal; }
#annotationEditor #annotationSave { background: white; border: 1px solid #cbd5dd; color: #253238; }
#annotationEditor #annotationDelete { margin-right: auto; }
#annotationEditor #annotationDiscard { align-self: start; min-height: 32px; padding: 4px 0; font-size: 12px; color: #626d72; }
#annotationDraftStatus { font-size: 12px; color: #426655; }
#annotationEditor.an-dropping { outline: 3px solid #367866; outline-offset: -4px; }
#annotationList button.an-locate { width: auto; padding: 6px; font-size: 12px; align-items: center; }
.an-job-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.an-job-actions button { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 7px; }
.an-locate[aria-pressed=true] { background: #e5f2ee; color: #205b4d; }
.an-job-mark { border-top: 1px solid #e3e7e9; padding-top: 6px; }
.an-job-mark small { color: #626d72; }
#annotationHistory summary { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.an-job-title { grid-column: 1 / -1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-weight: 600; }
.an-personal-review { font-weight: 600; }
.an-target-active { outline: 3px solid #3f8774 !important; outline-offset: 5px; }
#annotationAttachments small { font-size: 11px; }
#annotationAttachments:has(#annotationAttachmentList:empty) { padding: 6px 10px; }
@media(max-width:600px) {
  #annotationPanel { right: 10px; top: 110px; max-width: calc(100vw - 20px); max-height: calc(100dvh - 130px); }
  #annotationPanel.an-expanded { max-height: calc(100dvh - 130px); }
  #annotationEditor { padding: 16px; }
  #annotationEditor footer { gap: 6px; }
  #annotationEditor #annotationSubmit { flex: 1 1 100%; justify-content: center; }
}
