/* Hybrid: SVG lens (real page behind the glass) + Liquid Glass look from the skill.
   Edges and shadows are meant to be felt, not seen: the lens and the tone do the work.
   Rim and outline are almost transparent; the shadow is a soft, short lift off the page. */
:root,
:root[data-theme="dark"]{
  --glass-outline:#0000000f;
  --rim-hi:#ffffff1f;--rim-mid:#ffffff05;--rim-lo:#ffffff00;--rim-op:#ffffff0d;
  --sh-contact:#00000026;--sh-key:#00000026;--sh-amb:#00000047;
  --hair-top:#ffffff0f;--hair-bot:#ffffff05;--inner:#ffffff08;
}
@media (prefers-color-scheme:light){
  :root:not([data-theme="dark"]){
    --glass-outline:#00000008;
    --rim-hi:#ffffff80;--rim-mid:#ffffff1f;--rim-lo:#ffffff00;--rim-op:#ffffff3d;
    --sh-contact:#00000012;--sh-key:#0000000f;--sh-amb:#0000001c;
    --hair-top:#ffffff66;--hair-bot:#ffffff1f;--inner:#ffffff2e;
  }
}
:root[data-theme="light"]{
  --glass-outline:#00000008;
  --rim-hi:#ffffff80;--rim-mid:#ffffff1f;--rim-lo:#ffffff00;--rim-op:#ffffff3d;
  --sh-contact:#00000012;--sh-key:#0000000f;--sh-amb:#0000001c;
  --hair-top:#ffffff66;--hair-bot:#ffffff1f;--inner:#ffffff2e;
}
.namePill,.composerGlass,.panelCta,.panelClose,.lbBtn,.lbDots,.psCount{
  background:
    radial-gradient(circle at var(--mx,50%) var(--my,0%),rgb(255 255 255 / var(--spot)),#fff0 62%),
    linear-gradient(180deg,#ffffff06,#ffffff00 50%,#ffffff04),
    var(--glass-tint);
  box-shadow:
    0 0 0 .5px var(--glass-outline),
    0 .5px 1px var(--sh-contact),
    0 4px 10px -4px var(--sh-key),
    0 12px 26px -16px var(--sh-amb),
    inset 0 .5px 0 var(--hair-top),
    inset 0 -.5px 0 var(--hair-bot),
    inset 0 7px 10px -10px var(--inner);
}
.namePill:after,.composerGlass:after,.panelCta:after,.panelClose:after,.lbBtn:after,.lbDots:after,.psCount:after{
  padding:.5px;
  background:linear-gradient(155deg,var(--rim-hi) 0%,var(--rim-mid) 24%,var(--rim-lo) 52%,var(--rim-mid) 80%,var(--rim-op) 100%)}
.namePill:before,.composerGlass:before,.panelCta:before,.panelClose:before,.lbBtn:before,.lbDots:before,.psCount:before{
  background:linear-gradient(180deg,#ffffff06,#fff0 30%)}

/* Without the SVG lens (Safari, every browser on iPhone and iPad, Firefox) nothing bends the page at the edge,
   so the glass read as a flat blur. There the rim, the inner bevel light and a thicker frost carry the material.
   The "lens" class is set on <html> in Chromium only (index.html and glass-svg.js). */
html:not(.lens) .namePill,html:not(.lens) .composerGlass,html:not(.lens) .panelCta,html:not(.lens) .panelClose,html:not(.lens) .lbBtn,html:not(.lens) .lbDots,html:not(.lens) .psCount{
  --glass-outline:light-dark(#00000017,#00000059);
  --rim-hi:light-dark(#fffffff2,#ffffff6b);--rim-mid:light-dark(#ffffff73,#ffffff1c);--rim-lo:light-dark(#ffffff1f,#ffffff08);--rim-op:light-dark(#ffffffa6,#ffffff33);
  --hair-top:light-dark(#ffffffd9,#ffffff38);--hair-bot:light-dark(#ffffff66,#ffffff17);--inner:light-dark(#ffffff8c,#ffffff24);
  -webkit-backdrop-filter:blur(9px) saturate(1.8) brightness(1.08);backdrop-filter:blur(9px) saturate(1.8) brightness(1.08);
  box-shadow:
    0 0 0 .5px var(--glass-outline),
    0 .5px 1px var(--sh-contact),
    0 4px 10px -4px var(--sh-key),
    0 12px 26px -16px var(--sh-amb),
    inset 0 1px 0 var(--hair-top),
    inset 0 -1px 0 var(--hair-bot),
    inset 0 0 0 1px light-dark(#ffffff2e,#ffffff0a),
    inset 0 9px 12px -9px var(--inner),
    inset 0 -7px 10px -9px light-dark(#ffffff59,#ffffff14)}
html:not(.lens) .namePill:after,html:not(.lens) .composerGlass:after,html:not(.lens) .panelCta:after,html:not(.lens) .panelClose:after,html:not(.lens) .lbBtn:after,html:not(.lens) .lbDots:after,html:not(.lens) .psCount:after{padding:1px}
@media (prefers-reduced-transparency:reduce){html:not(.lens) .namePill,html:not(.lens) .composerGlass,html:not(.lens) .panelCta,html:not(.lens) .panelClose,html:not(.lens) .lbBtn,html:not(.lens) .lbDots,html:not(.lens) .psCount{-webkit-backdrop-filter:none;backdrop-filter:none}}
