/* Preserve the original resting mark. Raised sleeves overlap its real shoulder. */
.bucur-mark{--bucur-wrist-depth:60px;position:relative;display:inline-flex;flex:0 0 auto;isolation:isolate;font-style:normal;line-height:0;pointer-events:auto}
.bucur-mark>img:first-child{position:relative}
.bucur-mark>img.bucur-smile{position:absolute;inset:0;width:100%;height:100%;max-width:none;opacity:0;object-fit:contain;border-radius:50%;mix-blend-mode:multiply}
.bucur-mark>img.bucur-arm{position:absolute;inset:-8% auto auto -2%;width:100%;height:100%;max-width:none;opacity:0;object-fit:contain;border-radius:0;mix-blend-mode:normal;transform-origin:71% 83%;transform:scale(.85);pointer-events:none}
/* The corrected left hand has its thumb on the inner edge, toward Bucur's face. */
.bucur-mark>.bucur-knock-rig{position:absolute;inset:-7% auto auto 0;width:100%;height:100%;opacity:0;transform:scale(.85);transform-origin:69% 82%;pointer-events:none}
.bucur-mark>.bucur-knock-rig>img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:contain;border-radius:0;mix-blend-mode:normal}
/* Small overlap at the cuff keeps the wrist seam closed during flexion. */
.bucur-knock-rig>.bucur-knock-sleeve{clip-path:polygon(0 30.5%,100% 57%,100% 100%,0 100%)}
.bucur-knock-rig>.bucur-knock-hand{clip-path:polygon(0 0,100% 0,100% 58.5%,0 32%);transform-origin:84% 54%;backface-visibility:hidden}
.bucur-mark:is(.is-welcoming,.is-knocking)>img:first-child{animation:bucur-rest 3.2s ease-in-out both}
.bucur-mark:is(.is-welcoming,.is-knocking)>.bucur-smile{animation:bucur-smile 3.2s ease-in-out both}
.bucur-mark.is-welcoming>.bucur-wave{animation:bucur-wave 3.2s ease-in-out both}
.bucur-mark.is-knocking>.bucur-knock-rig{animation:bucur-arm-appear 3.2s ease-in-out both}
.bucur-mark.is-knocking .bucur-knock-hand{animation:bucur-wrist-tap 3.2s ease-in-out both}
@keyframes bucur-rest{0%,100%{opacity:1}18%,78%{opacity:0}}
@keyframes bucur-smile{0%,100%{opacity:0}18%,78%{opacity:1}}
/* Fixed shoulder pivot, two diminishing arcs, then a soft return. */
@keyframes bucur-wave{0%,100%{opacity:0;transform:rotate(16deg) scale(.85)}16%{opacity:1;transform:rotate(0deg) scale(.85)}30%{opacity:1;transform:rotate(-6deg) scale(.85)}44%{opacity:1;transform:rotate(5deg) scale(.85)}58%{opacity:1;transform:rotate(-4deg) scale(.85)}71%{opacity:1;transform:rotate(3deg) scale(.85)}82%{opacity:1;transform:rotate(0deg) scale(.85)}94%{opacity:0;transform:rotate(14deg) scale(.85)}}
/* Sleeve and forearm hold still. Only the hand flexes at the wrist, toward the viewer. */
@keyframes bucur-arm-appear{0%,100%{opacity:0}16%,82%{opacity:1}}
@keyframes bucur-wrist-tap{0%,18%,82%,100%{transform:perspective(var(--bucur-wrist-depth)) rotateX(0deg) rotate(0deg)}29%,53%{transform:perspective(var(--bucur-wrist-depth)) rotateX(12deg) rotate(-6deg);animation-timing-function:cubic-bezier(.5,0,.7,1)}35%,59%{transform:perspective(var(--bucur-wrist-depth)) rotateX(-9deg) rotate(2deg);animation-timing-function:ease-out}42%,66%{transform:perspective(var(--bucur-wrist-depth)) rotateX(5deg) rotate(-2deg)}48%,73%{transform:perspective(var(--bucur-wrist-depth)) rotateX(0deg) rotate(0deg)}}
@media(max-width:560px){.bucur-mark{--bucur-wrist-depth:51px}}
@media(prefers-reduced-motion:reduce){.bucur-mark,.bucur-mark *{animation:none!important;transition:none!important}.bucur-mark>.bucur-smile,.bucur-mark>.bucur-arm,.bucur-mark>.bucur-knock-rig{display:none!important}}

/* Separate controls keep the sound action outside the support button. */
.bucur-helper-controls{position:fixed;right:25px;bottom:calc(22px + env(safe-area-inset-bottom,0px));z-index:1000;display:flex;align-items:center;gap:8px;max-width:calc(100vw - 32px)}
.bucur-helper-controls>.helper-launcher{position:static;flex:0 1 auto;min-width:0}
.bucur-helper-controls>.bucur-sound-button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;margin:0;padding:0;border:1px solid #d9dfd2;border-radius:50%;background:var(--cream,#fcfaf4);color:var(--ink,#173f32);box-shadow:0 4px 20px #10392d1c;cursor:pointer}
.bucur-sound-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.bucur-helper-controls>.bucur-sound-button:hover{background:var(--pale,#f5ebc8);border-color:#9caf9a}
.bucur-helper-controls>.bucur-sound-button:focus-visible{outline:3px solid var(--red,#b64c36);outline-offset:3px}
.bucur-sound-button[aria-pressed="false"] .bucur-sound-waves,.bucur-sound-button[aria-pressed="true"] .bucur-sound-muted{display:none}
.bucur-sound-button .bucur-sound-muted{stroke:var(--red,#b64c36);stroke-width:2.2}
.bucur-helper-controls>.bucur-sound-button[aria-pressed="true"]{background:var(--ink,#173f32);color:var(--cream,#fcfaf4);border-color:var(--ink,#173f32)}
.bucur-helper-controls>.bucur-sound-button[aria-pressed="true"]:hover{background:var(--deep,#10392d)}
.bucur-helper-controls>.bucur-sound-button[aria-busy="true"]{cursor:progress}
@media(max-width:560px){.bucur-helper-controls{right:16px;bottom:calc(15px + env(safe-area-inset-bottom,0px));gap:6px}}
@media(prefers-reduced-motion:reduce){.bucur-helper-controls>.bucur-sound-button{display:none}}
