/* The visual effects inherit the project's type and ink; accessible text stays in place. */
.gesture-original {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.weight-wave-word { display: inline-block; white-space: nowrap; }
.weight-wave-glyph {
  display: inline-block;
  -webkit-text-stroke: calc(var(--wave, 0) * .062em) currentColor;
  transform: translateY(calc(var(--wave, 0) * -.055em));
  transition: transform 110ms ease-out, -webkit-text-stroke-width 110ms ease-out;
}
.weight-wave-letters, .weight-wave-glyph, .weight-wave-word { pointer-events: none; }
.decode-label { position: relative; }
.decode-label > [aria-hidden="true"] { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.decode-label.decoding > :first-child { opacity: 0; }
.decode-label.decoding > [aria-hidden="true"] { opacity: 1; }

.read-along { position: relative; isolation: isolate; }
.read-along > span { display: inline-block; }
.read-along > i {
  position: absolute; inset: 0 auto auto 0; z-index: -1;
  pointer-events: none; opacity: 0; border-radius: .21em;
  background: color-mix(in srgb, currentColor 16%, transparent);
  transform-origin: left center;
  transition: transform 210ms cubic-bezier(.2,.9,.2,1), width 280ms cubic-bezier(.2,1.25,.4,1), opacity 150ms;
}
.drawn-marker { position: relative; display: inline-block; isolation: isolate; }
.drawn-marker::after {
  content: ""; position: absolute; pointer-events: none; z-index:-1;
  left: -.015em; right: -.015em; bottom: .015em; height: .11em;
  background: currentColor; opacity:.45;
  clip-path: polygon(0 42%, 25% 19%, 64% 27%, 98% 4%, 100% 58%, 72% 72%, 27% 76%, 1% 100%);
  transform-origin: left center; transform: scaleX(0);
  transition: transform 680ms cubic-bezier(.3,.1,.3,1);
}
.drawn-marker.ink-on::after { transform: scaleX(1); }

dialog .page-dot-rail {
  --pitch: 22px; position: relative; display: inline-flex; vertical-align: middle;
  color: inherit; flex: none; align-items: center; justify-content: center;
}
dialog .page-dot-rail button {
  box-sizing:border-box; display: grid; place-items: center; position:relative;
  background: transparent; box-shadow:none; border:0; margin:0; padding:0;
  min-width:0; width:var(--pitch); min-height:28px; height:28px; color:inherit;
}
dialog .page-dot-rail button::before {
  content:''; display:block; width:5px; height:5px; border-radius:50%; background:currentColor; opacity:.45;
}
dialog .page-dot-rail > i {
  position:absolute; top:calc(50% - 3px); left:calc(var(--pitch)/2 - 7px);
  pointer-events:none; width:14px; height:6px; border-radius:20px; background:currentColor;
  transform:translateX(calc(var(--slot,0)*var(--pitch)));
  transition:transform 290ms cubic-bezier(.22,1,.36,1);
}
dialog .goo-counter { position:relative; white-space:nowrap; }
dialog .goo-changing { color:transparent !important; }
dialog .goo-changing::before, dialog .goo-changing::after {
  position:absolute; inset:0; pointer-events:none; color:var(--goo-ink,#fff); white-space:inherit;
}
dialog .goo-changing::before { content:attr(data-old) / ''; animation:goo-leave 460ms both; }
dialog .goo-changing::after { content:attr(data-next) / ''; animation:goo-arrive 460ms both; }
@keyframes goo-leave { 0% {opacity:1;filter:blur(0)} 65%,100% {opacity:0;filter:blur(6px)} }
@keyframes goo-arrive { 0% {opacity:0;filter:blur(7px)} 100% {opacity:1;filter:blur(0)} }
@media(max-width:700px) {
  dialog .art-viewer-bar:has(.page-dot-rail) {flex-direction:column;align-items:center;gap:3px}
  dialog .art-viewer-bar:has(.page-dot-rail) p {max-width:100%}
  dialog .page-dot-rail {--pitch:20px}
  dialog .art-viewer-bar nav:has(.page-dot-rail) {gap:8px}
}
@media(prefers-reduced-motion:reduce) {
  .weight-wave-glyph, .read-along > i, .drawn-marker::after, dialog .page-dot-rail > i { transition:none !important;animation:none !important }
  .weight-wave-glyph {transform:none!important;-webkit-text-stroke-width:0!important}
  .read-along > i {display:none}
  dialog .goo-changing {color:var(--goo-ink,inherit)!important}
  dialog .goo-changing::before,dialog .goo-changing::after {display:none}
}
dialog .art-viewer-caption.goo-counter, dialog #poster-title.goo-counter {
  font-size:clamp(14px,1.5vw,22px); font-weight:550; line-height:1.18;
}
@media(max-width:700px) { dialog .art-viewer-caption.goo-counter,dialog #poster-title.goo-counter {font-size:14px} }
/* An invisible copy reserves the resting advance while the visible face gets heavier. */
.weight-wave-glyph {position:relative;color:transparent}
.weight-wave-word {--glyph-color:var(--lx-ink,var(--folio-ink,#242823))}
.weight-wave-glyph::after {
  content:attr(data-glyph); position:absolute; inset:0 auto auto 0;
  color:var(--glyph-color); font-weight:calc(500 + 360 * var(--wave,0));
  -webkit-text-stroke-color:currentColor; -webkit-text-stroke-width:inherit;
}
dialog .goo-changing {filter:url(#portfolio-goo)}
@media(prefers-reduced-motion:reduce) {dialog .goo-changing {filter:none}}
