/* Messenger finishing system. Scoped to secondary surfaces, never the approved chat shell. */
.nm-finish{--mf-panel:#fff;--mf-soft:#f4f7fb;--mf-tint:#eaf3f8;--mf-ink:#172d42;--mf-muted:#52667a;--mf-line:#d6e1eb;--mf-accent:#11627e;--mf-accent-ink:#fff;--mf-hover:#e6f2f7;--mf-danger:#ad2946;--mf-shadow:0 30px 100px #07172845;--mf-radius:20px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--mf-ink);font-size:16px;line-height:1.55}
:root[data-nm-theme="dark"] .nm-finish,body.nm-night .nm-finish{--mf-panel:#142331;--mf-soft:#0f1c28;--mf-tint:#1b3545;--mf-ink:#eef5fa;--mf-muted:#a5b9c9;--mf-line:#354b5d;--mf-accent:#8cdbea;--mf-accent-ink:#08222d;--mf-hover:#203d4f;--mf-danger:#ff9ab1;--mf-shadow:0 32px 100px #0009}
:root[data-nm-theme] body.nm-theme .nm-finish{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;background:#07152299;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);isolation:isolate}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nmmsg-modal-card,.nmai-dialog,.nmce-dialog,.nm-detail-card){box-sizing:border-box;width:min(860px,100%);max-width:100%;max-height:calc(100dvh - 48px);margin:0;padding:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--mf-line)!important;border-radius:var(--mf-radius);background:var(--mf-panel)!important;color:var(--mf-ink)!important;box-shadow:var(--mf-shadow);font-size:16px;line-height:1.55}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-detail-card.compact{width:min(540px,100%)}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nmmsg-modal-head,.nm-detail-head,.nmai-dialog>header,.nmce-dialog>header){flex:none;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 28px;border:0;border-bottom:1px solid var(--mf-line);background:linear-gradient(130deg,var(--mf-panel),var(--mf-soft))}
:root[data-nm-theme] body.nm-theme .nm-finish :is(h2,h3){color:var(--mf-ink)!important;letter-spacing:-.025em;overflow-wrap:anywhere}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nmmsg-modal-head,.nm-detail-head,.nmai-dialog>header,.nmce-dialog>header) :is(h2,h3){margin:3px 0;font-size:25px!important;line-height:1.25;font-weight:750}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nm-detail-kicker,.nmai-eyebrow){display:block;font-size:10px!important;letter-spacing:.15em;font-weight:800;color:var(--mf-accent);line-height:1.5;margin:0 0 5px}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nm-detail-body,.nmai-body,.nmce-body){min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px 28px;scrollbar-width:thin;scrollbar-color:var(--mf-line) transparent}
:root[data-nm-theme] body.nm-theme .nm-finish button{box-sizing:border-box;cursor:pointer;border:1px solid var(--mf-line);border-radius:11px;padding:10px 15px;min-height:44px;background:var(--mf-panel);color:var(--mf-ink);font:650 14px/1.35 Inter,system-ui,sans-serif;transition:background .15s,border-color .15s;box-shadow:none;white-space:normal}
:root[data-nm-theme] body.nm-theme .nm-finish button:hover{background:var(--mf-hover);border-color:var(--mf-accent)}
:root[data-nm-theme] body.nm-theme .nm-finish button:disabled{opacity:.46;cursor:not-allowed}
:root[data-nm-theme] body.nm-theme .nm-finish button.primary,:root[data-nm-theme] body.nm-theme .nm-finish .btn.primary{background:var(--mf-accent)!important;color:var(--mf-accent-ink)!important;border-color:var(--mf-accent)!important;font-weight:750}
:root[data-nm-theme] body.nm-theme .nm-finish button.danger{color:var(--mf-danger);border-color:var(--mf-danger)}
:root[data-nm-theme] body.nm-theme .nm-finish button svg{width:22px;height:22px;flex:none;vertical-align:middle}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-close-control,:root[data-nm-theme] body.nm-theme .nm-finish [data-close]{padding:10px;width:44px;min-width:44px;height:44px;display:inline-flex;justify-content:center;align-items:center;background:var(--mf-panel)!important;color:var(--mf-muted)!important;border:1px solid var(--mf-line)!important;border-radius:12px;font-size:20px}
:root[data-nm-theme] body.nm-theme .nm-finish :is(button,summary,a,input,textarea,select):focus-visible{outline:3px solid var(--mf-accent)!important;outline-offset:3px}
:root[data-nm-theme] body.nm-theme .nm-finish :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select){box-sizing:border-box;width:100%;min-width:0;min-height:46px;padding:11px 13px;border:1px solid var(--mf-line)!important;border-radius:11px;background:var(--mf-soft)!important;color:var(--mf-ink)!important;font:400 16px/1.5 Inter,system-ui,sans-serif;box-shadow:none}
:root[data-nm-theme] body.nm-theme .nm-finish :is(input,textarea)::placeholder{color:var(--mf-muted);opacity:1}
:root[data-nm-theme] body.nm-theme .nm-finish textarea{resize:vertical;max-height:40dvh}
:root[data-nm-theme] body.nm-theme .nm-finish :is([type=checkbox],[type=radio]){accent-color:var(--mf-accent);width:19px;height:19px;min-height:19px;flex:none}
:root[data-nm-theme] body.nm-theme .nm-finish label{font-size:14px!important;font-weight:650;color:var(--mf-ink)!important;line-height:1.5}
:root[data-nm-theme] body.nm-theme .nm-finish small,:root[data-nm-theme] body.nm-theme .nm-finish :is(.nm-dialog-description,.nmmsg-settings-note,.nmai-meta,.nmai-private,.nmce-status){color:var(--mf-muted)!important;opacity:1;font-size:14px!important;line-height:1.6}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-dialog-description{margin:0 0 20px;max-width:65ch}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-dialog-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:20px 0 0;margin-top:20px;border-top:1px solid var(--mf-line)}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-detail-card>.nm-dialog-footer{padding:18px 28px;margin:0;flex:none;background:var(--mf-panel)}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-finish-form label{display:block;margin-bottom:9px}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-detail-footnote{font-size:12px!important;line-height:1.6;color:var(--mf-muted);margin:15px 0 0}
/* Detail pages are organized into intentional groups, not loose controls. */
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-detail-profile{display:flex;align-items:center;gap:16px;padding:0 0 22px;margin:0;border:0;background:transparent}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-detail-profile .nmmsg-avatar{width:58px;height:58px;border-radius:18px}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-settings-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(86px,1fr));gap:10px;margin:0 0 20px;padding:0;background:none}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-settings-actions button{min-height:72px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:7px;background:var(--mf-soft);border:1px solid var(--mf-line);border-radius:14px}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-settings-actions button span{color:var(--mf-muted);font-size:13px!important}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-modal-card details{border:1px solid var(--mf-line);border-radius:14px;margin:12px 0;overflow:hidden;background:var(--mf-panel)}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-modal-card details>summary{display:list-item;list-style-position:inside;cursor:pointer;padding:16px 18px;min-height:54px;font-size:15px!important;font-weight:750;color:var(--mf-ink);background:var(--mf-soft)}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-modal-card details[open]>summary{border-bottom:1px solid var(--mf-line)}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-modal-card details> :not(summary){margin:14px 18px}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-modal-card details .nmmsg-ai-panel{display:grid;gap:14px;padding:0;border:0;background:none}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-modal-card .nmmsg-members{display:grid;gap:10px}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-modal-card .nmmsg-members>div{border:0;border-radius:10px;background:var(--mf-soft);padding:10px;min-height:54px}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-people>button,:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-settings-list>button{border:1px solid var(--mf-line);border-radius:14px;padding:15px 16px;min-height:76px;margin:0 0 10px;background:var(--mf-panel);width:100%;color:var(--mf-ink)}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-settings-list>button:hover,:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-people>button:hover{background:var(--mf-hover)}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-appearance-launch{display:flex;align-items:center;text-align:left;gap:14px;width:100%;min-height:84px;padding:16px;margin:0 0 18px;background:linear-gradient(115deg,var(--mf-tint),var(--mf-panel));border:1px solid var(--mf-line);border-radius:16px}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-appearance-launch>span:nth-child(2){flex:1;min-width:0}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-appearance-launch b{display:block;font-size:16px}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-appearance-launch small{display:block;font-size:12px!important;font-weight:400;margin-top:4px}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-appearance-icon{display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:14px;background:var(--mf-accent);color:var(--mf-accent-ink)}
/* Search retains original search behavior and unread-message protections. */
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-modal-card.search{width:min(820px,100%)}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-finish-search-head{flex:none;padding:25px 28px 12px;background:linear-gradient(130deg,var(--mf-panel),var(--mf-soft))}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-finish-search-head h2{font-size:28px;margin:3px 0 6px}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-finish-search-head p{margin:0;color:var(--mf-muted);font-size:14px}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-searchbox{padding:14px 28px 20px;display:flex;align-items:center;gap:12px;background:var(--mf-soft);border-bottom:1px solid var(--mf-line);margin:0}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-searchbox>span{display:none}
:root[data-nm-theme] body.nm-theme .nm-finish #nmmsgSearchInput{flex:1;background:var(--mf-panel)!important;padding-left:16px}
:root[data-nm-theme] body.nm-theme .nm-finish #nmmsgSearchContent{min-height:160px;overflow:auto;overscroll-behavior:contain;padding:20px 28px}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-search-section{margin:0 0 22px;border:0;padding:0}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-search-section h4{font-size:11px;letter-spacing:.11em;text-transform:uppercase;color:var(--mf-muted);margin:0 0 12px}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-search-section button{width:100%;text-align:left;min-height:74px;border:1px solid var(--mf-line);border-radius:13px;padding:15px 16px;margin-bottom:9px;background:var(--mf-panel)}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-search-section strong{font-size:16px!important}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-search-section time{font-size:12px;color:var(--mf-muted)}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-search-section small{font-size:13px!important;line-height:1.55}
/* Private evidence reads like a work library rather than an unformatted debug pane. */
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nmai-task,.nmai-answer-card,.nmce-card,.nmce-tasks article,.nmmsg-task){border:1px solid var(--mf-line)!important;background:var(--mf-panel)!important;color:var(--mf-ink)!important;border-radius:16px;padding:20px;margin:0 0 15px;box-shadow:0 3px 12px #091b2d04}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nmai-task,.nmai-answer-card,.nmce-card,.nmce-tasks article) h3{font-size:19px!important;line-height:1.4;margin:12px 0 9px}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nmai-task,.nmai-answer-card,.nmce-card) p{font-size:15px;line-height:1.7}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nmai-pill,.nmce-status){display:inline-flex;align-items:center;padding:5px 10px;border-radius:100px;border:1px solid var(--mf-line);font-size:12px!important;font-weight:700;background:var(--mf-soft);color:var(--mf-muted)}
:root[data-nm-theme] body.nm-theme .nm-finish .nmai-pill.urgent{color:var(--mf-danger);border-color:var(--mf-danger)}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nmai-private,.nmce-private,.nmai-coverage){padding:13px 16px;border-radius:12px;background:var(--mf-soft);border:1px solid var(--mf-line);font-size:13px;line-height:1.6}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nmce-context,.nmai-task-form){padding:18px;border:1px solid var(--mf-line);border-radius:14px;background:var(--mf-soft)}
:root[data-nm-theme] body.nm-theme .nm-finish :is(blockquote,.nmai-source-text){padding:13px 16px;margin:14px 0;background:var(--mf-soft);border:0;border-left:3px solid var(--mf-accent);border-radius:0 10px 10px 0;color:var(--mf-ink);font:400 14px/1.7 Inter,system-ui,sans-serif}
:root[data-nm-theme] body.nm-theme .nm-finish .nmai-evidence{gap:10px}
:root[data-nm-theme] body.nm-theme .nm-finish .nmai-evidence button{padding:14px 16px;border-radius:12px;background:var(--mf-soft)}
:root[data-nm-theme] body.nm-theme .nm-finish .nmce-transcript{gap:8px}
:root[data-nm-theme] body.nm-theme .nm-finish .nmce-transcript button{display:flex;align-items:flex-start;gap:14px;text-align:left;min-height:52px;padding:14px 16px;border:1px solid var(--mf-line);background:var(--mf-soft);border-radius:12px;font-size:15px;font-weight:400;line-height:1.6}
:root[data-nm-theme] body.nm-theme .nm-finish .nmce-transcript time{color:var(--mf-accent);font-weight:750;padding-top:2px}
:root[data-nm-theme] body.nm-theme .nm-finish audio{display:block;width:100%;margin:15px 0;border-radius:12px;color-scheme:light}
:root[data-nm-theme="dark"] .nm-finish audio{color-scheme:dark}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-detail-empty{box-sizing:border-box;text-align:center;padding:28px 22px!important;margin:12px 0!important;border:1px dashed var(--mf-line);border-radius:16px;background:var(--mf-soft);color:var(--mf-muted)!important;font:400 15px/1.75 Inter,system-ui,sans-serif;white-space:normal}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-detail-empty:before{content:'◇';display:block;font-size:28px;line-height:1;margin:0 0 12px;color:var(--mf-accent)}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-dialog-footer button{min-width:120px}
/* Full emoji catalogue, small DOM pages and search. */
body .nm-emoji-overlay .nm-detail-card{width:min(680px,100%)}
body .nm-emoji-overlay .nm-detail-body{display:flex;flex-direction:column;gap:15px}
.nm-emoji-search{display:flex;position:relative;align-items:center;flex:none}
.nm-emoji-search>span{position:absolute;left:14px;color:var(--mf-muted);display:flex}
.nm-emoji-search svg{width:20px;height:20px}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-emoji-search input{padding-left:44px}
.nm-emoji-categories,.nm-background-categories{display:flex;gap:7px;flex-wrap:wrap}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nm-emoji-categories,.nm-background-categories) button{min-height:38px;padding:8px 12px;font-size:12px;border-radius:20px;color:var(--mf-muted);font-weight:650}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nm-emoji-categories,.nm-background-categories) button.active{background:var(--mf-accent);color:var(--mf-accent-ink);border-color:var(--mf-accent)}
.nm-emoji-options{display:flex;justify-content:space-between;align-items:flex-end;gap:14px}
.nm-emoji-options label{display:flex;align-items:center;gap:10px;white-space:nowrap}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-emoji-options select{min-height:40px;padding:7px 10px;font-size:13px!important}
#nmEmojiCount{font-size:12px;color:var(--mf-muted);white-space:nowrap;padding-bottom:9px}
.nm-emoji-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;max-height:340px;min-height:180px;overflow:auto;align-content:start;overscroll-behavior:contain;padding:4px}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-emoji-grid button{display:flex;align-items:center;justify-content:center;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;font-size:27px;font-weight:400;min-height:48px;height:48px;min-width:0;padding:4px;border:1px solid transparent;border-radius:11px;background:transparent}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-emoji-grid button:hover{background:var(--mf-hover);border-color:var(--mf-line)}
.nm-emoji-grid .nm-detail-empty{grid-column:1/-1}
.nm-emoji-paging{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;color:var(--mf-muted)}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-emoji-paging button{min-height:40px}
body .nm-emoji-overlay .nm-detail-footnote{margin:0}
/* Scene chooser with an always-visible save footer. */
body .nm-background-overlay .nm-detail-card{width:min(950px,100%)}
body .nm-background-overlay .nm-detail-body{display:grid;grid-template-columns:240px minmax(0,1fr);gap:18px 24px;grid-template-areas:"intro intro" "preview cats" "preview gallery" "options gallery" "upload upload" "note note" "status status"}
.nm-background-overlay .nm-dialog-description{grid-area:intro;margin:0!important}
.nm-appearance-preview{grid-area:preview;box-sizing:border-box;position:relative;display:flex;flex-direction:column;gap:14px;justify-content:center;min-height:220px;padding:38px 18px 24px;background:var(--mf-soft);background-size:cover;background-position:center;border:1px solid var(--mf-line);border-radius:16px;overflow:hidden}
.nm-preview-label{position:absolute;top:12px;left:13px;font-size:9px;letter-spacing:.16em;font-weight:800;background:#ffffffeb;color:#314e63;padding:3px 7px;border-radius:5px}
.nm-preview-bubble{align-self:flex-start;max-width:88%;padding:11px 13px;font-size:12px;font-weight:550;border-radius:14px 14px 14px 4px;background:#fff;color:#172d42;box-shadow:0 3px 10px #0001}
.nm-preview-bubble.mine{align-self:flex-end;border-radius:14px 14px 4px 14px;background:#164d68;color:#fff}
.nm-background-categories{grid-area:cats;align-items:start}
.nm-background-grid{grid-area:gallery;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-height:330px;overflow:auto;overscroll-behavior:contain;padding:3px;align-content:start;scrollbar-width:thin}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-background-choice{position:relative;padding:0;overflow:hidden;text-align:left;border:1px solid var(--mf-line);border-radius:12px;min-width:0;background:var(--mf-panel)}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-background-choice.active,:root[data-nm-theme] body.nm-theme .nm-finish .nm-background-choice[aria-pressed=true]{border:2px solid var(--mf-accent);box-shadow:0 0 0 2px var(--mf-tint)}
.nm-background-choice.active:after{content:'✓';position:absolute;right:7px;top:7px;display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;font-size:12px;background:var(--mf-accent);color:var(--mf-accent-ink)}
.nm-background-choice img{display:block;width:100%;height:auto;aspect-ratio:1.6;object-fit:cover}
.nm-background-choice>span{display:block;font-size:12px;font-weight:750;line-height:1.35;margin:9px 10px 2px}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-background-choice small{display:block;font-size:10px!important;font-weight:400;margin:0 10px 10px}
.nm-upload-row{grid-area:upload;display:flex;align-items:center;gap:16px;padding-top:16px;border-top:1px solid var(--mf-line)}
.nm-upload-row>span{font-size:12px;color:var(--mf-muted)}
.nm-upload-row button{display:flex;align-items:center;gap:10px}
.nm-appearance-options{grid-area:options;padding:15px;background:var(--mf-soft);border:1px solid var(--mf-line);border-radius:13px;align-self:start}
.nm-appearance-options>label:first-child{display:flex;justify-content:space-between;gap:10px;font-size:12px!important}
.nm-appearance-options output{color:var(--mf-muted);font-weight:400}
.nm-appearance-options input[type=range]{width:100%;margin:16px 0;accent-color:var(--mf-accent)}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-motion-control{display:flex;align-items:center;gap:8px;font-size:12px!important;min-height:32px}
.nm-motion-control:has(input:disabled){opacity:.5}
.nm-background-overlay .nm-detail-footnote{grid-area:note;margin:0!important}
#nmAppearanceStatus{grid-area:status;min-height:0;margin:0;font-size:13px;color:var(--mf-accent)}
#nmAppearanceStatus:empty{display:none}
/* Wallpaper affects the history surface only. Bubbles stay opaque and readable. */
#nmmsgMessages.nm-has-wallpaper{background-image:linear-gradient(rgba(0,0,0,var(--nm-wallpaper-dim,.2)),rgba(0,0,0,var(--nm-wallpaper-dim,.2))),var(--nm-wallpaper)!important;background-size:cover!important;background-repeat:no-repeat!important;background-position:50% 50%}
#nmmsgMessages.nm-has-wallpaper .nmmsg-bubble{opacity:1}
#nmmsgMessages.nm-has-wallpaper :is(.nmmsg-meta,.nmmsg-seen,.sender){background:#fffffff0;color:#263e52!important;padding:3px 7px;border-radius:7px}
:root[data-nm-theme=dark] #nmmsgMessages.nm-has-wallpaper :is(.nmmsg-meta,.nmmsg-seen,.sender){background:#142331f0;color:#e9f4fc!important}
#nmmsgMessages.nm-has-wallpaper .nmmsg-message-menu>summary{background:#ffffffec;color:#1b3449}
#nmmsgMessages.nm-wallpaper-motion{background-size:115% 115%!important;animation:nmWallpaperDrift 32s ease-in-out infinite alternate}
@keyframes nmWallpaperDrift{from{background-position:46% 46%}to{background-position:54% 54%}}
.nm-appearance-paused #nmmsgMessages.nm-wallpaper-motion{animation-play-state:paused}
@media(max-width:700px){
 :root[data-nm-theme] body.nm-theme .nm-finish{padding:10px}
 :root[data-nm-theme] body.nm-theme .nm-finish :is(.nmmsg-modal-card,.nmai-dialog,.nmce-dialog,.nm-detail-card){max-height:calc(100dvh - 20px);border-radius:18px;width:100%}
 :root[data-nm-theme] body.nm-theme .nm-finish :is(.nmmsg-modal-head,.nm-detail-head,.nmai-dialog>header,.nmce-dialog>header){padding:18px;gap:12px}
 :root[data-nm-theme] body.nm-theme .nm-finish :is(.nmmsg-modal-head,.nm-detail-head,.nmai-dialog>header,.nmce-dialog>header) :is(h2,h3){font-size:21px!important}
 :root[data-nm-theme] body.nm-theme .nm-finish :is(.nm-detail-body,.nmai-body,.nmce-body){padding:18px}
 :root[data-nm-theme] body.nm-theme .nm-finish .nm-detail-card>.nm-dialog-footer{padding:14px 18px;gap:9px}
 :root[data-nm-theme] body.nm-theme .nm-finish .nm-dialog-footer button{min-width:0;flex:1;font-size:13px}
 :root[data-nm-theme] body.nm-theme .nm-finish .nm-finish-search-head{padding:20px 18px 12px}
 :root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-searchbox{padding:12px 18px 16px}
 :root[data-nm-theme] body.nm-theme .nm-finish #nmmsgSearchContent{padding:18px}
 :root[data-nm-theme] body.nm-theme .nm-finish :is(.nmai-task,.nmai-answer-card,.nmce-card,.nmce-tasks article){padding:16px}
 .nm-emoji-grid{grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;max-height:290px;padding:0}
 :root[data-nm-theme] body.nm-theme .nm-finish .nm-emoji-grid button{font-size:25px;height:44px;min-height:44px;padding:2px}
 .nm-emoji-options{gap:8px;flex-wrap:wrap;align-items:center}.nm-emoji-options label{font-size:12px!important}
 #nmEmojiCount{padding:0}.nm-emoji-categories{flex-wrap:nowrap;overflow:auto;max-width:100%;padding:2px 0 6px;flex:none}.nm-emoji-categories button{flex:none;white-space:nowrap!important}
 body .nm-background-overlay .nm-detail-body{display:flex;flex-direction:column;gap:15px}
 .nm-appearance-preview{min-height:150px;height:150px;flex:none;padding:29px 16px 15px}
 .nm-preview-bubble{padding:8px 11px;max-width:70%}
 .nm-background-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:285px;min-height:160px;flex:none}
 .nm-appearance-options{width:100%;box-sizing:border-box}
 .nm-appearance-options input[type=range]{margin:10px 0}
 .nm-upload-row{flex-wrap:wrap;gap:8px;padding-top:14px}.nm-upload-row>span{display:block;font-size:11px}
 .nm-background-categories{flex-wrap:nowrap;overflow:auto;padding:2px 0 4px;flex:none}.nm-background-categories button{flex:none}
}
@media(max-width:350px){.nm-emoji-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.nm-finish *{transition:none!important;animation:none!important}#nmmsgMessages.nm-wallpaper-motion{animation:none!important;background-size:cover!important}}

:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-detail-profile{justify-content:flex-start!important;min-height:0!important}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-detail-profile .nmmsg-avatar{margin:0!important;flex:none}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-detail-profile>span{flex:none!important;text-align:left!important;padding:6px 11px;border-radius:20px;background:var(--mf-soft);font-size:12px!important}
:root[data-nm-theme] body.nm-theme .nm-finish .nmmsg-settings-actions svg{width:24px;height:24px;color:var(--mf-accent)}

/* Match the expanded in-conversation office drawers to the new private libraries. */
.nmmsg-office-tools{--mf-panel:#fff;--mf-soft:#f4f7fb;--mf-ink:#172d42;--mf-muted:#52667a;--mf-line:#d6e1eb;--mf-accent:#11627e}
:root[data-nm-theme=dark] .nmmsg-office-tools{--mf-panel:#142331;--mf-soft:#0f1c28;--mf-ink:#eef5fa;--mf-muted:#a5b9c9;--mf-line:#354b5d;--mf-accent:#8cdbea}
:root[data-nm-theme] body.nm-theme .nmmsg-office-tools :is(.nmce-card,.nmai-answer-card){background:var(--mf-panel)!important;color:var(--mf-ink)!important;border:1px solid var(--mf-line)!important;border-radius:14px;padding:18px;margin:10px 0}
:root[data-nm-theme] body.nm-theme .nmmsg-office-tools :is(.nmce-card,.nmai-answer-card) h3{font-size:17px!important;line-height:1.45;margin:10px 0;color:var(--mf-ink)!important}
:root[data-nm-theme] body.nm-theme .nmmsg-office-tools :is(.nmce-card,.nmai-answer-card) p{font-size:14px;line-height:1.65;color:var(--mf-ink)}
:root[data-nm-theme] body.nm-theme .nmmsg-office-tools .nmmsg-panel-heading{padding:14px 0;margin-bottom:10px;border-bottom:1px solid var(--mf-line);color:var(--mf-ink)}
:root[data-nm-theme] body.nm-theme .nmmsg-office-tools .nmmsg-panel-heading button{min-height:40px;min-width:44px;border:1px solid var(--mf-line);border-radius:9px;padding:8px 12px;background:var(--mf-panel);color:var(--mf-ink)}
:root[data-nm-theme] body.nm-theme .nmmsg-office-tools :is(.nmai-meta,.nmce-meta,.nmai-pill,.nmce-status){color:var(--mf-muted)!important;font-size:12px!important}
:root[data-nm-theme] body.nm-theme .nmmsg-office-tools :is(.nmai-pill,.nmce-status){background:var(--mf-soft);border:1px solid var(--mf-line);border-radius:20px;padding:5px 9px;display:inline-flex}
:root[data-nm-theme] body.nm-theme .nmmsg-office-tools :is(#nmceChatCards>.nmce-card-list,#nmAiThreadNotes>div)>p{margin:10px 0;padding:22px 18px;border:1px dashed var(--mf-line);border-radius:14px;color:var(--mf-muted);background:var(--mf-soft);font-size:14px;line-height:1.65}
:root[data-nm-theme] body.nm-theme .nmmsg-office-tools :is(.nmce-card,.nmai-answer-card) button{min-height:44px;padding:10px 14px;border:1px solid var(--mf-line);border-radius:10px;background:var(--mf-soft);color:var(--mf-ink);font-size:13px!important}
/* Do not let grid track compression clip scene names in the desktop chooser. */
.nm-background-grid{grid-auto-rows:max-content}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-background-choice{display:block!important;height:auto!important;min-height:142px!important}
:root[data-nm-theme] body.nm-theme .nm-finish .nm-background-choice img{height:auto!important}
:root[data-nm-theme] body.nm-theme .nm-finish.nm-background-overlay .nm-detail-card{width:min(950px,100%)}
:root[data-nm-theme] body.nm-theme .nm-finish.nm-emoji-overlay .nm-detail-card{width:min(680px,100%)}
:root[data-nm-theme] body.nm-theme .nm-finish :is(.nm-emoji-categories,.nm-background-categories,.nm-emoji-paging) button{min-height:44px}

    
/* 24.10.59 — adaptive photo backgrounds: full photo + filled backdrop, never a blank slab */
#nmmsgMessages.nm-has-wallpaper.nm-wallpaper-photo-fit{
  background-image:
    linear-gradient(rgba(0,0,0,var(--nm-wallpaper-dim,.2)),rgba(0,0,0,var(--nm-wallpaper-dim,.2))),
    var(--nm-wallpaper),
    radial-gradient(ellipse at center,rgba(8,22,34,.08) 18%,rgba(8,22,34,.54) 100%),
    var(--nm-wallpaper)!important;
  background-size:cover,contain,cover,cover!important;
  background-position:center center,center center,center center,center center!important;
  background-repeat:no-repeat,no-repeat,no-repeat,no-repeat!important;
  background-color:#182733!important;
}
:root[data-nm-theme=dark] #nmmsgMessages.nm-has-wallpaper.nm-wallpaper-photo-fit,
body.nm-night #nmmsgMessages.nm-has-wallpaper.nm-wallpaper-photo-fit{
  background-color:#0c151d!important;
}
#nmmsgMessages.nm-wallpaper-photo-fit.nm-wallpaper-motion{
  animation:none!important;
  background-size:cover,contain,cover,cover!important;
}
