/* Separate shared memo UI, scoped to its own classes. */
.rh-sm-launch{border:1px solid #b9cbd8;background:#fff;color:#245a83;border-radius:5px;padding:7px 10px;font:inherit;font-size:14px;font-weight:600;min-height:36px;white-space:nowrap;cursor:pointer;}
.rh-sm-admin-launch{display:block;margin:5px 0 0;max-width:100%;white-space:normal;font-size:12px;min-height:28px;padding:3px 6px;}
.schedule-card .order-footer:has(.rh-sm-launch){justify-content:space-between!important;gap:8px;}
.rh-sm-dialog{box-sizing:border-box;position:fixed;inset:0;margin:auto;width:min(600px,calc(100% - 32px));max-width:100%;height:min(740px,85vh);max-height:calc(var(--rh-sm-vh,100dvh) - 24px);padding:0;border:0;border-radius:16px;overflow:hidden;background:#fff;color:#172f44;box-shadow:0 12px 60px #0003;}
.rh-sm-dialog::backdrop{background:#101e2b88;}
.rh-sm-panel{height:100%;display:flex;flex-direction:column;min-height:0;box-sizing:border-box;}
.rh-sm-head,.rh-sm-foot{flex:none;padding:12px 16px;background:#fff;box-sizing:border-box;}
.rh-sm-head{border-bottom:1px solid #e1e7ed;}.rh-sm-title{display:flex;justify-content:space-between;align-items:center;font-size:19px;gap:10px;}.rh-sm-title button{font:inherit;font-size:26px;background:transparent;border:0;color:#172f44;min-width:40px;min-height:40px;cursor:pointer;}
.rh-sm-label{font-size:14px;font-weight:600;overflow-wrap:anywhere;}.rh-sm-hint{font-size:12px;color:#596d7d;margin:6px 0 0;line-height:1.45;}
.rh-sm-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:4px 16px;}.rh-sm-note{border-bottom:1px solid #e1e7ed;padding:12px 0;}.rh-sm-note-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:12px;flex-wrap:wrap;}.rh-sm-note-head span{color:#677a88;}.rh-sm-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.5;margin-top:6px;}.rh-sm-empty{color:#64748b;text-align:center;padding:24px 0;}
.rh-sm-foot{border-top:1px solid #e1e7ed;padding-bottom:max(12px,env(safe-area-inset-bottom));}.rh-sm-foot form{margin:6px 0 0;display:flex;flex-direction:column;gap:8px;}.rh-sm-foot form[hidden],.rh-sm-dialog [hidden]{display:none!important;}.rh-sm-foot label{display:block;font-size:13px;font-weight:600;}.rh-sm-foot textarea{display:block;width:100%;box-sizing:border-box;font:inherit;font-size:16px;padding:9px;border:1px solid #bbcbd8;border-radius:7px;resize:vertical;max-height:120px;margin-top:4px;background:#fff;color:#172f44;}.rh-sm-foot button[type=submit]{background:#173650;color:white;border:0;border-radius:7px;min-height:42px;font:inherit;font-weight:600;}.rh-sm-dialog button:disabled{opacity:.5;cursor:default;}.rh-sm-status{font-size:12px;color:#50677c;overflow-wrap:anywhere;}.rh-sm-dialog [data-more],.rh-sm-dialog [data-refresh]{font:inherit;font-size:12px;background:#fff;border:1px solid #b9cbd8;border-radius:5px;color:#245a83;padding:5px 8px;margin:5px 0;}.rh-sm-dialog [data-more]{width:100%;}.rh-sm-handle{display:none;}
@media(max-width:600px){.rh-sm-dialog{inset:auto 0 var(--rh-sm-bottom,0px);margin:0;width:100%;height:min(85dvh,calc(var(--rh-sm-vh,100dvh) - 8px));max-height:calc(var(--rh-sm-vh,100dvh) - 8px);border-radius:16px 16px 0 0;animation:rh-sm-rise .18s ease-out;}.rh-sm-handle{display:block;width:32px;height:4px;border-radius:4px;background:#b8c4ce;margin:0 auto 4px;}.rh-sm-head,.rh-sm-foot{padding-left:12px;padding-right:12px;}.rh-sm-list{padding:0 12px;}}
@media(max-height:480px){.rh-sm-hint{display:none;}.rh-sm-head,.rh-sm-foot{padding-top:5px;padding-bottom:5px;}.rh-sm-foot textarea{height:54px;}.rh-sm-title{font-size:16px;}.rh-sm-title button{min-height:30px;}}
@keyframes rh-sm-rise{from{transform:translateY(25px);opacity:.6}to{transform:translateY(0);opacity:1}}@media(prefers-reduced-motion:reduce){.rh-sm-dialog{animation:none!important;}}

/* V4: latest shared note, scoped to detail and active order list only. */
.rh-sm-preview{box-sizing:border-box;min-width:0;margin:12px 0;padding:12px;border:1px solid #d3e0eb;border-radius:10px;background:#f8fbfd;color:#18364e;}
.rh-sm-preview-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;}
.rh-sm-preview-head>strong{font-size:15px;line-height:1.4;overflow-wrap:anywhere;}
.rh-sm-preview-head .rh-sm-launch{font-size:13px;min-height:34px;max-width:100%;white-space:normal;}
.rh-sm-preview-head .rh-sm-launch:disabled{opacity:.65;cursor:default;}
.rh-sm-preview-meta{font-size:12px;color:#52697b;margin-top:7px;overflow-wrap:anywhere;}
.rh-sm-preview-meta:empty{display:none;}
.rh-sm-preview-text{font-size:14px;line-height:1.5;margin-top:5px;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
#orders .order-card .rh-sm-order-row{display:flex;justify-content:flex-start;margin:8px 0 0;}
#orders .order-card .rh-sm-order-row .rh-sm-launch{font-size:13px;min-height:34px;}

/* Work memo revision controls, scoped to the existing dialog. */
.rh-sm-dialog .rh-sm-note-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:8px;}
.rh-sm-dialog .rh-sm-note-actions button,.rh-sm-dialog [data-cancel-edit]{font:inherit;font-size:13px;min-height:36px;padding:5px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#334155;cursor:pointer;}
.rh-sm-dialog .rh-sm-note-actions .rh-sm-delete{color:#a52b2b;}
.rh-sm-dialog .rh-sm-edited{font-size:12px;color:#64748b;margin-top:5px;}
.rh-sm-dialog .rh-sm-compose-actions{display:flex;gap:8px;}
.rh-sm-dialog .rh-sm-compose-actions [type=submit]{flex:1;}
