.wr-handoff {
    --wr-handoff-paper: #fffdf8;
    --wr-handoff-ink: #183f40;
    --wr-handoff-copy: #183f40;
    --wr-handoff-muted: #6d615a;
    --wr-handoff-rose: #b83f58;
    --wr-handoff-rule: rgba(24, 63, 64, 0.22);
    width: 100%;
    max-width: 43rem;
    margin-inline: auto;
    color: var(--wr-handoff-copy);
}

.wr-handoff,
.wr-handoff *,
.wr-handoff *::before,
.wr-handoff *::after {
    box-sizing: border-box;
}

.wr-handoff p,
.wr-handoff dl,
.wr-handoff dd {
    margin: 0;
}

.wr-handoff-caption {
    margin-bottom: 0.65rem !important;
    color: var(--wr-handoff-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.wr-handoff-scene {
    position: relative;
    padding-left: 3.4rem;
}

.wr-handoff-ticket-pair {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 13rem;
}

.wr-handoff-stub,
.wr-handoff-main-ticket {
    height: 13rem;
    border: 1px solid rgba(67, 57, 54, 0.28);
    color: var(--wr-handoff-copy);
    background: var(--wr-handoff-paper);
    box-shadow: 0 0.45rem 1.2rem rgba(67, 57, 54, 0.07);
}

.wr-handoff-stub {
    position: relative;
    z-index: 3;
    display: flex;
    width: 5.15rem;
    flex: 0 0 5.15rem;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0.55rem;
    border-right: 1px dashed rgba(24, 63, 64, 0.42);
    border-radius: 0.75rem 0 0 0.75rem;
    appearance: none;
    cursor: grab;
    font: inherit;
    touch-action: pan-y;
    user-select: none;
    transform:
        translate3d(calc(var(--wr-tear-progress, 0) * -3.35rem), 0, 0)
        rotate(calc(var(--wr-tear-progress, 0) * -1.4deg));
    transform-origin: 100% 50%;
}

.wr-handoff-stub:active {
    cursor: grabbing;
}

.wr-handoff-stub:disabled {
    opacity: 1;
    cursor: default;
}

.wr-handoff-stub:focus-visible {
    outline: 3px solid var(--wr-handoff-rose);
    outline-offset: 4px;
}

.wr-handoff-stub span,
.wr-handoff-stub strong {
    writing-mode: vertical-rl;
}

.wr-handoff-stub span {
    color: var(--wr-handoff-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.wr-handoff-stub strong {
    color: var(--wr-handoff-ink);
    font: 700 0.75rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.04em;
}

.wr-handoff-stub > i {
    position: absolute;
    top: 50%;
    left: 0.45rem;
    width: 0.75rem;
    height: 1.8rem;
    border-block: 1px solid rgba(184, 63, 88, 0.45);
    transform: translateY(-50%);
}

.wr-handoff-stub > i::before,
.wr-handoff-stub > i::after {
    position: absolute;
    right: 0;
    left: 0;
    height: 1px;
    background: rgba(184, 63, 88, 0.45);
    content: "";
}

.wr-handoff-stub > i::before {
    top: 0.55rem;
}

.wr-handoff-stub > i::after {
    bottom: 0.55rem;
}

.wr-handoff-tear {
    position: absolute;
    z-index: 5;
    top: 0.7rem;
    bottom: 0.7rem;
    left: 4.9rem;
    width: 1.1rem;
    pointer-events: none;
    opacity: var(--wr-tear-progress, 0);
    transform: translate3d(calc(var(--wr-tear-progress, 0) * 0.28rem), 0, 0);
}

.wr-handoff-tear::before,
.wr-handoff-tear::after {
    position: absolute;
    left: 0;
    width: 0.9rem;
    height: 45%;
    border-left: 1px solid rgba(109, 97, 90, 0.46);
    content: "";
}

.wr-handoff-tear::before {
    top: 0;
    transform: skewX(-4deg);
}

.wr-handoff-tear::after {
    bottom: 0;
    transform: skewX(4deg);
}

.wr-handoff-main-ticket {
    position: relative;
    z-index: 2;
    min-width: 0;
    flex: 1 1 auto;
    padding: 1rem 1.1rem;
    overflow: hidden;
    border-left: 0;
    border-radius: 0 0.75rem 0.75rem 0;
    transform: translate3d(calc(var(--wr-tear-progress, 0) * 0.25rem), 0, 0);
}

.wr-handoff-ticket-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--wr-handoff-rule);
}

.wr-handoff-ticket-head > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.wr-handoff-ticket-head strong {
    color: var(--wr-handoff-ink);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.wr-handoff-ticket-head small {
    color: var(--wr-handoff-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.wr-handoff-ticket-head code {
    flex: 0 0 auto;
    color: var(--wr-handoff-rose);
    font: 700 0.75rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.wr-handoff-destination {
    display: grid;
    grid-template-columns: minmax(4.8rem, auto) minmax(3rem, 1fr) minmax(4.8rem, auto);
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 0 0.75rem;
    border-bottom: 1px solid var(--wr-handoff-rule);
}

.wr-handoff-destination > div:last-child {
    text-align: right;
}

.wr-handoff-destination small,
.wr-handoff-destination strong {
    display: block;
}

.wr-handoff-destination small {
    margin-bottom: 0.15rem;
    color: var(--wr-handoff-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.wr-handoff-destination strong {
    color: var(--wr-handoff-copy);
    font-size: 0.86rem;
    font-weight: 700;
}

.wr-handoff-track {
    position: relative;
    display: flex;
    height: 1.75rem;
    align-items: center;
    justify-content: space-between;
}

.wr-handoff-track::before,
.wr-handoff-track b {
    position: absolute;
    top: 50%;
    right: 0.25rem;
    left: 0.25rem;
    height: 2px;
    content: "";
    transform: translateY(-50%);
}

.wr-handoff-track::before {
    background: rgba(24, 63, 64, 0.3);
}

.wr-handoff-track b {
    background: var(--wr-handoff-rose);
    transform: translateY(-50%) scaleX(var(--wr-ticket-journey, 0));
    transform-origin: left center;
}

.wr-handoff-track i {
    position: relative;
    z-index: 1;
    width: 0.65rem;
    height: 0.65rem;
    border: 2px solid var(--wr-handoff-paper);
    border-radius: 50%;
    background: var(--wr-handoff-rose);
    box-shadow: 0 0 0 1px var(--wr-handoff-rose);
}

.wr-handoff-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    padding-top: 0.75rem;
}

.wr-handoff-details div {
    min-width: 0;
}

.wr-handoff-details div:last-child {
    text-align: right;
}

.wr-handoff-details dt {
    margin-bottom: 0.1rem;
    color: var(--wr-handoff-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.wr-handoff-details dd {
    overflow: hidden;
    color: var(--wr-handoff-copy);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wr-handoff-details div:last-child dd {
    color: var(--wr-handoff-rose);
}

[data-wr-handoff-ticket-state] {
    opacity: 1;
    transform: translateX(0);
    transition:
        opacity var(--wr-motion-micro) ease,
        transform var(--wr-motion-action) var(--wr-ease-glide);
}

[data-wr-handoff-ticket-state][data-wr-label-state="changing"] {
    opacity: 0.38;
    transform: translateX(2px);
}

.wr-handoff-status {
    min-height: 2.75rem;
    margin-top: 0.65rem !important;
    padding-left: 3.4rem;
    color: var(--wr-handoff-muted);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.55;
}

.wr-handoff-announcer {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    margin: -1px;
    white-space: nowrap;
}

.wr-handoff.is-dragging .wr-handoff-stub,
.wr-handoff.is-dragging .wr-handoff-main-ticket,
.wr-handoff.is-dragging .wr-handoff-tear {
    transition: none !important;
}

.wr-handoff.is-settling .wr-handoff-stub,
.wr-handoff.is-settling .wr-handoff-main-ticket,
.wr-handoff.is-settling .wr-handoff-tear {
    transition:
        transform var(--wr-motion-action) var(--wr-ease-glide),
        opacity var(--wr-motion-micro) ease;
}

@media (max-width: 575.98px) {
    .wr-handoff-caption {
        margin-bottom: 0.45rem !important;
    }

    .wr-handoff-scene {
        padding-left: 2rem;
    }

    .wr-handoff-ticket-pair,
    .wr-handoff-stub,
    .wr-handoff-main-ticket {
        min-height: 10.5rem;
        height: 10.5rem;
    }

    .wr-handoff-stub {
        width: 3.45rem;
        flex-basis: 3.45rem;
        padding-inline: 0.35rem;
        transform:
            translate3d(calc(var(--wr-tear-progress, 0) * -2.15rem), 0, 0)
            rotate(calc(var(--wr-tear-progress, 0) * -1.2deg));
    }

    .wr-handoff-stub > i {
        display: none;
    }

    .wr-handoff-tear {
        left: 3.25rem;
        width: 0.75rem;
    }

    .wr-handoff-main-ticket {
        padding: 0.78rem;
    }

    .wr-handoff-ticket-head {
        gap: 0.4rem;
        padding-bottom: 0.55rem;
    }

    .wr-handoff-ticket-head small {
        font-size: 0.75rem;
    }

    .wr-handoff-ticket-head code {
        font-size: 0.75rem;
    }

    .wr-handoff-destination {
        grid-template-columns: auto 1fr auto;
        gap: 0.4rem;
        padding-block: 0.65rem;
    }

    .wr-handoff-destination small {
        font-size: 0.75rem;
    }

    .wr-handoff-destination strong {
        font-size: 0.76rem;
    }

    .wr-handoff-details {
        display: none;
    }

    .wr-handoff-details dt,
    .wr-handoff-details dd {
        font-size: 0.75rem;
    }

    .wr-handoff-status {
        min-height: 2.35rem;
        margin-top: 0.4rem !important;
        padding-left: 2rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 359.98px) {
    .wr-handoff-ticket-head small,
    .wr-handoff-destination small,
    .wr-handoff-stub span {
        display: none;
    }

    .wr-handoff-destination strong {
        white-space: nowrap;
    }

    .wr-handoff-stub {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wr-handoff *,
    .wr-handoff *::before,
    .wr-handoff *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

@media (max-width: 575.98px) {
    .wr-handoff-scene {
        padding-left: 1.25rem;
    }

    .wr-handoff-ticket-pair,
    .wr-handoff-stub,
    .wr-handoff-main-ticket {
        min-height: 9rem;
        height: 9rem;
    }

    .wr-handoff-stub {
        width: 3.15rem;
        flex-basis: 3.15rem;
        padding-block: 0.65rem;
    }

    .wr-handoff-stub span,
    .wr-handoff-stub strong,
    .wr-handoff-ticket-head code,
    .wr-handoff-destination small {
        font-size: 0.75rem;
    }

    .wr-handoff-tear {
        left: 2.95rem;
    }

    .wr-handoff-main-ticket {
        padding: 0.7rem;
    }

    .wr-handoff-ticket-head {
        padding-bottom: 0.45rem;
    }

    .wr-handoff-ticket-head strong,
    .wr-handoff-destination strong {
        font-size: 0.875rem;
    }

    .wr-handoff-destination {
        padding-block: 0.55rem;
    }
}
