/* Shared quick-note drawer: fixed actions, compact controls, scrollable words. */
.sg-notedlg-wrap{inset:var(--note-top-inset,0px) 0 0;z-index:140;display:flex;justify-content:flex-end;align-items:stretch;padding:0}
.sg-notedlg-scrim{background:rgba(10,26,37,.52)}
.sg-notedlg{display:flex;flex-direction:column;width:min(460px,100%);height:calc(100dvh - var(--note-top-inset,0px));max-height:none;overflow:hidden;border-radius:0;border:0;border-left:1px solid var(--line);padding:0;box-shadow:-12px 0 36px rgba(0,28,43,.2);animation:sg-note-enter .2s ease-out}
.sg-notedlg-head{flex:none;position:relative;display:grid;grid-template-columns:1fr auto;gap:4px 12px;margin:0;padding:16px 20px;border-bottom:1px solid var(--line)}
.sg-notedlg-head h2{grid-column:1;font-size:20px;line-height:1.25}
.sg-notedlg-head span{grid-column:1;font-size:13px;line-height:1.4}
.sg-notedlg-x{grid-column:2;grid-row:1 / span 2;align-self:center;margin:0;width:var(--control-height-sm,32px);height:var(--control-height-sm,32px);border-radius:var(--radius-control,6px)}
.sg-notedlg-x:hover{background:var(--surface-2)}
.sg-notedlg-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 20px}
.sg-notedlg fieldset{gap:6px;margin:0 0 16px}
.sg-notedlg .sg-dlgchip{min-height:var(--control-height-sm,32px);padding:0 12px;gap:6px;border-radius:var(--radius-control,6px);font:600 12px/1.2 var(--font-ui)}
.sg-notedlg .sg-dlgchip svg{width:14px;height:14px}
.sg-notedlg-label,.sg-notedlg legend{margin-bottom:4px;font:650 10px/1.4 var(--font-ui);letter-spacing:.06em;color:var(--ink2)}
.sg-notedlg-row{position:relative;display:block;margin-bottom:16px}
.sg-notedlg-row textarea{display:block;width:100%;box-sizing:border-box;min-height:176px;padding:10px 12px 48px;resize:vertical;font-size:14px;line-height:1.5;border-radius:var(--radius-control,6px)}
.sg-notedlg-row .mic{position:absolute;bottom:8px;right:8px;min-width:0;min-height:var(--control-height-sm,32px);padding:0 10px;flex-direction:row;gap:6px;font-size:12px;border-radius:var(--radius-control,6px)}
.sg-notedlg-row .mic svg{width:16px;height:16px}
.sg-notedlg-msg{font-size:12px;line-height:1.4;margin:-8px 0 16px;min-height:0}
.sg-notedlg-msg:empty{display:none}
.sg-notedlg-foot{flex:none;justify-content:flex-end;align-items:center;padding:12px 20px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--card);gap:8px}
.sg-notedlg-wrap .sg-notedlg-foot .btn{min-height:var(--control-height);padding:0 14px;font-size:13px}
.sg-notedlg-company{margin-bottom:16px}
.sg-notedlg-company input{width:100%;box-sizing:border-box;height:var(--control-height);min-height:var(--control-height);padding:0 10px;font:inherit;font-size:13px;border:1px solid var(--line);border-radius:var(--radius-control,6px);background:var(--card);color:var(--ink)}
.sg-notedlg-company-status{font-size:12px;color:var(--mute);padding:8px 0}
.sg-notedlg-company-results{display:grid;max-height:220px;overflow:auto;gap:4px}
.sg-notedlg-company-results button{display:grid;text-align:left;gap:2px;padding:8px 12px;border:1px solid var(--line);border-radius:var(--radius-control,6px);color:var(--ink);background:var(--card);cursor:pointer}
.sg-notedlg-company-results button:hover{background:var(--surface-2);border-color:var(--blue)}
.sg-notedlg-company-results strong{font-size:13px;font-weight:600}
.sg-notedlg-company-results small{font-size:11px;color:var(--mute)}
.sg-notedlg-company [data-dlg-company-selected]{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--line);border-radius:7px;font-size:13px}
.sg-notedlg-company [data-dlg-company-selected] small{display:block;font-size:11px;color:var(--mute);margin-top:3px}
.sg-notedlg-company [data-dlg-company-selected] button{border:0;background:none;color:var(--blue);cursor:pointer;font:inherit;font-size:12px;padding:5px}
.sg-notedlg [hidden]{display:none!important}
.sg-notedlg :focus-visible{outline:2px solid var(--blue);outline-offset:2px}
@keyframes sg-note-enter{from{transform:translateX(100%);opacity:.7}to{transform:translateX(0);opacity:1}}
@media(max-width:520px){.sg-notedlg{width:100%;border-left:0;border-radius:0;padding-bottom:0}.sg-notedlg-head{padding:12px 16px}.sg-notedlg-body{padding:16px}.sg-notedlg-foot{padding-left:16px;padding-right:16px}.sg-notedlg-row textarea{font-size:16px;min-height:160px}.sg-notedlg-company input{font-size:16px}}
@media(prefers-reduced-motion:reduce){.sg-notedlg{animation:none}}

.sg-notedlg-discard{flex:none;margin:0 20px 12px;padding:12px;border:1px solid var(--line);border-radius:var(--radius-control,6px);background:var(--surface-2);font-size:13px}
.sg-notedlg-discard strong,.sg-notedlg-discard span{display:block}
.sg-notedlg-discard span{font-size:12px;color:var(--mute);margin-top:3px}
.sg-notedlg-discard>div{display:flex;justify-content:flex-end;gap:6px;margin-top:9px}
.sg-notedlg-discard .btn{min-height:32px;font-size:12px}
.sg-notedlg-discard [data-dlg-discard]{color:var(--red,#b42318)}
@media(max-width:520px){.sg-notedlg-discard{margin-left:16px;margin-right:16px}}
