#voiceMemo{background:#1D4ED8!important;color:#fff!important;border:1px solid #1D4ED8!important;min-height:44px;white-space:nowrap;border-radius:12px;padding:8px 14px;cursor:pointer;flex:0 0 auto;order:5}#voiceMemo[hidden],#memoMenu[hidden]{display:none!important}#memoMenu{margin:8px 12px;min-height:44px}
#voiceMemoDialog.memo-dialog{box-sizing:border-box;position:fixed;width:min(940px,96vw);height:min(900px,94dvh,var(--memo-height,100dvh));max-width:100vw;max-height:var(--memo-height,100dvh);margin:auto;padding:20px;border:1px solid #d2d8e3;border-radius:18px;background:#fff;color:#172033;overflow:hidden;overscroll-behavior:contain}
#voiceMemoDialog[open]{display:flex;flex-direction:column;gap:8px}#voiceMemoDialog::backdrop{background:#10182899}#voiceMemoDialog [hidden]{display:none!important}
.memo-library,.memo-editor{display:flex;flex:1;min-height:0;flex-direction:column;gap:14px}.memo-page-head{display:flex;flex:none;align-items:center;gap:12px;min-height:48px;padding-right:36px}.memo-page-head h2{font-size:25px;margin:0;flex:1}.memo-editor-label{flex:1;color:#64748b}.memo-dialog button{cursor:pointer;padding:8px 12px;min-height:44px;border:1px solid #cbd5e1;border-radius:10px;background:#f1f5f9;color:#172033;font:inherit}.memo-page-head>[data-list-back],.memo-page-head>[data-editor-back],.memo-page-head>[data-search-toggle]{border:0;background:transparent;font-size:32px;padding:0 10px}.memo-editor .memo-page-head{padding-right:0}
#voiceMemoDialog [data-search]{box-sizing:border-box;width:100%;padding:12px;border:1px solid #cbd5e1;border-radius:10px;font:inherit;flex:none}.memo-messages{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;touch-action:pan-y;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;overflow-anchor:none;scroll-behavior:auto;padding:4px 4px 88px}
#voiceMemoDialog button.memo-message{display:block;box-sizing:border-box;width:100%;padding:22px 24px;margin:0 0 16px;text-align:left;border:1px solid #e2e8f0;border-radius:10px;background:#f1f3f6}.memo-message p{white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:18px;line-height:1.6;margin:0 0 14px}.memo-message time{display:block;font-size:13px;color:#667085}.memo-empty{color:#64748b;padding:20px}.memo-new{position:absolute;bottom:54px;right:32px;width:62px;height:62px;border-radius:50%!important;font-size:32px!important;box-shadow:0 4px 18px #10182835;z-index:3}
#voiceMemoDialog [data-composer]{display:flex;flex:1;min-height:0}.memo-dialog .memo-editor textarea[data-body]{box-sizing:border-box;display:block;flex:1;width:100%;height:100%;min-height:0;max-height:none;border:0!important;border-radius:0!important;outline:none!important;box-shadow:none!important;resize:none;padding:18px 8px;overflow-y:auto;overflow-x:hidden;touch-action:pan-y;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;line-height:1.7;font-size:20px;font-family:inherit;scroll-behavior:auto;background:transparent;color:inherit}.memo-editor-footer{display:flex;align-items:center;gap:12px;flex:none;flex-wrap:wrap}.memo-editor-footer time{font-size:12px;color:#667085;flex:1;text-align:right}.memo-dialog [data-status]{font-size:12px;min-height:18px;margin:0;flex:none;color:#667085}.memo-dialog audio{width:100%;max-height:50px}.memo-dialog [data-audio-host]{flex:none}.memo-dialog button:disabled{opacity:.55;cursor:default}
#voiceMemoDialog#voiceMemoDialog#voiceMemoDialog button.memo-primary{background:#1D4ED8!important;color:#fff!important;border-color:#1D4ED8!important}.memo-dialog button:focus-visible,#voiceMemo:focus-visible,#memoMenu:focus-visible{outline:3px solid #60a5fa;outline-offset:2px}
:root[data-theme="dark"] #voiceMemoDialog#voiceMemoDialog#voiceMemoDialog{background:#242428!important;color:#eee!important;border-color:#333!important}:root[data-theme="dark"] #voiceMemoDialog#voiceMemoDialog#voiceMemoDialog button.memo-message{background:#333338!important;border-color:#3a3a40!important;color:#eee!important}:root[data-theme="dark"] .memo-message time,:root[data-theme="dark"] .memo-editor-label,:root[data-theme="dark"] .memo-editor-footer time,:root[data-theme="dark"] .memo-dialog [data-status]{color:#a7a7af}:root[data-theme="dark"] #voiceMemoDialog#voiceMemoDialog#voiceMemoDialog textarea[data-body]{background:#242428!important;color:#eee!important}
@media(max-width:600px){#voiceMemoDialog.memo-dialog{top:var(--memo-top,0px);left:0;right:0;bottom:auto;width:100%;height:var(--memo-height,100dvh);max-height:var(--memo-height,100dvh);margin:0;padding:calc(12px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom));border:0;border-radius:0}.memo-page-head{gap:8px}.memo-page-head h2{font-size:22px}.memo-editor-label{font-size:14px}.memo-message p{font-size:17px}#voiceMemoDialog button.memo-message{padding:18px 20px;margin-bottom:14px}.memo-new{right:24px;bottom:calc(42px + env(safe-area-inset-bottom))}.memo-editor textarea[data-body]{font-size:19px}.memo-editor-footer time{font-size:11px}.topbar:has(#voiceMemo:not([hidden])){flex-wrap:wrap!important;height:auto!important;min-height:64px}#voiceMemo{margin:6px 0}}
:root[data-theme="dark"] #voiceMemoDialog#voiceMemoDialog#voiceMemoDialog .memo-page-head button:not(.memo-primary),:root[data-theme="dark"] #voiceMemoDialog#voiceMemoDialog#voiceMemoDialog [data-mic]{background:#333338!important;color:#eee!important;border-color:#484850!important}
:root[data-theme="dark"] #voiceMemoDialog#voiceMemoDialog#voiceMemoDialog .memo-page-head :is([data-list-back],[data-editor-back],[data-search-toggle]){background:transparent!important;border:0!important;color:#eee!important}

#voiceMemoDialog [data-composer]{flex-direction:column;gap:10px;overflow:hidden}
#voiceMemoDialog .memo-editor textarea[data-body]{flex:1 1 0;min-height:65px}
.memo-attachments{flex:0 1 auto;max-height:38dvh;overflow-y:auto;overflow-x:hidden;touch-action:pan-y;overscroll-behavior:contain}
.memo-file{border:1px solid #cbd5e1;border-radius:10px;padding:10px;margin:8px 0;background:#f8fafc;overflow-wrap:anywhere}
.memo-file-info{display:flex;flex-direction:column;gap:4px}.memo-file-info small{font-size:12px;color:#64748b}
.memo-file-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.memo-file-actions button{font-size:12px;padding:6px 10px;min-height:34px}
.memo-file-image{display:block;width:auto;max-width:100%;max-height:140px;object-fit:contain;cursor:zoom-in;margin-top:8px}.memo-file-image.memo-image-expanded{max-height:none;cursor:zoom-out}
.memo-file-policy{flex:none;font-size:11px;color:#667085;margin:0}.memo-attachments:empty+.memo-file-policy{display:none}
:root[data-theme="dark"] .memo-file{background:#333338;color:#eee;border-color:#484850}:root[data-theme="dark"] .memo-file-info small{color:#cbd5e1}
#voiceMemoDialog .memo-editor-footer{gap:8px}#voiceMemoDialog .memo-editor-footer>button{padding:6px 9px;min-height:40px;font-size:13px}
@media(max-width:600px){#voiceMemoDialog .memo-editor-footer time{flex-basis:100%;text-align:left}.memo-attachments{max-height:34dvh}}

#voiceMemoDialog#voiceMemoDialog#voiceMemoDialog :is(.memo-message p,textarea[data-body],.memo-file-info strong){font-size:var(--memo-font-size,20px)!important}
#voiceMemoDialog#voiceMemoDialog#voiceMemoDialog .memo-font-tools{display:inline-flex;align-items:center;gap:2px;flex:none;white-space:nowrap}
#voiceMemoDialog#voiceMemoDialog#voiceMemoDialog .memo-font-tools button{min-width:28px!important;width:28px!important;min-height:30px!important;height:30px!important;padding:2px!important;font-size:13px!important;line-height:1!important}
#voiceMemoDialog .memo-font-tools output{min-width:22px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums}
@media(max-width:380px){#voiceMemoDialog .memo-page-head{gap:4px!important}#voiceMemoDialog .memo-editor-label{font-size:12px!important}}

/* Keep microphone controls above the editor, outside the scrolling content. */
#voiceMemoDialog .memo-mic-toolbar{display:flex;align-items:center;gap:8px;flex:none;min-height:44px}
#voiceMemoDialog .memo-mic-toolbar [data-mic]{flex:none;min-height:44px;background:#1D4ED8;color:#fff;border-color:#1D4ED8;font-size:14px;white-space:nowrap}
#voiceMemoDialog .memo-mic-toolbar [data-mic][aria-pressed="true"]{background:#b91c1c;border-color:#b91c1c}
#voiceMemoDialog .memo-mic-toolbar [data-mic-preview]{font-size:12px;line-height:1.4;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere;color:inherit}
@media(max-height:520px){#voiceMemoDialog .memo-editor{gap:4px}#voiceMemoDialog .memo-editor-footer time{display:none}#voiceMemoDialog .memo-page-head{min-height:36px}#voiceMemoDialog .memo-page-head>button{min-height:36px}}

/* Microphone and Save share the fixed editor header above the keyboard. */
#voiceMemoDialog .memo-editor .memo-page-head{flex-wrap:wrap;gap:6px}
#voiceMemoDialog .memo-save-actions{display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto;white-space:nowrap}
#voiceMemoDialog#voiceMemoDialog#voiceMemoDialog#voiceMemoDialog .memo-editor .memo-page-head [data-mic]{flex:none;white-space:nowrap;font-size:13px;padding:6px 9px;background:#1D4ED8!important;color:#fff!important;border-color:#1D4ED8!important}
#voiceMemoDialog#voiceMemoDialog#voiceMemoDialog#voiceMemoDialog .memo-editor .memo-page-head [data-mic][aria-pressed="true"]{background:#b91c1c!important;border-color:#b91c1c!important}
#voiceMemoDialog .memo-editor>[data-mic-preview]{flex:none;font-size:12px;line-height:1.4;min-height:17px;max-height:34px;overflow:hidden;overflow-wrap:anywhere;color:inherit}
@media(max-width:380px){#voiceMemoDialog .memo-editor-label{flex:1 0 calc(100% - 90px)}#voiceMemoDialog .memo-editor .memo-page-head .memo-font-tools{margin-right:auto}}

#voiceMemoDialog .memo-speech-feedback,#voiceMemoDialog .memo-save-feedback{display:flex;align-items:center;gap:6px;flex:none;flex-wrap:wrap;font-size:12px;line-height:1.4}
#voiceMemoDialog .memo-speech-feedback [data-mic-preview]{flex:1;max-height:32px;overflow:hidden;overflow-wrap:anywhere}
#voiceMemoDialog .memo-speech-feedback button,#voiceMemoDialog .memo-save-feedback button{min-height:30px;padding:3px 7px;font-size:12px}
#voiceMemoDialog [data-save-state]{padding:3px 6px;border-radius:6px;background:#f1f5f9;color:#475569}
#voiceMemoDialog [data-save-state][data-state="saved"]{background:#dcfce7;color:#166534}
#voiceMemoDialog [data-save-state]:is([data-state="failed"],[data-state="local-failed"],[data-state="conflict"]){background:#fee2e2;color:#991b1b}
#voiceMemoDialog .memo-message{box-sizing:border-box;padding:14px 16px;margin:0 0 10px;text-align:left;border:1px solid #e2e8f0;border-radius:10px;background:#f1f3f6}
#voiceMemoDialog#voiceMemoDialog .memo-message-open{display:block;width:100%;background:transparent!important;color:inherit!important;border:0!important;padding:0!important;text-align:left;font:inherit;min-height:0}
#voiceMemoDialog .memo-mark-actions{display:flex;gap:8px;margin-top:8px}#voiceMemoDialog .memo-mark-actions button{font-size:12px;min-height:34px;padding:4px 8px}
#voiceMemoDialog .memo-mark-actions button[aria-pressed="true"]{background:#1D4ED8!important;color:#fff!important;border-color:#1D4ED8!important}
:root[data-theme="dark"] #voiceMemoDialog .memo-message{background:#333338;border-color:#484850}
:root[data-theme="dark"] #voiceMemoDialog [data-save-state]{background:#343941;color:#f1f5f9}:root[data-theme="dark"] #voiceMemoDialog [data-save-state][data-state="saved"]{background:#17432a;color:#bbf7d0}
:root[data-theme="dark"] #voiceMemoDialog [data-save-state]:is([data-state="failed"],[data-state="local-failed"],[data-state="conflict"]){background:#571f28;color:#fecaca}

#voiceMemoDialog [data-memo-filters],#voiceMemoDialog .memo-action-tools{display:flex;gap:6px;flex-wrap:wrap;flex:none}
#voiceMemoDialog [data-memo-filters] button,#voiceMemoDialog .memo-action-tools button{font-size:12px;min-height:34px;padding:4px 8px}
#voiceMemoDialog [data-memo-filters] button[aria-pressed="true"]{background:#1D4ED8!important;color:#fff!important;border-color:#1D4ED8!important}
.memo-checks{display:flex;flex-direction:column;gap:6px;flex:none;max-height:24dvh;overflow-y:auto;overscroll-behavior:contain}
.memo-checks label{display:flex;gap:8px;align-items:center;overflow-wrap:anywhere;font-size:14px;line-height:1.5}.memo-checks input{flex:none;width:20px;height:20px}
.memo-action-dialog{box-sizing:border-box;width:min(620px,96vw);max-height:90dvh;overflow:auto;border:1px solid #cbd5e1;border-radius:12px;padding:16px;background:#fff;color:#172033}
.memo-action-dialog header{display:flex;align-items:center;justify-content:space-between;gap:8px}.memo-action-dialog h3{margin:0;font-size:18px}.memo-action-dialog section{display:flex;flex-direction:column;gap:10px}.memo-action-dialog button,.memo-action-dialog select,.memo-action-dialog input[type=search],.memo-action-dialog input[type=datetime-local]{box-sizing:border-box;min-height:40px;padding:6px 10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;max-width:100%}.memo-action-dialog label{display:block}.memo-action-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:32dvh;overflow:auto;font:inherit;background:#f1f5f9;padding:10px}.memo-action-dialog button:disabled{opacity:.6}.memo-forward-files img{height:64px;width:64px;object-fit:contain;vertical-align:middle}.memo-forward-files label{display:flex;align-items:center;gap:8px;overflow-wrap:anywhere}
:root[data-theme=dark] .memo-action-dialog{background:#242428;color:#eee;border-color:#484850}:root[data-theme=dark] .memo-action-dialog pre{background:#333338}
#voiceMemoDialog [data-library]>.memo-page-head{flex-wrap:wrap;gap:6px;padding-right:0}#voiceMemoDialog [data-memo-alarms]{font-size:12px;min-height:34px;padding:4px 7px}

.memo-action-dialog :is(button,input,select){background:#f1f5f9;color:#172033}:root[data-theme=dark] .memo-action-dialog :is(button,input,select){background:#333338;color:#eee}
