/* Variant D3 / v3 — plniace pero.
   Ako D2, ale bez drop-shadow (krémový obrys ostáva) a s kreslením zlatým
   atramentom pri ťahaní ľavým tlačidlom. Čiara na fixed canvas zmizne po 2 s
   (miznutie po bodoch). Len myš (pointer:fine). Schová starý .cur z motion.js.
   motion.js sa nemení. */

html.has-bmc-cur,
html.has-bmc-cur a,
html.has-bmc-cur button,
html.has-bmc-cur summary,
html.has-bmc-cur label,
html.has-bmc-cur [role="button"]{
  cursor:none !important;
}
html.has-bmc-cur input,
html.has-bmc-cur textarea,
html.has-bmc-cur select,
html.has-bmc-cur [contenteditable]{cursor:auto !important}

html.has-bmc-cur .cur,
html.has-bmc-cur .cur-d{display:none !important;opacity:0 !important}

/* During a draw-drag only — restored on pointerup. */
html.is-bmc-draw,
html.is-bmc-draw *{
  -webkit-user-select:none !important;
  user-select:none !important;
}

/* Origin of this box IS the pointer (nib tip at 0,0 — no centering margin). */
.bmc-cur{
  position:fixed;left:0;top:0;pointer-events:none;z-index:220;
  width:0;height:0;margin:0;
  opacity:0;will-change:transform;
  transition:opacity .28s ease;
  overflow:visible;
}
.bmc-cur.on{opacity:1}
.bmc-cur.is-txt{opacity:0}

/* Ink lives under the nib, above the page. Never intercepts clicks. */
canvas.bmc-ink{
  position:fixed;left:0;top:0;
  width:100%;height:100%;
  pointer-events:none;
  z-index:219;
  display:block;
}

.bmc-cur--pen svg.bmc-pen{
  position:absolute;left:-6px;top:-32px;
  width:48px;height:48px;
  overflow:visible;
  display:block;
}

/* Tilt lives on the inner group, rotation around the tip (0,0). Rest ≈ 45°. */
.bmc-cur--pen .bmc-pen-body{
  transform-origin:0px 0px;
  transform:rotate(-45deg);
  transition:transform .28s cubic-bezier(.2,.7,.2,1);
}
.bmc-cur--pen.is-hov .bmc-pen-body{
  transform:rotate(-37deg);
}
.bmc-cur--pen.is-draw .bmc-pen-body{
  transform:rotate(-40deg);
}

/* Short gold underline from the tip. Hidden while drawing so it doesn't compete. */
.bmc-stroke{
  position:absolute;left:1px;top:-0.85px;
  width:26px;height:2px;
  pointer-events:none;
  border-radius:1.5px;
  background:linear-gradient(90deg, #c4a05a 0%, #e0c57a 42%, rgba(224,197,122,0) 100%);
  box-shadow:
    0 0 0 .85px rgba(247,241,228,.92),
    0 1px 1.2px rgba(15,22,32,.28);
  transform-origin:0 50%;
  transform:rotate(7deg) scaleX(.12);
  opacity:0;
  transition:transform .28s cubic-bezier(.2,.7,.2,1), opacity .4s ease;
}
.bmc-cur--pen.is-hov .bmc-stroke{
  transform:rotate(7deg) scaleX(1);
  opacity:.95;
}
.bmc-cur--pen.is-draw .bmc-stroke{
  opacity:0;
  transform:rotate(7deg) scaleX(.12);
  transition:opacity .12s ease;
}

/* Click: a small ink dot at the tip (simple click only, not a drag). */
.bmc-dot{
  position:absolute;left:-1.6px;top:-1.6px;
  width:3.2px;height:3.2px;border-radius:50%;
  background:#9a7438;
  box-shadow:0 0 0 .7px rgba(247,241,228,.9), 0 0 0 .35px rgba(27,42,62,.25);
  pointer-events:none;
  opacity:0;
  transform:scale(.35);
}
.bmc-cur--pen.is-ink .bmc-dot{
  animation:bmc-ink .48s ease-out forwards;
}
@keyframes bmc-ink{
  0%{opacity:0;transform:scale(.35)}
  28%{opacity:.85;transform:scale(1)}
  100%{opacity:0;transform:scale(.7)}
}

@media (hover:none), (pointer:coarse){
  .bmc-cur,canvas.bmc-ink{display:none !important}
  html.has-bmc-cur,html.has-bmc-cur *{cursor:auto !important}
}
@media (prefers-reduced-motion:reduce){
  .bmc-cur,canvas.bmc-ink{display:none !important}
  html.has-bmc-cur,html.has-bmc-cur *{cursor:auto !important}
  .bmc-cur--pen .bmc-pen-body,
  .bmc-stroke,
  .bmc-dot{animation:none !important;transition:none !important}
}
