/* Gesture-only optics. Resting dimensions, backgrounds and typography belong
   entirely to the existing component. No global backdrop, layout or touch rules. */
.lg-relative{position:relative}
.lg-control{isolation:isolate;--lg-specular:rgba(255,255,255,.92);--lg-fringe:rgba(172,216,239,.16)}
.lg-moving,.lg-mirror{
  translate:var(--lg-tx,0px) var(--lg-ty,0px);
  scale:var(--lg-sx,1) var(--lg-sy,1);
  rotate:var(--lg-angle,0deg);
  border-radius:var(--lg-radius)!important;
  will-change:translate,scale,rotate;
}
.lg-content{
  translate:var(--lg-content-x,0px) var(--lg-content-y,0px);
  scale:var(--lg-content-sx,1) var(--lg-content-sy,1);
}
.lg-surface{
  display:block!important;position:absolute;inset:0;pointer-events:none!important;
  border-radius:inherit;z-index:-1;opacity:var(--lg-light,0);
  background:radial-gradient(ellipse at var(--lg-contact-x,50%) var(--lg-contact-y,50%),rgba(255,255,255,.23),rgba(255,255,255,.025) 48%,transparent 72%);
  box-shadow:inset 0 1px 1px #ffffff80,inset 0 -1px 1px #ffffff25,0 5px 16px #21101910;
  -webkit-backdrop-filter:blur(1.5px) saturate(115%);backdrop-filter:blur(1.5px) saturate(115%);
}
.lg-surface::before,.lg-surface::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none}
.lg-surface::before{
  background:radial-gradient(ellipse at var(--lg-contact-x,50%) var(--lg-contact-y,50%),#fff,transparent 58%);
  opacity:var(--lg-bloom,0);filter:blur(3px);
  transform:translate(calc(var(--lg-content-x,0px) * -1),calc(var(--lg-content-y,0px) * -1));
}
.lg-surface::after{
  padding:1px;background:conic-gradient(from 25deg at var(--lg-contact-x,50%) var(--lg-contact-y,50%),transparent 5%,var(--lg-specular) 23%,transparent 43%,var(--lg-fringe) 64%,#ffffff70 76%,transparent 92%);
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;
  mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;
}
.lg-down>.lg-surface::after{animation:lg-contact-glint 90ms ease-out both}
.lg-hover:not(.lg-moving)>.lg-surface{opacity:.13;transition:opacity 120ms ease-out}
/* No layout conversion for inline text links; the optical surface responds. */
.lg-inline.lg-moving{translate:none;scale:none;rotate:none;will-change:auto}
.lg-inline.lg-moving>.lg-surface{transform:translate(var(--lg-tx),var(--lg-ty)) scale(var(--lg-sx),var(--lg-sy))}
input.lg-down{filter:brightness(1.045)}
@keyframes lg-contact-glint{0%{opacity:.45}40%{opacity:1;filter:brightness(1.22)}100%{opacity:.75}}
@supports(color:color(display-p3 1 1 1)){
  @media(color-gamut:p3){.lg-control{--lg-specular:color(display-p3 1 .99 .98 / .96);--lg-fringe:color(display-p3 .60 .82 1 / .19)}}
}
@media(dynamic-range:high){.lg-down>.lg-surface::after{animation-name:lg-contact-glint-hdr}}
@keyframes lg-contact-glint-hdr{0%{opacity:.45}40%{opacity:1;filter:brightness(1.45) drop-shadow(0 0 2px #ffffff90)}100%{opacity:.75}}
/* Physical deformation never takes focus styling away from the original UI. */
@media(prefers-reduced-motion:reduce){
  .lg-moving,.lg-mirror,.lg-content{translate:none;scale:none;rotate:none;will-change:auto}
  .lg-surface{transition:none!important;-webkit-backdrop-filter:none;backdrop-filter:none}
  .lg-down>.lg-surface{opacity:.18}
  .lg-down>.lg-surface::after{animation:none}
}
@supports not (scale:1 1){.lg-down>.lg-surface{opacity:.2}}
