/* Progressive enhancement: the receipt stays fully visible until the motion
   controller opts in. This keeps no-JS and reduced-motion views complete. */
.receipt-wrap {
  --receipt-progress: 100%;
  position: relative;
  flex-direction: column;
  align-items: center;
  padding-top: 37px;
  isolation: isolate;
}

/* A compact, warm-black thermal printer mouth above the paper. */
.receipt-wrap::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  width: min(100%, 424px);
  height: 31px;
  border: 1px solid #817b69;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #35352d 0%, #22231e 72%, #171814 100%);
  box-shadow: 0 7px 18px #090a084d, inset 0 1px #ffffff20;
}

.receipt-wrap::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 18px;
  width: min(calc(100% - 28px), 392px);
  height: 5px;
  border-radius: 5px;
  background: linear-gradient(180deg, #080907, #11120e);
  box-shadow: 0 1px 0 #a19a824d, 0 0 11px #d8ae5333;
}

.receipt-wrap .receipt {
  z-index: 1;
  margin-top: -11px;
  transform-origin: 50% 0;
  backface-visibility: hidden;
}

.receipt-wrap.is-motion-ready .receipt {
  clip-path: inset(-2px -4px calc(100% - var(--receipt-progress) - 9px) -4px);
  transform: rotate(1.25deg);
  will-change: clip-path, transform;
}

@media (max-width: 650px) {
  .receipt-wrap { padding-top: 34px; }
  .receipt-wrap::before { height: 29px; }
  .receipt-wrap::after { top: 17px; }
  .receipt-wrap .receipt { max-width: 385px; }
}

@media (max-height: 699px), (prefers-reduced-motion: reduce) {
  .receipt-wrap.is-motion-ready .receipt {
    clip-path: none;
    transform: rotate(1.25deg);
    will-change: auto;
  }
}
