/* =====================================================================
   Pawberry icon set v4 · Liquid Glass
   Each icon = two flat SVG layers (shape, face) on a 120 grid. Everything
   else is this one shared material, so every icon is lit the same way.
   Markup:
     <span class="pb-icon pb-cat" aria-hidden="true"><span class="tile"></span><span class="shade"></span>
       <span class="glass"></span><span class="tint"><span></span></span><span class="edge"></span>
       <span class="glow"></span><span class="face"></span></span>
   Size: --s (px). Appearances: default · .light · .clear · .dark.
   js/pb-icon.js adds the lens (glass bends what is behind it) in Chromium.
   ===================================================================== */

.pb-icon {
  --s: 40px;
  --m: 76%; --py: 56%;                  /* glyph size + optical centre */
  --lx: -.3; --ly: -.95;                /* light: above, a little left */
  --bg: linear-gradient(155deg, #ff9db1 0%, #ef5279 45%, #b51f42 100%);
  --glass: rgba(255, 255, 255, .72); --edge: rgba(255, 255, 255, 1); --eye: rgba(160, 28, 62, .92);
  --shade: rgba(90, 8, 32, .5); --tint: rgba(226, 52, 96, .62); --glow: rgba(255, 255, 255, .9);
  --drop: rgba(128, 28, 54, .45); --c: #ef5279;   /* --c: the icon's own colour (Light appearance) */
  position: relative; display: inline-block; flex: none; vertical-align: middle;
  width: var(--s); height: var(--s); border-radius: 23%; overflow: hidden; isolation: isolate;
  background: var(--bg);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.35), inset 0 1.5px 0 rgba(255,255,255,.55),
    0 calc(var(--s) * .1) calc(var(--s) * .18) calc(var(--s) * -.08) var(--drop);
}
.pb-icon::before { /* light falling on the tile */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(110% 70% at calc(50% + var(--lx) * 35%) calc(50% + var(--ly) * 55%), rgba(255,255,255,.45), rgba(255,255,255,0) 55%);
}
.pb-icon > span {
  position: absolute; inset: 0;
  -webkit-mask-size: var(--m); mask-size: var(--m);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center var(--py); mask-position: center var(--py);
}
.pb-icon .tile { -webkit-mask: none; mask: none; border-radius: inherit; } /* Clear only */
.pb-icon .shade { /* soft shadow the glass casts on the tile */
  -webkit-mask: none; mask: none; filter: blur(calc(var(--s) * .04));
  transform: translate(calc(var(--lx) * var(--s) * -.025), calc(var(--ly) * var(--s) * -.047));
}
.pb-icon .shade::before {
  content: ""; position: absolute; inset: 0; background: var(--shade);
  -webkit-mask: var(--shape) center var(--py) / var(--m) no-repeat; mask: var(--shape) center var(--py) / var(--m) no-repeat;
}
.pb-icon .glass { /* translucent body: what is behind shows through */
  -webkit-mask-image: var(--shape); mask-image: var(--shape);
  background: radial-gradient(70% 55% at calc(50% + var(--lx) * 25%) calc(45% + var(--ly) * 30%), rgba(255,255,255,.55), rgba(255,255,255,0) 70%), var(--glass);
  -webkit-backdrop-filter: blur(calc(var(--s) * .03)) saturate(1.4) brightness(1.2);
  backdrop-filter: blur(calc(var(--s) * .03)) saturate(1.4) brightness(1.2);
}
.pb-icon .tint { -webkit-mask-image: var(--shape); mask-image: var(--shape); } /* thickness: colour gathers at the edges */
.pb-icon .tint > span { position: absolute; inset: 0; filter: blur(calc(var(--s) * .022)); }
.pb-icon .tint > span::before {
  content: ""; position: absolute; inset: 0; background: var(--tint);
  -webkit-mask: var(--shape) center var(--py) / var(--m) no-repeat, var(--shape) center var(--py) / calc(var(--m) - 9%) no-repeat;
  mask: var(--shape) center var(--py) / var(--m) no-repeat, var(--shape) center var(--py) / calc(var(--m) - 9%) no-repeat;
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.pb-icon .edge { /* specular rim on the lit side */
  -webkit-mask-image: var(--shape), var(--shape); mask-image: var(--shape), var(--shape);
  -webkit-mask-position: center var(--py), calc(50% - var(--lx) * var(--s) * .022) calc(var(--py) - var(--ly) * var(--s) * .022);
  mask-position: center var(--py), calc(50% - var(--lx) * var(--s) * .022) calc(var(--py) - var(--ly) * var(--s) * .022);
  -webkit-mask-composite: xor; mask-composite: exclude;
  background: radial-gradient(130% 130% at calc(50% + var(--lx) * 55%) calc(50% + var(--ly) * 55%), var(--edge) 0%, rgba(255,255,255,.35) 42%, rgba(255,255,255,0) 75%);
}
.pb-icon .glow { /* light leaving the glass on the far side */
  -webkit-mask-image: var(--shape), var(--shape); mask-image: var(--shape), var(--shape);
  -webkit-mask-position: center var(--py), calc(50% + var(--lx) * var(--s) * .016) calc(var(--py) + var(--ly) * var(--s) * .016);
  mask-position: center var(--py), calc(50% + var(--lx) * var(--s) * .016) calc(var(--py) + var(--ly) * var(--s) * .016);
  -webkit-mask-composite: xor; mask-composite: exclude;
  background: radial-gradient(120% 120% at calc(50% - var(--lx) * 55%) calc(50% - var(--ly) * 55%), var(--glow) 0%, rgba(255,255,255,0) 45%);
}
.pb-icon .face { -webkit-mask-image: var(--face); mask-image: var(--face); background: var(--eye); }

/* lens (Chromium, set by pb-icon.js once its filters exist) */
.pb-icon.lens .glass {
  -webkit-backdrop-filter: var(--lens,) blur(calc(var(--s) * .018)) saturate(1.4) brightness(1.2);
  backdrop-filter: var(--lens,) blur(calc(var(--s) * .018)) saturate(1.4) brightness(1.2);
}

/* ---------- the set: shape, face and colour ---------- */
.pb-cat    { --shape: url(../assets/icons/v4/cat-shape.svg);    --face: url(../assets/icons/v4/cat-face.svg); }
.pb-dog    { --c: #f08a2c; --shape: url(../assets/icons/v4/dog-shape.svg);    --face: url(../assets/icons/v4/dog-face.svg);
  --bg: linear-gradient(155deg, #ffcf96 0%, #f49a3e 45%, #c2601a 100%);
  --eye: rgba(112, 50, 10, .92); --shade: rgba(110, 48, 6, .5); --tint: rgba(232, 128, 40, .62); --drop: rgba(150, 70, 14, .45); }
.pb-rabbit { --c: #6fae5a; --shape: url(../assets/icons/v4/rabbit-shape.svg); --face: url(../assets/icons/v4/rabbit-face.svg);
  --bg: linear-gradient(155deg, #d4ebbd 0%, #8fc075 45%, #4c8744 100%);
  --eye: rgba(38, 82, 34, .92); --shade: rgba(28, 66, 24, .5); --tint: rgba(104, 168, 84, .62); --drop: rgba(50, 100, 44, .42); }
.pb-care   { --c: #f2584a; --shape: url(../assets/icons/v4/care-shape.svg);   --face: url(../assets/icons/v4/care-face.svg); --py: 54%;
  --bg: linear-gradient(155deg, #ffbcab 0%, #ff6f5e 45%, #cf3a36 100%);
  --eye: rgba(176, 42, 38, .9); --shade: rgba(120, 20, 16, .5); --tint: rgba(240, 92, 76, .62); --drop: rgba(170, 44, 38, .45); }
.pb-cozy   { --c: #eaa21f; --shape: url(../assets/icons/v4/cozy-shape.svg);   --face: url(../assets/icons/v4/cozy-face.svg);
  --bg: linear-gradient(155deg, #ffe39a 0%, #f6b632 45%, #cf8410 100%);
  --eye: rgba(130, 76, 6, .9); --shade: rgba(120, 66, 0, .45); --tint: rgba(236, 160, 30, .62); --drop: rgba(170, 104, 10, .42); }
.pb-finds  { --c: #b4508e; --shape: url(../assets/icons/v4/finds-shape.svg);  --face: url(../assets/icons/v4/finds-face.svg);
  --bg: linear-gradient(155deg, #efb4d6 0%, #bd5c98 45%, #7c2962 100%);
  --eye: rgba(120, 36, 92, .88); --shade: rgba(80, 12, 56, .5); --tint: rgba(186, 82, 146, .62); --drop: rgba(110, 30, 86, .45); }

.pb-icon-xl { --s: 76px; }

/* ---------- appearances ---------- */
.pb-icon.light { --bg: linear-gradient(155deg, #ffffff 0%, #fbf3f0 55%, #f3e5e2 100%); --glass: color-mix(in srgb, var(--c) 62%, transparent); --eye: rgba(255,247,237,.95);
  box-shadow: inset 0 0 0 .6px rgba(46,35,34,.12), inset 0 1.5px 0 #fff, 0 calc(var(--s) * .1) calc(var(--s) * .18) calc(var(--s) * -.08) var(--drop); }
.pb-icon.dark { --bg: linear-gradient(155deg, #3c2a2e 0%, #1c1215 100%); --glass: rgba(255, 255, 255, .62); --edge: #fff; --shade: rgba(0,0,0,.6); --glow: rgba(255,255,255,.7);
  box-shadow: inset 0 0 0 .6px rgba(255,255,255,.14), inset 0 1.5px 0 rgba(255,255,255,.22), 0 calc(var(--s) * .1) calc(var(--s) * .18) calc(var(--s) * -.08) rgba(0,0,0,.5); }
.pb-icon.clear { --bg: transparent; --glass: rgba(255, 255, 255, .26); --eye: rgba(70, 30, 40, .78); --shade: rgba(40, 10, 20, .3);
  --tint: rgba(255, 255, 255, .6); --glow: #fff;
  box-shadow: inset 0 0 0 .6px rgba(255,255,255,.55), inset 0 1.5px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(255,255,255,.3), 0 calc(var(--s) * .1) calc(var(--s) * .2) calc(var(--s) * -.08) rgba(40,10,20,.3); }
.pb-icon.clear::before { background: radial-gradient(110% 70% at calc(50% + var(--lx) * 35%) calc(50% + var(--ly) * 55%), rgba(255,255,255,.4), rgba(255,255,255,0) 55%); }
.pb-icon.clear .tile { background: rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(calc(var(--s) * .02)) saturate(1.8) brightness(1.08); backdrop-filter: blur(calc(var(--s) * .02)) saturate(1.8) brightness(1.08); }
.pb-icon.clear.lens .tile {
  -webkit-backdrop-filter: var(--lens-tile,) blur(calc(var(--s) * .008)) saturate(1.8) brightness(1.08);
  backdrop-filter: var(--lens-tile,) blur(calc(var(--s) * .008)) saturate(1.8) brightness(1.08); }

/* no backdrop-filter / reduced transparency: solid glass, same shapes */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pb-icon { --glass: rgba(255, 255, 255, .86); }
}
@media (prefers-reduced-transparency: reduce) {
  .pb-icon { --glass: rgba(255, 255, 255, .9); }
  .pb-icon.lens .glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
