/* Inbox and chat share a shell on desktop; phones open a single focused thread. */
.dm-shell{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,1.2fr);min-height:480px;max-height:700px;border:1px solid var(--line);border-radius:21px;background:#fffdf8;overflow:hidden;margin:16px 0}
.dm-sidebar{min-width:0;border-right:1px solid var(--line);display:flex;flex-direction:column;overflow:hidden}.dm-sidebar-top{padding:12px;border-bottom:1px solid var(--line)}.dm-sidebar-top input{font-size:12px;padding:10px}.dm-sidebar #inbox-list{overflow-y:auto;min-height:0}
.dm-inbox-item{display:flex;align-items:center;gap:10px;width:100%;padding:15px 12px;text-align:left;border-bottom:1px solid #eee6da;min-width:0;min-height:76px}.dm-inbox-item:hover,.dm-inbox-item[aria-current=true]{background:linear-gradient(120deg,#fff0d5,#eee6f8)}.dm-inbox-item .avatar{width:42px;height:42px}.dm-inbox-copy{flex:1;min-width:0}.dm-inbox-heading{display:flex;gap:8px;align-items:baseline;justify-content:space-between}.dm-inbox-heading strong{font-size:13px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.dm-inbox-heading small{font-size:9px;color:var(--muted);flex-shrink:0}.dm-preview{display:block;font-size:11px;color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dm-list-empty{padding:20px 15px}
.dm-thread{display:flex;flex-direction:column;min-width:0;min-height:0;background:linear-gradient(160deg,#fffaf2,#f9f4fc)}.dm-thread-empty{padding:40px 18px;margin:auto;text-align:center}.dm-thread-empty h2{font-size:24px}.dm-thread-header{display:flex;align-items:center;gap:9px;padding:12px;border-bottom:1px solid var(--line);background:#fffaf4;flex-shrink:0}.dm-thread-header>div{min-width:0;flex:1}.dm-thread-header strong{display:block;overflow-wrap:anywhere;font-size:14px;line-height:1.4}.dm-thread-header small{display:block;font-size:10px;color:var(--muted);margin-top:3px}.dm-back{min-width:44px;min-height:44px;font-size:22px;border-radius:50%;background:#f1e7d9}.dm-thread-avatar{width:34px;height:34px}
.dm-thread #messages{display:flex;flex-direction:column;flex:1;min-height:0;max-height:none;overflow-y:auto;padding:16px 12px;margin:0;overscroll-behavior:contain}.dm-prompt{padding:12px;background:#eee7f6;border-radius:15px;margin-bottom:16px}.dm-prompt small{font-size:10px;color:var(--muted)}.dm-prompt p{font-size:12px;line-height:1.6;margin:6px 0 0}.dm-day{text-align:center;font-size:10px;color:var(--muted);margin:10px 0}.dm-message-row{display:flex;justify-content:flex-end;margin:5px 0}.dm-message{max-width:91%;padding:10px 13px;border-radius:17px 17px 5px 17px;background:linear-gradient(125deg,#fbe3ac,#f3d7c1);overflow-wrap:anywhere}.dm-message p{white-space:pre-wrap;font-size:13px;line-height:1.6;margin:0}.dm-message small{display:block;text-align:right;font-size:9px;color:#775c4c;margin-top:5px}
.dm-composer{padding:10px 12px;border-top:1px solid var(--line);background:#fffaf4;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 8px;align-items:end;margin:0;flex-shrink:0}.dm-composer>label{grid-column:1/-1;font-size:10px;color:var(--muted);margin:0}.dm-composer textarea{width:100%;min-width:0;min-height:44px!important;max-height:130px;height:44px;resize:vertical;border-radius:21px;padding:10px 14px;border:1px solid #dfd0c0;background:#fffdf8;font-size:16px;line-height:1.5;margin:0;box-sizing:border-box}.dm-composer>.btn{min-height:44px;border-radius:22px;padding:9px 13px;font-size:12px;margin:0}.dm-save-status{padding:0 12px 10px;margin:0;font-size:10px;line-height:1.5;background:#fffaf4}.dm-save-status:empty{display:none}
.dm-group-search{margin:0 0 14px;font-size:14px}.dm-group-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px}.dm-group-row{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:18px;padding:14px;background:linear-gradient(120deg,#fff6e5,#f2edf8);min-width:0}.dm-group-row>.avatar{width:46px;height:46px;background:linear-gradient(130deg,#ffe2a4,#e6d7f5)}.dm-group-copy{flex:1;min-width:0}.dm-group-copy h2{font:600 14px/1.45 system-ui;margin:0 0 4px;overflow-wrap:anywhere}.dm-group-copy p{font-size:12px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0 0 4px}.dm-group-copy small{font-size:10px;color:var(--muted)}.dm-group-row>.btn{flex-shrink:0;font-size:12px;padding:8px 12px}
.dm-shell [hidden]{display:none!important}
@media(max-width:760px){.dm-shell{display:block;min-height:0;max-height:none;margin-top:12px}.dm-sidebar{border:0}.dm-sidebar #inbox-list{max-height:none;overflow:visible}.dm-shell .dm-thread{display:none}.dm-inbox-item{padding:14px}.dm-inbox-item .avatar{width:48px;height:48px}.dm-inbox-heading strong{font-size:14px}.dm-preview{font-size:12px}.dm-thread-active .dm-sidebar{display:none}.dm-thread-active .dm-thread{display:flex;height:calc(100dvh - 250px);min-height:300px;max-height:740px}.dm-thread-active>.section-head,.dm-thread-active>.phone-section-switch,.dm-thread-active>.notice,.dm-thread-active>.optional-help{display:none!important}.dm-thread-active .dm-shell{margin-top:0}.dm-thread #messages{padding:14px}.dm-thread-header{padding:10px}.dm-message{max-width:86%}.dm-group-row{padding:12px;gap:10px}.dm-composer{padding-bottom:max(12px,env(safe-area-inset-bottom))}}
@media(max-width:380px){.dm-thread-avatar{display:none}.dm-group-row>.avatar{width:34px;height:34px}.dm-group-row{gap:8px}.dm-group-row>.btn{padding:8px 10px}}
@media(max-height:600px) and (max-width:760px){.dm-thread-active .dm-thread{height:65dvh;min-height:220px}}
.dm-message-row.received{justify-content:flex-start}.dm-message-row.received .dm-message{background:#ece4f6;border-radius:17px 17px 17px 5px}.dm-pending{opacity:.75;border:1px dashed #b89967}.dm-report-link{display:block;font-size:10px;padding:4px 0;min-height:32px}.real-dm-menu{position:relative;margin-left:auto}.real-dm-menu>summary{cursor:pointer;min-width:44px;min-height:44px;display:grid;place-items:center;font-size:21px;list-style:none}.real-dm-menu[open]{z-index:5}.real-dm-menu>button{display:block;min-height:44px;padding:9px 12px;background:#fffaf2;border:1px solid var(--line);text-align:left;white-space:nowrap}.real-dm-menu[open]>button{position:relative;min-width:150px}.real-dm-menu[open]{position:absolute;right:10px;top:10px;background:#fffaf2;border:1px solid var(--line);border-radius:13px;box-shadow:0 4px 15px #654b3920}.dm-thread-header{position:relative}.real-dm-unread-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;background:#795c91;color:white;border-radius:12px;font-size:10px;margin-left:5px;flex-shrink:0}.real-dm-unread-badge[hidden]{display:none}.real-dm-modes{margin:10px 0}.dm-thread-empty-note{font-size:12px;color:var(--muted);text-align:center;margin:auto}.dm-thread #messages{scroll-behavior:auto}.dm-load-older{min-height:44px}.dm-thread-header .real-dm-menu[hidden]{display:none!important}
