/* V67 */
/* ============================================================
   msg-notify.css — "New message" notifications
   • Desktop  → macOS-style liquid-glass cards rising from the bottom-right
   • Touch    → iOS-style liquid-glass banner dropping from the top (swipe up to dismiss)
   Pure CSS glass (no SVG filters) so it is cheap and works in every browser.
   ============================================================ */

.pmn-root{
  --pmn-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Inter","Segoe UI",Roboto,"DM Sans",sans-serif;
  position:fixed;z-index:2500;pointer-events:none;
  display:flex;flex-direction:column;
  font-family:var(--pmn-font);
  -webkit-font-smoothing:antialiased;
}
.pmn-item{pointer-events:none;position:relative;}
.pmn-item > .pmn-card,.pmn-item > .pmn-x{pointer-events:auto;}

/* ── shared glass card (iOS 26 Liquid Glass, dark) ─────── */
.pmn-item{isolation:isolate;}
.pmn-card{
  position:relative;display:flex;align-items:center;gap:11px;
  width:100%;box-sizing:border-box;
  color:#fff;text-align:left;cursor:pointer;
  -webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;
  outline:none;border:0;
  background:
    linear-gradient(180deg,rgba(255,255,255,.07) 0%,rgba(255,255,255,0) 45%),
    rgba(24,24,28,.58);
  -webkit-backdrop-filter:blur(40px) saturate(190%);
          backdrop-filter:blur(40px) saturate(190%);
  box-shadow:
    inset 0 0 0 .5px rgba(255,255,255,.20),       /* hairline rim */
    inset 0 1px 1px rgba(255,255,255,.22),        /* soft top specular */
    inset 0 -1px 1px rgba(255,255,255,.07),
    inset 0 0 22px rgba(255,255,255,.035),        /* inner glow */
    0 10px 30px -6px rgba(0,0,0,.50),
    0 24px 60px -18px rgba(0,0,0,.40);
  transition:transform .22s cubic-bezier(.2,.9,.3,1),background-color .2s,box-shadow .2s;
}
/* refractive rim — brighter at the corners like real glass */
.pmn-card::after{
  content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;pointer-events:none;
  background:linear-gradient(145deg,rgba(255,255,255,.34),rgba(255,255,255,.03) 32%,rgba(255,255,255,.02) 68%,rgba(255,255,255,.22));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
}
.pmn-card::before{display:none;}
.pmn-card:focus-visible{box-shadow:inset 0 0 0 .5px rgba(255,255,255,.2),0 0 0 2px rgba(79,142,247,.9),0 14px 38px -6px rgba(0,0,0,.55);}

/* stacked "more messages" layer peeking out underneath */
.pmn-item.has-count::before{
  content:"";position:absolute;z-index:-1;left:12px;right:12px;bottom:-6px;height:60%;
  border-radius:0 0 24px 24px;
  background:rgba(24,24,28,.5);
  -webkit-backdrop-filter:blur(30px) saturate(170%);backdrop-filter:blur(30px) saturate(170%);
  box-shadow:inset 0 0 0 .5px rgba(255,255,255,.16),0 8px 20px -6px rgba(0,0,0,.4);
}

/* avatar + app badge + count */
.pmn-av{
  position:relative;flex:0 0 auto;width:38px;height:38px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#4f8ef7,#7c3aed);
  font-weight:700;font-size:16px;color:#fff;
}
.pmn-av-img{position:absolute;inset:0;border-radius:50%;overflow:hidden;}
.pmn-av-img img{width:100%;height:100%;display:block;object-fit:cover;}
.pmn-app{
  position:absolute;right:-5px;bottom:-4px;width:17px;height:17px;border-radius:5px;
  object-fit:cover;background:#fff;
  box-shadow:0 0 0 1px rgba(255,255,255,.96),0 1px 4px rgba(0,0,0,.4);
}
.pmn-count{
  position:absolute;top:-6px;right:-8px;z-index:2;
  min-width:18px;height:18px;padding:0 5px;box-sizing:border-box;border-radius:9px;
  display:none;align-items:center;justify-content:center;
  font-size:11.5px;font-weight:700;color:#1c1c1e;line-height:1;
  background:#f2f2f7;
  box-shadow:0 0 0 2px rgba(24,24,28,.9),0 1px 4px rgba(0,0,0,.4);
}

.pmn-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px;}
.pmn-row{display:flex;align-items:center;gap:10px;min-width:0;}
.pmn-name{
  flex:1 1 auto;min-width:0;font-size:14px;font-weight:600;letter-spacing:-.015em;line-height:1.25;color:#f5f5f7;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  display:flex;align-items:center;gap:5px;
}
.pmn-name .verified-badge{display:inline-flex;flex:0 0 auto;}
.pmn-name .verified-badge svg{width:12px;height:12px;}
.pmn-time{flex:0 0 auto;font-size:12px;color:rgba(235,235,245,.55);font-weight:400;letter-spacing:-.01em;}
.pmn-text{
  font-size:14px;line-height:1.25;color:#f5f5f7;font-weight:400;letter-spacing:-.012em;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;word-break:break-word;
}
.pmn-item.has-count .pmn-count{display:inline-flex;}
.pmn-item.bump .pmn-card{animation:pmnBump .42s cubic-bezier(.3,1.5,.5,1);}
@keyframes pmnBump{0%{transform:scale(1)}35%{transform:scale(1.035)}100%{transform:scale(1)}}

/* ============================================================
   DESKTOP — macOS style, rising from the bottom-right
   ============================================================ */
.pmn-root.pmn-mac{
  right:18px;bottom:calc(18px + env(safe-area-inset-bottom,0px));
  width:min(321.2px,calc(100vw - 24px));gap:8px;
  justify-content:flex-end;
}
.pmn-mac .pmn-card{padding:10px 14px 10px 10px;border-radius:24px;}
.pmn-mac .pmn-av{width:36px;height:36px;}
.pmn-mac .pmn-name,.pmn-mac .pmn-text{font-size:13px;}
.pmn-mac .pmn-time{font-size:11px;}
.pmn-mac .pmn-card:hover{transform:scale(1.015);background-color:rgba(36,36,42,.6);}
.pmn-mac .pmn-card:active{transform:scale(.985);}

.pmn-mac .pmn-item{animation:pmnMacIn .6s cubic-bezier(.18,.95,.28,1.06) both;}
@keyframes pmnMacIn{
  0%  {opacity:0;transform:translateY(calc(100% + 36px)) scale(.94);}
  55% {opacity:1;}
  100%{opacity:1;transform:translateY(0) scale(1);}
}
.pmn-mac .pmn-item.out{animation:pmnMacOut .34s cubic-bezier(.4,0,.8,.4) forwards;pointer-events:none;}
@keyframes pmnMacOut{
  0%{opacity:1;transform:translateX(0) scale(1);}
  100%{opacity:0;transform:translateX(46px) scale(.94);}
}
.pmn-mac .pmn-item.out-open{animation:pmnMacOpen .3s ease forwards;pointer-events:none;}
@keyframes pmnMacOpen{to{opacity:0;transform:scale(1.05);}}

/* tiny close button (top-left, macOS style) */
.pmn-x{
  position:absolute;top:-7px;left:-7px;z-index:3;
  width:20px;height:20px;padding:0;margin:0;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:rgba(255,255,255,.92);cursor:pointer;
  background:rgba(60,60,70,.62);
  -webkit-backdrop-filter:blur(14px) saturate(170%);backdrop-filter:blur(14px) saturate(170%);
  border:0;box-shadow:inset 0 .5px 0 rgba(255,255,255,.4),0 0 0 .5px rgba(255,255,255,.22),0 2px 8px rgba(0,0,0,.45);
  opacity:.5;transform:scale(.9);
  transition:opacity .18s,transform .18s,background-color .18s;
}
.pmn-x svg{width:8px;height:8px;display:block;pointer-events:none;}
.pmn-item:hover .pmn-x,.pmn-x:focus-visible{opacity:1;transform:scale(1);}
.pmn-x:hover{background:rgba(92,92,104,.8);}
.pmn-x:active{transform:scale(.88);}
.pmn-x:focus-visible{outline:2px solid #4f8ef7;outline-offset:1px;}

/* ============================================================
   TOUCH — iOS style banner, dropping from the top, swipe up to dismiss
   ============================================================ */
.pmn-root.pmn-ios{
  top:calc(env(safe-area-inset-top,0px) + 8px);left:50%;
  width:min(361.2px,calc(100vw - 24px));
  transform:translateX(-50%);
}
.pmn-ios .pmn-card{
  padding:10px 16px 10px 10px;border-radius:26px;gap:11px;
  touch-action:none;transition:none;
}
.pmn-ios .pmn-card.settle{transition:transform .42s cubic-bezier(.2,1.2,.3,1),opacity .25s;}
.pmn-ios .pmn-card.flyout{transition:transform .3s cubic-bezier(.5,0,.9,.5),opacity .26s ease-in;}
.pmn-ios .pmn-av{width:40px;height:40px;}
.pmn-ios .pmn-name,.pmn-ios .pmn-text{font-size:14.5px;}
.pmn-ios .pmn-time{font-size:12px;}
.pmn-ios .pmn-item.has-count::before{border-radius:0 0 26px 26px;left:16px;right:16px;bottom:-6px;}
.pmn-ios .pmn-x{display:none;}
/* little grabber pill — hints "swipe up" */
.pmn-grab{
  position:absolute;left:50%;bottom:5px;width:36px;height:4.5px;margin-left:-18px;border-radius:3px;
  background:rgba(255,255,255,.34);pointer-events:none;
}
.pmn-grab,.pmn-mac .pmn-grab{display:none;}

.pmn-ios .pmn-item{animation:pmnIosIn .65s cubic-bezier(.17,.9,.3,1.12) both;}
@keyframes pmnIosIn{
  0%  {opacity:0;transform:translateY(-135%) scale(.9);}
  40% {opacity:1;}
  100%{opacity:1;transform:translateY(0) scale(1);}
}
.pmn-ios .pmn-item.out{animation:pmnIosOut .36s cubic-bezier(.5,0,.9,.5) forwards;pointer-events:none;}
@keyframes pmnIosOut{to{opacity:0;transform:translateY(-140%) scale(.94);}}
.pmn-ios .pmn-item.out-open{animation:pmnIosOpen .26s ease forwards;pointer-events:none;}
@keyframes pmnIosOpen{to{opacity:0;transform:scale(.94);}}
.pmn-ios .pmn-item.swiped:not(.out):not(.out-open){animation:none;opacity:1;}

/* ── fallbacks ─────────────────────────────────────────── */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .pmn-card{background:rgba(28,28,32,.96);}
  .pmn-x{background:rgba(70,70,82,.96);}
}
html.lite-mode .pmn-card,html.eco-mode .pmn-card{
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  background:rgba(34,34,42,.9);
}
html.lite-mode .pmn-card::before,html.eco-mode .pmn-card::before,
html.lite-mode .pmn-card::after,html.eco-mode .pmn-card::after{display:none;}

@media (prefers-reduced-motion:reduce){
  .pmn-mac .pmn-item,.pmn-ios .pmn-item{animation:pmnFade .2s ease both;}
  .pmn-mac .pmn-item.out,.pmn-ios .pmn-item.out,
  .pmn-mac .pmn-item.out-open,.pmn-ios .pmn-item.out-open{animation:pmnFadeOut .18s ease forwards;}
  .pmn-item.bump .pmn-card{animation:none;}
  @keyframes pmnFade{from{opacity:0}to{opacity:1}}
  @keyframes pmnFadeOut{to{opacity:0}}
}
@media print{.pmn-root{display:none !important;}}
