/* ==========================================================================
   YehAmbient : subtle sakura petals + optional ink-brush heading underline
   Tokens (optional): --yh-accent --yh-accent-2 --yh-ink --yh-paper
   Brush colours can be overridden per page:  --yh-brush-1 (ink)  --yh-brush-2 (gold)
   ========================================================================== */
#yh-petals{position:fixed;left:0;top:0;width:100%;height:100%;z-index:0;pointer-events:none;display:block}

/* ---- ink-brush underline : add data-yh-brush (optionally ="center") to any heading ---- */
.yh-brush{
  --b1:var(--yh-brush-1,var(--yh-accent,#7a1d3a));
  --b2:var(--yh-brush-2,var(--yh-accent-2,#c49a3c));
  display:block;position:relative;width:clamp(120px,46%,260px);max-width:100%;height:18px;margin:.42em 0 .2em;overflow:visible;pointer-events:none;
}
.yh-brush--on-dark{--b1:var(--yh-brush-1,var(--yh-accent-2,#e2b866));--b2:var(--yh-brush-2,var(--yh-paper,#fbf3e8))}
[data-yh-brush="center"] > .yh-brush,.yh-brush--center{margin-left:auto;margin-right:auto}
[data-yh-brush="right"] > .yh-brush{margin-left:auto}
.yh-brush path{fill:none;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1}
.yh-brush .a{stroke:var(--b1);stroke-width:5.5;stroke-opacity:.9}
.yh-brush .b{stroke:var(--b2);stroke-width:1.8;stroke-opacity:.85}
.yh-brush circle{fill:var(--b2);opacity:0;transform-box:fill-box;transform-origin:center;transform:scale(.2)}
.yh-brush.is-drawn .a{animation:yhb-draw 1.25s cubic-bezier(.55,.1,.2,1) .1s forwards}
.yh-brush.is-drawn .b{animation:yhb-draw .95s cubic-bezier(.55,.1,.2,1) .55s forwards}
.yh-brush.is-drawn circle{animation:yhb-dot .5s cubic-bezier(.3,1.6,.5,1) 1.2s forwards}
@keyframes yhb-draw{to{stroke-dashoffset:0}}
@keyframes yhb-dot{to{opacity:.95;transform:none}}

@media (prefers-reduced-motion:reduce){
  #yh-petals{display:none!important}
  .yh-brush path{stroke-dashoffset:0;animation:none!important}
  .yh-brush circle{opacity:.95;transform:none;animation:none!important}
}
