/**
 * 顶栏「返回上一页」统一样式（运势报告 / 订单 / 真人老师等）
 * 用法：<button type="button" class="xy-page-back" aria-label="返回"></button>
 * 文字链：<a class="xy-text-back" href="...">返回首页</a>
 */

.xy-page-back,
button.ft-back,
button.mo-back,
button.at-back {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(120, 108, 92, 0.2);
    border-radius: 999px;
    background: rgba(255, 252, 246, 0.96);
    color: #5a4e40;
    font-size: 0;
    line-height: 0;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: 0 1px 3px rgba(42, 30, 18, 0.05);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.12s ease;
}

.xy-page-back::before,
button.ft-back::before,
button.mo-back::before,
button.at-back::before {
    content: '';
    display: block;
    width: 0.52rem;
    height: 0.52rem;
    margin-left: 0.14rem;
    border-left: 2.2px solid currentColor;
    border-bottom: 2.2px solid currentColor;
    transform: rotate(45deg);
    pointer-events: none;
}

.xy-page-back:hover,
button.ft-back:hover,
button.mo-back:hover,
button.at-back:hover {
    background: #fff8ea;
    border-color: rgba(232, 184, 106, 0.55);
    color: #3a2f21;
}

.xy-page-back:active,
button.ft-back:active,
button.mo-back:active,
button.at-back:active {
    transform: scale(0.96);
    background: #f3e8d4;
}

.xy-page-back:focus-visible,
button.ft-back:focus-visible,
button.mo-back:focus-visible,
button.at-back:focus-visible {
    outline: 2px solid rgba(232, 184, 106, 0.7);
    outline-offset: 2px;
}

/* 文字型返回（← 返回 / 返回首页） */
.xy-text-back,
a.legal-back,
a.auth-card__back,
a.plus-poster-back,
a.rp-back,
button.hd-lifebook-back {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    margin: 0;
    padding: 0.2rem 0.1rem;
    border: none;
    background: transparent;
    color: #8c6632;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.xy-text-back:hover,
a.legal-back:hover,
a.auth-card__back:hover,
a.plus-poster-back:hover,
a.rp-back:hover,
button.hd-lifebook-back:hover {
    color: #6a4a22;
    text-decoration: none;
}

button.hd-lifebook-back[hidden] {
    display: none !important;
}
