/* Portable Geistesblick Liquid Glass, from Ver Sacrum 2026-10-09.
   Keep the text plane separate; never apply the lens filter to the host. */
.liquid-glass {
  --liquid-fill: rgb(255 255 255 / .2);
  --liquid-solid: #fffefb;
  --liquid-text: #202522;
  --liquid-contrast-tint: 0;
  --liquid-contrast-rgb: 0 0 0;
  --liquid-radius: .9rem;
  --liquid-edge: rgb(255 255 255 / .3);
  --liquid-edge-high: rgb(255 255 255 / .45);
  --liquid-edge-low: rgb(166 228 223 / .07);
  --liquid-glow: .58;
  --liquid-x: 25%;
  --liquid-y: 0%;
  --liquid-scrim: rgb(255 255 255 / .025);
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--liquid-edge);
  border-radius: var(--liquid-radius);
  color: var(--liquid-text);
  background: var(--liquid-fill);
  box-shadow: 0 12px 35px rgb(34 28 21 / .08),
    inset 0 2px 2px rgb(255 255 255 / .2), inset 0 -2px 4px rgb(34 28 21 / .035);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
}
html[data-theme="dark"] .liquid-glass,
.liquid-glass[data-liquid-tone="dark"] {
  --liquid-fill: rgb(20 23 26 / .18);
  --liquid-solid: #1c2024;
  --liquid-text: #f4f5f3;
  --liquid-contrast-tint: .28;
  --liquid-scrim: rgb(255 255 255 / .045);
  --liquid-edge: rgb(255 255 255 / .18);
  --liquid-edge-high: rgb(255 255 255 / .38);
  --liquid-edge-low: rgb(177 228 223 / .06);
  --liquid-glow: .38;
  box-shadow: 0 12px 35px rgb(0 0 0 / .13),
    inset 0 2px 2px rgb(255 255 255 / .2), inset 0 -2px 4px rgb(5 31 24 / .08);
}
html:root .liquid-glass[data-liquid-tone="light"] {
  --liquid-fill: rgb(255 255 255 / .2);
  --liquid-solid: #fffefb;
  --liquid-text: #202522;
  --liquid-contrast-tint: 0;
  --liquid-scrim: rgb(255 255 255 / .025);
  --liquid-edge: rgb(255 255 255 / .3);
  --liquid-edge-high: rgb(255 255 255 / .45);
  --liquid-edge-low: rgb(166 228 223 / .07);
  --liquid-glow: .58;
  box-shadow: 0 12px 35px rgb(34 28 21 / .08),
    inset 0 2px 2px rgb(255 255 255 / .2), inset 0 -2px 4px rgb(34 28 21 / .035);
}
/* Photo tone is independent of the page theme. It fixes the demonstrated
   Light-theme bug where headings and text links inherited dark ink. */
html:root .liquid-glass--photo,
html:root .liquid-glass[data-liquid-tone="photo"] {
  --liquid-fill: rgb(10 14 18 / .18);
  --liquid-solid: #161b20;
  --liquid-text: #fafaf5;
  --liquid-contrast-tint: .25;
  --liquid-scrim: rgb(255 255 255 / .045);
  --liquid-edge: rgb(255 255 255 / .22);
  --liquid-edge-high: rgb(255 255 255 / .42);
  --liquid-edge-low: rgb(177 228 223 / .07);
  --liquid-glow: .4;
  color: var(--liquid-text);
  text-shadow: 0 1px 4px rgb(0 0 0 / .25);
  box-shadow: 0 12px 35px rgb(0 0 0 / .13),
    inset 0 2px 2px rgb(255 255 255 / .2), inset 0 -2px 4px rgb(5 31 24 / .08);
}
.liquid-glass > .liquid-glass__content {
  position: relative;
  z-index: 1;
  color: var(--liquid-text);
}
html:root :is(.liquid-glass--photo, .liquid-glass[data-liquid-tone="photo"])
  :is(h1,h2,h3,h4,h5,h6,p,a,strong,b,small,time,dt,dd,address,label):not(.liquid-glass__button, .liquid-glass__button *) {
  color: var(--liquid-text);
  text-shadow: inherit;
}
.liquid-glass__button {
  color: #17312d;
  background: #f9f7ef;
  text-shadow: none;
}
.liquid-glass__button * {
  color: inherit;
  text-shadow: none;
}
.liquid-glass::before,
.liquid-glass::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
}
.liquid-glass::before {
  inset: -1px;
  border: 1px solid var(--liquid-edge-high);
  box-shadow: inset 1px 0 2px rgb(160 246 225 / .14),
    inset -1px -1px 2px rgb(177 195 255 / .14);
}
.liquid-glass::after {
  inset: 0;
  opacity: var(--liquid-glow);
  background: radial-gradient(ellipse 16rem 7rem at var(--liquid-x) var(--liquid-y), rgb(255 255 255 / .33), transparent 70%),
    linear-gradient(135deg, rgb(255 255 255 / .16), transparent 36%, transparent 70%, rgb(160 226 246 / .1));
}
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .liquid-glass::before {
    padding: 1px;
    border: 0;
    background: linear-gradient(132deg, var(--liquid-edge-high), rgb(215 255 240 / .22) 19%,
      var(--liquid-edge-low) 43%, rgb(162 177 245 / .2) 66%, var(--liquid-edge-high));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
  }
}
.liquid-glass[data-liquid-ready="true"][data-liquid-material="true"] {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.liquid-glass .liquid-refraction-layer {
  display: block;
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--liquid-scrim);
  backdrop-filter: blur(10px) saturate(135%);
  -webkit-backdrop-filter: blur(10px) saturate(135%);
}
.liquid-glass .liquid-refraction-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: .78;
  filter: var(--liquid-filter);
}
.liquid-glass[data-liquid-engine="svg-backdrop"] .liquid-refraction-layer {
  backdrop-filter: var(--liquid-filter) blur(.6px) saturate(135%);
  -webkit-backdrop-filter: var(--liquid-filter) blur(.6px) saturate(135%);
}
.liquid-glass[data-liquid-engine="svg-backdrop"] .liquid-refraction-image,
.liquid-glass[data-liquid-engine="css-fallback"] .liquid-refraction-image {
  display: none;
}
/* The shell owns material fill and highlights. Keep its inner lens at 0;
   a negative inner lens can disappear behind another material plane. */
.liquid-glass[data-liquid-material="true"]:has(> .liquid-card-surface) {
  background: transparent;
}
.liquid-glass[data-liquid-material="true"]:has(> .liquid-card-surface)::before,
.liquid-glass[data-liquid-material="true"]:has(> .liquid-card-surface)::after {
  content: none;
}
.liquid-glass > .liquid-card-surface {
  display: block;
  position: absolute;
  z-index: -1;
  inset: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--liquid-fill);
}
.liquid-glass > .liquid-card-surface::before {
  content: '';
  position: absolute;
  z-index: 2;
  inset: -1px;
  border: 1px solid var(--liquid-edge-high);
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset .6px 0 1px rgb(174 239 220 / .12), inset -.6px -.6px 1px rgb(159 190 230 / .1);
}
.liquid-glass > .liquid-card-surface::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--liquid-glow);
  background: radial-gradient(ellipse 18rem 8rem at var(--liquid-x) var(--liquid-y), rgb(255 255 255 / .3), transparent 70%),
    linear-gradient(135deg, rgb(255 255 255 / .14), transparent 34%, transparent 70%, rgb(183 229 226 / .07));
}
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .liquid-glass > .liquid-card-surface::before {
    padding: 1px;
    border: 0;
    background: linear-gradient(132deg, var(--liquid-edge-high), rgb(223 255 242 / .2) 19%,
      var(--liquid-edge-low) 43%, rgb(182 204 235 / .12) 66%, var(--liquid-edge-high));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
  }
}
.liquid-glass[data-liquid-material="true"] > .liquid-surface > .liquid-refraction-layer {
  z-index: 0;
}
@media (prefers-reduced-transparency: reduce) {
  .liquid-glass {
    background: var(--liquid-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .liquid-glass .liquid-refraction-layer { display: none; }
  .liquid-glass[data-liquid-material="true"]:has(> .liquid-card-surface) { background: var(--liquid-solid); }
  .liquid-glass > .liquid-card-surface { background: none; }
}
