.text-annotation{color:inherit;text-decoration-line:underline;text-decoration-style:dotted;text-decoration-color:#315da8;text-decoration-thickness:2px;text-underline-offset:4px;cursor:pointer;border-radius:3px}.text-annotation:hover{background:#eaf2ff}.annotation-popover{position:fixed;z-index:1200;width:min(380px,calc(100vw - 28px));max-height:min(460px,70vh);overflow:visible;padding:18px;background:#fff;border:1px solid #d9e1ed;border-radius:14px;box-shadow:0 18px 55px rgba(24,32,51,.22)}.annotation-popover[hidden]{display:none}.annotation-popover::before{content:"";position:absolute;left:var(--annotation-arrow-left,28px);width:12px;height:12px;background:#fff;transform:translateX(-50%) rotate(45deg)}.annotation-popover.is-above::before{bottom:-7px;border-right:1px solid #d9e1ed;border-bottom:1px solid #d9e1ed}.annotation-popover.is-below::before{top:-7px;border-left:1px solid #d9e1ed;border-top:1px solid #d9e1ed}.annotation-popover-text{max-height:330px;overflow:auto;margin:0;white-space:pre-wrap;line-height:1.7}.annotation-popover img{display:block;max-width:100%;max-height:230px;margin-top:13px;border-radius:9px;cursor:zoom-in}.annotation-popover img[hidden]{display:none}.annotation-image-lightbox{position:fixed;inset:0;z-index:1300;display:grid;place-items:center;padding:24px;background:rgba(10,17,30,.82);cursor:zoom-out}.annotation-image-lightbox[hidden]{display:none}.annotation-image-lightbox img{max-width:95vw;max-height:92vh;object-fit:contain}.annotation-dialog{width:min(620px,calc(100vw - 28px));border:0;border-radius:18px;padding:22px;box-shadow:0 24px 70px rgba(24,32,51,.25)}.annotation-dialog::backdrop{background:rgba(24,32,51,.42)}.annotation-dialog .dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.annotation-dialog h2{margin:0}.annotation-dialog .dialog-head p{margin:5px 0 0;color:var(--muted);font-size:14px}.annotation-field{display:grid;gap:7px;margin-top:20px;font-weight:650}.annotation-field textarea{width:100%;resize:vertical;border:1px solid var(--border);border-radius:11px;padding:12px;font:inherit;line-height:1.55}.annotation-image-field{display:flex;align-items:center;gap:10px;margin-top:14px}.annotation-image-preview{position:relative;width:max-content;max-width:100%;margin-top:12px}.annotation-image-preview img{display:block;max-width:220px;max-height:150px;border-radius:9px}.annotation-image-preview button{position:absolute;right:6px;top:6px;border:0;border-radius:7px;padding:5px 8px;background:rgba(20,28,43,.8);color:#fff;cursor:pointer}.annotation-dialog-actions{display:grid;grid-template-columns:auto 1fr auto auto;gap:9px;align-items:center;margin-top:20px}.visual-editor .text-annotation{background:#eef4ff}
@media(max-width:800px){.annotation-popover{right:auto;bottom:auto;width:calc(100vw - 24px);max-height:65vh;overflow:auto;border-radius:18px 18px 0 0;padding:20px 18px calc(20px + env(safe-area-inset-bottom));box-shadow:0 -12px 45px rgba(24,32,51,.2)}.annotation-popover::before{display:block}.annotation-popover-text{max-height:none;overflow:visible}.annotation-dialog{padding:18px}.annotation-dialog-actions{grid-template-columns:auto 1fr auto}.annotation-dialog-actions span{display:none}.annotation-dialog-actions .button{padding-left:12px;padding-right:12px}}
.annotation-popover.parameter-popover{width:min(760px,calc(100vw - 32px));max-height:82vh;box-sizing:border-box;padding:22px}
.parameter-popover .annotation-popover-text{max-height:calc(82vh - 46px);line-height:1.8}
.parameter-original{margin:0 0 14px;white-space:normal;color:#657087;font-size:14px}
.parameter-original summary{cursor:pointer;color:#4963a6}
.parameter-original p{margin:8px 0;white-space:pre-wrap}
@media(max-width:800px){.annotation-popover.parameter-popover{width:calc(100vw - 24px);max-height:85vh;padding:20px 18px calc(20px + env(safe-area-inset-bottom))}.parameter-popover .annotation-popover-text{max-height:none}}
.parameter-edit-button{border:0;background:transparent;color:#4963a6;font:inherit;font-size:14px;padding:0 0 12px;cursor:pointer}
.parameter-edit-field{display:grid;gap:8px;font-size:14px;white-space:normal}
.parameter-edit-field textarea{width:100%;box-sizing:border-box;min-height:240px;max-height:48vh;resize:vertical;border:1px solid #cdd7e8;border-radius:10px;padding:12px;font:inherit;font-size:16px;line-height:1.7;color:#182033;background:#fff}
.parameter-edit-actions{display:flex;gap:10px;margin-top:14px}
.parameter-edit-actions button{border:0;border-radius:8px;padding:9px 18px;font:inherit;cursor:pointer;background:#eef2f8;color:#4963a6}
.parameter-edit-actions button:first-child{background:#4963a6;color:white}
.parameter-edit-actions button:disabled{opacity:.6;cursor:wait}
.parameter-edit-error{color:#a33a34;font-size:14px;white-space:normal}
.parameter-edit-field+.parameter-edit-field{margin-top:14px}
.parameter-edit-field textarea[name="unit"]{min-height:64px;resize:vertical}
.parameter-edit-field textarea[name="syntax"]{min-height:100px}
.parameter-edit-field textarea[name="meaning"]{min-height:180px}
.parameter-edit-field input{width:100%;box-sizing:border-box;border:1px solid #cdd7e8;border-radius:10px;padding:10px;font:inherit;background:#fff;color:#182033}
.parameter-edit-field textarea[name="definition"],.parameter-edit-field textarea[name="evidence"],.parameter-edit-field textarea[data-source-field]{min-height:70px}
.parameter-config-confirm{display:flex;align-items:flex-start;gap:8px;margin-top:18px;font-size:14px;white-space:normal}
.parameter-config-confirm input{margin-top:7px;flex-shrink:0}
.parameter-edit-actions{position:sticky;top:0;background:#fff;z-index:2;flex-wrap:wrap;padding:0 0 12px;margin:0 0 12px}
.parameter-edit-actions .parameter-edit-error{flex-basis:100%;margin:0}
.annotation-popover:not(.parameter-popover){display:flex;flex-direction:column;box-sizing:border-box;max-height:min(460px,70vh)}
.annotation-popover:not(.parameter-popover)[hidden]{display:none}
.annotation-popover:not(.parameter-popover) .annotation-popover-text{flex:1 1 auto;min-height:0;overflow:auto}
.annotation-popover:not(.parameter-popover) img{flex:0 1 auto;min-height:0;object-fit:contain;max-height:35vh}
.annotation-drawer .annotation-popover-text.note-rich-content{white-space:normal!important}
.note-rich-content img{max-width:100%;height:auto;max-height:none!important}
.note-link{color:#4963a6;text-decoration:underline;text-underline-offset:3px}
.note-link-dialog{width:min(680px,calc(100vw - 32px));border:1px solid #d9e1ed;border-radius:12px;color:#182033}
.note-link-dialog select{width:100%;margin:12px 0}
.note-picker-search,.note-pagination{display:flex;gap:10px;align-items:center}
.note-picker-search input{flex:1;min-width:0}
