.receipt {
    justify-self: end;
    width: 100%;
    max-width: 420px;
    user-select: none;
}
.receipt-slot {
    position: relative;
    z-index: 2;
    height: 18px;
    border-radius: 999px;
    background: var(--g2);
    box-shadow: inset 0 -7px 0 var(--g1);
}
.receipt-feed {
    overflow: hidden;
    margin-top: -9px;
    padding: 0 18px 14px;
}
.receipt-paper {
    position: relative;
    padding: 32px 24px 26px;
    background: var(--text);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 12.5px;
    cursor: pointer;
}
.receipt-paper::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 10px;
    background:
        linear-gradient(135deg, var(--text) 50%, transparent 50%) 0 0 / 12px 10px repeat-x,
        linear-gradient(225deg, var(--text) 50%, transparent 50%) 0 0 / 12px 10px repeat-x;
}
.receipt.printing .receipt-paper {
    animation: feed 1.6s cubic-bezier(0.3, 0.7, 0.2, 1) both;
}
.receipt.printing .r-line {
    animation: ink 0.35s ease-out both;
    animation-delay: calc(0.6s + var(--i) * 110ms);
}
@keyframes feed {
    from {
        transform: translateY(-100%);
    }
}
@keyframes ink {
    from {
        opacity: 0;
    }
}

.r-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.r-head span:first-child {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.24em;
}
.r-head span:last-child,
.r-row span:first-child,
.r-caption {
    opacity: 0.6;
}
.r-caption {
    margin: 22px 0 0;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.r-title {
    margin: 6px 0 0;
    font-family: var(--font-head);
    font-size: 30px;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.r-rule {
    margin: 18px 0;
    border-top: 1px dashed color-mix(in srgb, var(--bg) 35%, transparent);
}
.r-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-block: 5px;
}
.r-row strong {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 500;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.r-code {
    height: 44px;
    margin-top: 22px;
    background: repeating-linear-gradient(
        90deg,
        currentColor 0 2px,
        transparent 2px 4px,
        currentColor 4px 5px,
        transparent 5px 9px,
        currentColor 9px 12px,
        transparent 12px 14px,
        currentColor 14px 15px,
        transparent 15px 19px
    );
}

@media (max-width: 960px) {
    .receipt {
        justify-self: start;
        max-width: 460px;
        margin-top: 24px;
    }
}
