/* dm-dmroom.css: the direct-message room. Full screen, the person you are talking to pinned at the top,
   one red accent, flat dark surfaces, no glow. */
.dmsoc-ov.dmr-ov{justify-content:flex-start!important;align-items:stretch!important;overflow:hidden}
.dmsoc-ov.dmr-ov .dmsoc-scrim{background:#06080F}
.dmsoc-ov.dmr-ov .dmsoc-sheet{max-width:none;width:100%;height:100%!important;max-height:none!important;min-height:0;border:0;border-radius:0;
  transform:translateX(100%);opacity:1;transition:transform .34s cubic-bezier(.32,.72,0,1)}
.dmsoc-ov.dmr-ov.on .dmsoc-sheet{transform:translateX(0)}
@media (min-width:900px){.dmsoc-ov.dmr-ov{align-items:center!important}.dmsoc-ov.dmr-ov .dmsoc-sheet{max-width:560px;margin:0 auto;height:min(88vh,820px)!important;border-radius:20px;border:1px solid rgba(255,255,255,.08);transform:translateY(24px);opacity:0}.dmsoc-ov.dmr-ov.on .dmsoc-sheet{transform:none;opacity:1}}
.dmsoc-sheet.dmr{--dmr-line:rgba(255,255,255,.08);--dmr-ink:#F3F6FE;--dmr-mute:#8E9BB8;--dmr-acc:#FF2740;background:#0B0F17}

/* header: always visible, the whole row is the person */
.dmr .dmsoc-head{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 4px;padding:calc(env(safe-area-inset-top,0px) + 6px) 12px 0 4px;position:relative;flex:none;z-index:4;background:#0B0F17;border-bottom:0}
.dmr .dmsoc-head .dmsoc-back{width:40px;height:44px;display:grid;place-items:center;color:var(--dmr-ink)}
.dmr .dmsoc-ttl{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;padding:2px 0!important;overflow:visible!important;font:inherit}
.dmr-id{display:flex;align-items:center;gap:11px;min-width:0;flex:1}
.dmr-av{flex:none;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#1B2336 center/cover no-repeat;color:#F3F6FE;font:800 17px/1 Outfit,system-ui,sans-serif;box-shadow:0 0 0 1.5px rgba(255,255,255,.16)}
.dmr-who{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;border:0;background:none;padding:0;color:var(--dmr-ink);text-align:left;cursor:pointer}
.dmr-who b{font:800 16.5px/1.1 Outfit,system-ui,sans-serif;letter-spacing:-.012em;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dmr-who small{font:600 12px/1.2 Outfit,system-ui,sans-serif;color:var(--dmr-mute);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dmr-tools{display:flex;gap:2px;flex:none}
.dmr-ic{width:40px;height:40px;border-radius:50%;border:0;display:grid;place-items:center;color:#C5CFE6;background:transparent;cursor:pointer;transition:transform .14s cubic-bezier(.23,1,.32,1),background .2s}
.dmr-ic:active{transform:scale(.9);background:rgba(255,255,255,.08)}
.dmr-safe{grid-column:1/-1;display:flex;justify-content:center;padding:6px 0 8px;border-bottom:1px solid var(--dmr-line);margin:0 -12px 0 -4px}
.dmr-safe>button{display:inline-flex;align-items:center;gap:6px;padding:0;border:0;background:none;color:#69758F;font:600 11.5px/1 Outfit,system-ui,sans-serif;cursor:pointer}
.dmr-rules{position:absolute;left:12px;right:12px;top:calc(env(safe-area-inset-top,0px) + 100px);z-index:9;padding:16px 16px 12px;border-radius:18px;background:#141A28;box-shadow:0 0 0 1px rgba(255,255,255,.1),0 24px 48px -16px rgba(0,0,0,.7);display:grid;gap:9px;animation:dmrPop .18s cubic-bezier(.23,1,.32,1)}
.dmr-rules[hidden]{display:none}
.dmr-rules h4{margin:0 0 2px;font:800 15px/1.2 Outfit,system-ui,sans-serif;color:var(--dmr-ink)}
.dmr-rules p{margin:0;font:500 13px/1.45 Outfit,system-ui,sans-serif;color:var(--dmr-mute)}
.dmr-rules b{color:var(--dmr-ink);font-weight:700}
.dmr-rules .dmr-fine{font-size:12px;opacity:.85}
.dmr-ok{margin-top:4px;height:42px;border:0;border-radius:12px;background:#F3F6FE;color:#0B1220;font:800 14px/1 Outfit,system-ui,sans-serif;cursor:pointer}
.dmr-menu{position:absolute;right:12px;top:calc(env(safe-area-inset-top,0px) + 54px);z-index:9;min-width:200px;padding:6px;border-radius:16px;background:#141A28;box-shadow:0 0 0 1px rgba(255,255,255,.1),0 18px 40px -12px rgba(0,0,0,.65);animation:dmrPop .16s cubic-bezier(.23,1,.32,1)}
.dmr-menu button{display:flex;align-items:center;gap:11px;width:100%;padding:12px;border:0;border-radius:11px;background:none;color:var(--dmr-ink);font:700 14px/1 Outfit,system-ui,sans-serif;text-align:left;cursor:pointer}
.dmr-menu button:active{background:rgba(255,255,255,.08)}
.dmr-menu button.danger{color:#FF6B7A}
@keyframes dmrPop{from{opacity:0;transform:translateY(-6px) scale(.98)}}

/* the thread */
.dmr .dmsoc-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;padding:0;overflow:hidden}
.dmr .dmsoc-msgs{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px 14px 8px;gap:2px}
.dmr .dmsoc-b{max-width:80%;padding:9px 14px;font:500 15.5px/1.38 Outfit,system-ui,sans-serif;letter-spacing:0;box-shadow:none}
.dmr .dmsoc-b:not(.me){background:#1A2132;color:#E8EEFB}
.dmr .dmsoc-b.me{background:var(--dmr-acc);color:#fff}
.dmr .dmsoc-bt{font:600 10.5px/1 Outfit,system-ui,sans-serif;opacity:.55}
.dmr .dmsoc-empty{font:600 13.5px/1.5 Outfit,system-ui,sans-serif;color:var(--dmr-mute);padding:44px 28px;text-align:center}

/* composer: one pill, stuck to the bottom of the room */
.dmr .dmx-bar{flex:none;padding:0 14px 4px}
.dmr .dmx-bar:not(:has(.dmx-reply:not([hidden]))){display:none}
.dmr form.dmr-pill{flex:none;display:flex;align-items:center;gap:2px;margin:6px 12px calc(env(safe-area-inset-bottom,0px) + 10px);padding:4px;border-radius:28px;border:0;background:#151B2A;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.dmr form.dmr-pill:focus-within{box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}
.dmr form.dmr-pill input#dmsocInput{flex:1;min-width:0;min-height:40px;padding:0 8px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--dmr-ink);font:500 16px/1 Outfit,system-ui,sans-serif}
.dmr form.dmr-pill input#dmsocInput:focus{background:transparent;border:0;outline:none}
.dmr form.dmr-pill .dmx-ico,.dmr form.dmr-pill .dmx-gif,.dmr form.dmr-pill .dmv-mic{flex:none;width:38px;height:38px;min-height:38px;padding:0;border:0!important;border-radius:50%;display:grid;place-items:center;background:transparent!important;color:#A9B6D2!important;cursor:pointer;transition:transform .14s cubic-bezier(.23,1,.32,1),background .2s}
.dmr form.dmr-pill .dmx-gif{font:800 11px/1 Outfit,system-ui,sans-serif;letter-spacing:.04em}
.dmr form.dmr-pill .dmx-ico:active,.dmr form.dmr-pill .dmx-gif:active,.dmr form.dmr-pill .dmv-mic:active{transform:scale(.9);background:rgba(255,255,255,.1)!important}
.dmr form.dmr-pill .dmv-mic.on{background:var(--dmr-acc)!important;color:#fff!important}
.dmr form.dmr-pill .dmsoc-sendbtn{flex:none;width:40px;height:40px;min-height:40px;border-radius:50%;border:0;background:var(--dmr-acc);color:#fff;display:grid;place-items:center;transition:transform .14s cubic-bezier(.23,1,.32,1),background .2s}
.dmr form.dmr-pill .dmsoc-sendbtn:active{transform:scale(.92)}
.dmr form.dmr-pill .dmsoc-sendbtn svg{width:18px;height:18px}
.dmr form.dmr-pill:has(input#dmsocInput:placeholder-shown) .dmsoc-sendbtn{background:#222A3D;color:#7D89A6}
.dmr .dmx-panel{flex:none;margin:0 12px 6px;padding:10px;border-radius:18px;background:#121828;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.dmr .dmsoc-profbtn,.dmr .dmsoc-replink,.dmr .dmsoc-ttl-note{display:none!important}
@media (prefers-reduced-motion:reduce){.dmr-menu,.dmr-rules{animation:none}.dmsoc-ov.dmr-ov .dmsoc-sheet{transition:none}}

/* pop: their header image fills the top of the room, the person sits on it */
.dmr .dmsoc-head{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto auto auto;gap:0;padding:calc(env(safe-area-inset-top,0px) + 4px) 10px 0 4px;min-height:148px;overflow:hidden;isolation:isolate;background:linear-gradient(135deg,#1B2540,#0B0F17 70%)}
.dmr .dmsoc-head::before{content:"";position:absolute;inset:0;z-index:-2;background:var(--dmr-cover,none) center/cover no-repeat;transform:scale(1.04)}
.dmr .dmsoc-head.cover-blur::before{filter:blur(22px) saturate(1.5);transform:scale(1.3)}
.dmr .dmsoc-head::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(11,15,23,.35) 0%,rgba(11,15,23,.15) 35%,rgba(11,15,23,.88) 82%,#0B0F17 100%)}
.dmr .dmsoc-ttl{display:contents}
.dmr .dmsoc-head .dmsoc-back{grid-column:1;grid-row:1;align-self:start;width:40px;height:40px;margin:2px 0 0;border-radius:50%;background:rgba(8,11,18,.42);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.dmr-tools{grid-column:3;grid-row:1;align-self:start;margin-top:2px;gap:8px}
.dmr-ic{background:rgba(8,11,18,.42);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fff}
.dmr-id{grid-column:1/-1;grid-row:2;align-self:end;padding:30px 4px 6px 8px;gap:13px}
.dmr-av{width:58px;height:58px;font-size:22px;box-shadow:0 0 0 3px #0B0F17,0 0 0 4.5px var(--dmr-acc),0 10px 24px -8px rgba(0,0,0,.6)}
.dmr-who b{font-size:21px;letter-spacing:-.02em;text-shadow:0 1px 12px rgba(0,0,0,.5)}
.dmr-who small{font-size:12.5px;color:#C5CFE6;text-shadow:0 1px 8px rgba(0,0,0,.5)}
.dmr-safe{grid-row:3;margin:0 -10px 0 -4px;background:rgba(11,15,23,.0)}
.dmr-rules{top:calc(env(safe-area-inset-top,0px) + 170px)}
.dmr-menu{top:calc(env(safe-area-inset-top,0px) + 54px)}
.dmr .dmsoc-b.me{background:linear-gradient(180deg,#FF3B52,#EE1E39);box-shadow:0 6px 16px -8px rgba(255,39,64,.7)}
.dmr .dmsoc-b:not(.me){background:#1C2438;box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}
.dmr .dmsoc-msgs{padding-top:16px;background:radial-gradient(120% 60% at 50% 0%,rgba(255,39,64,.05),transparent 60%),#0B0F17}

/* simpler header: tap the person to open their page; no extra buttons */
.dmr .dmsoc-head .meet-bell,.dmr .dmr-tools{display:none!important}
.dmr-id{cursor:pointer}
.dmr .dmsoc-head::after{background:linear-gradient(180deg,rgba(11,15,23,.18) 0%,rgba(11,15,23,0) 38%,rgba(11,15,23,.78) 84%,#0B0F17 100%)}
.dmr .dmsoc-head.cover-blur::before{filter:none;transform:none}
.dmr-rep{display:flex;align-items:center;justify-content:center;gap:8px;height:42px;border:0;border-radius:12px;background:rgba(255,107,122,.12);color:#FF6B7A;font:800 14px/1 Outfit,system-ui,sans-serif;cursor:pointer}

/* header image is a real <img>, drawn at full sharpness (no scale, no blur) */
.dmr .dmsoc-head::before{display:none}
.dmr-cv{position:absolute;inset:0;z-index:-2;display:block;background:linear-gradient(135deg,#1B2540,#0B0F17 70%)}
.dmr-cv img{width:100%;height:100%;object-fit:cover;object-position:center 30%;display:block;image-rendering:auto}

/* keyboard up, or a short screen (owner 2026-10-17: the header ate the whole thread while typing):
   the room keeps a one-line header and gives the space to the messages */
.dmr .dmsoc-head{max-height:220px}
.dmr.kb .dmsoc-head{min-height:0;max-height:none;padding-bottom:6px;grid-template-rows:auto}
.dmr.kb .dmsoc-head::before,.dmr.kb .dmsoc-head::after,.dmr.kb .dmr-cv,.dmr.kb .dmr-safe,.dmr.kb .im-pal,.dmr.kb .dmr-rules{display:none!important}
.dmr.kb .dmr-id{grid-column:2;grid-row:1;padding:2px 4px 2px 0;gap:9px;align-self:center}
.dmr.kb .dmr-av{width:32px;height:32px;font-size:14px;box-shadow:0 0 0 2px var(--dmr-acc)}
.dmr.kb .dmr-who b{font-size:16px;text-shadow:none}.dmr.kb .dmr-who small{display:none}
.dmr.kb .dmsoc-head .dmsoc-back{align-self:center;margin:0}
.dmr.kb .dmsoc-msgs{padding-top:8px}

/* no header of their own: their photo blown up and blurred behind the room (2026-10-17) */
.dmr .dmsoc-head.cover-blur .dmr-cv img{filter:blur(18px) saturate(1.4);transform:scale(1.25)}

/* online now (2026-10-17): a green dot on the photo and in the status line */
.dmr-av.on::after{content:"";position:absolute;right:-1px;bottom:-1px;width:15px;height:15px;border-radius:50%;background:#3BEFA9;border:3px solid #0B0F17}
.dmr-av{position:relative}
.dmr-on{display:inline-block;width:8px;height:8px;border-radius:50%;background:#3BEFA9;margin:0 5px 1px 0;vertical-align:middle;box-shadow:0 0 8px rgba(59,239,169,.7)}

/* their wallpaper behind the thread, faint — bubbles stay solid so every word stays readable */
.dmr .dmr-wall{position:absolute;inset:0;z-index:0;pointer-events:none;background:#0B0F17 center/cover no-repeat;opacity:.26;
  -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 120px,#000 78%,rgba(0,0,0,.55) 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 120px,#000 78%,rgba(0,0,0,.55) 100%);animation:dmrWall .8s ease both}
.dmr.has-wall .dmsoc-body{position:relative;z-index:1}
.dmr.has-wall form.dmr-pill{position:relative;z-index:1;background:rgba(21,27,42,.88);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.dmr.has-wall .dmsoc-b:not(.me){background:rgba(26,33,50,.94)}
@keyframes dmrWall{from{opacity:0}}
@media (prefers-reduced-motion:reduce){.dmr .dmr-wall{animation:none}}
/* friendlier bubbles: softer corners, a little depth, comfortable rhythm */
.dmr .dmsoc-b{border-radius:20px;box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 6px 14px -8px rgba(0,0,0,.6)}
.dmr .dmsoc-b.me{border-bottom-right-radius:7px}
.dmr .dmsoc-b:not(.me){border-bottom-left-radius:7px}
.dmr .dmsoc-msgs{padding:16px 14px 10px;gap:3px;scroll-behavior:smooth}
.dmsoc-sheet.dmr{position:relative;overflow:hidden}
