/* The active header renders this control as the first item in its navigation row. */
a.vp-page-return {
    --vp-back-ink: #653149;
    --vp-back-edge: #d9bdc8;
    --vp-back-fill: #fff6f9;
    --vp-back-hover: #f6e4eb;
    color: var(--vp-back-ink);
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    border-radius: 11px;
    vertical-align: middle;
    text-decoration: none;
    line-height: 1;
    touch-action: manipulation;
}

[data-vp-header-shell] .vp-header-back,
.vp-rehearsal-bar .vp-header-back {
    --vp-back-ink: #fff5fa;
    --vp-back-edge: rgb(255 229 241 / 35%);
    --vp-back-fill: rgb(255 235 244 / 9%);
    --vp-back-hover: rgb(255 235 244 / 20%);
}

/* The distraction-free rehearsal editor keeps the same leading navigation frame. */
.vp-rehearsal-bar {
    background: #4d2634;
    color: #fff5fa;
}
.vp-rehearsal-bar__inner {
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 50px;
    margin-inline: auto;
    padding-inline: max(4px, env(safe-area-inset-left)) max(4px, env(safe-area-inset-right));
}
@media (min-width: 901px) {
    .vp-rehearsal-bar__inner {
        width: calc(100% - 24px);
        max-width: 1050px;
        min-height: 60px;
        padding-inline: 0;
    }
}

/* The frame is smaller than the hit area so it sits lightly beside the logotype. */
a.vp-page-return::before {
    content: "";
    position: absolute;
    inset: 5px 3px;
    border: 1px solid var(--vp-back-edge);
    border-radius: 11px 8px 8px 11px;
    background: var(--vp-back-fill);
    pointer-events: none;
}

a.vp-page-return > .vp-return-glyph,
.vp-return-local > .vp-return-glyph {
    position: relative;
    display: inline-block;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    pointer-events: none;
}

a.vp-page-return:is(:hover, :focus, :active) {
    color: var(--vp-back-ink);
    text-decoration: none;
}
@media (hover: hover) {
    a.vp-page-return[href]:hover::before { background: var(--vp-back-hover); }
}
a.vp-page-return[href]:active::before { background: var(--vp-back-hover); border-color: currentColor; }
a.vp-page-return[href]:focus-visible { outline: 2px solid currentColor; outline-offset: -1px; }
a.vp-page-return[aria-disabled="true"] { opacity: .55; cursor: default; }

/* Dialog steps keep their own navigation and surfaces. */
:is(a, button).vp-return-local {
    box-sizing: border-box !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    text-align: center;
    justify-content: center;
}
.vp-return-local:focus-visible { outline: 3px solid #98345b; outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
@media (forced-colors: active) {
    a.vp-page-return::before { border-color: ButtonText; }
    a.vp-page-return[href]:focus-visible { outline-color: Highlight; }
    a.vp-page-return[aria-disabled="true"] { color: GrayText; opacity: 1; }
}
@media print {
    .vp-page-return, .vp-return-local { display: none !important; }
}
