.reward-page {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
    background: var(--bg-color);
}

.reward-page .reward-section {
    margin-bottom: 10px;
    padding: 15px;
    background: #fff;
}

.reward-page .reward-section h2 {
    color: var(--text-main);
    font-size: 14px;
    font-weight: bold;
}

.reward-page .recipient-picker {
    display: flex;
    width: 100%;
    min-height: 66px;
    margin-top: 10px;
    align-items: center;
    color: var(--text-main);
    text-align: left;
}

.reward-page .recipient-picker .avatar {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    margin: 0 12px 0 0;
}

.reward-page .recipient-info {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.reward-page .recipient-info strong {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reward-page .recipient-info .recipient-placeholder {
    color: #666;
    font-weight: normal;
}

.reward-page .recipient-info small {
    margin-top: 4px;
    color: var(--text-sub);
    font-size: 11px;
}

.reward-page .recipient-picker > i {
    flex: 0 0 auto;
    color: var(--text-sub);
    font-size: 12px;
}

.reward-page .gift-grid {
    display: grid;
    margin-top: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.reward-page .gift-option {
    display: flex;
    min-width: 0;
    min-height: 112px;
    padding: 10px 4px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
}

.reward-page .gift-option.active {
    border-color: var(--primary-color);
    background: #fff5f7;
}

.reward-page .gift-visual {
    display: flex;
    width: 48px;
    height: 48px;
    margin-bottom: 7px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 22px;
}

.reward-page .gift-tone-pink { background: #ffe8ee; color: #e64980; }
.reward-page .gift-tone-green { background: #e6f7ef; color: #268d62; }
.reward-page .gift-tone-yellow { background: #fff4cc; color: #b98500; }
.reward-page .gift-tone-blue { background: #e8f1ff; color: #3976c6; }
.reward-page .gift-tone-purple { background: #f2eaff; color: #8056c9; }
.reward-page .gift-tone-red { background: #ffe9e6; color: #cf5547; }

.reward-page .gift-option strong,
.reward-page .gift-option > span:last-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reward-page .gift-option strong {
    font-size: 12px;
}

.reward-page .gift-option > span:last-child {
    margin-top: 4px;
    color: var(--text-sub);
    font-size: 10px;
}

.reward-page .gift-error,
.reward-page .balance-warning {
    margin-top: 10px;
    color: #d84b4b;
    font-size: 12px;
}

.reward-page .quantity-section {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reward-page .quantity-section p {
    margin-top: 5px;
    color: var(--text-sub);
    font-size: 11px;
}

.reward-page .quantity-picker {
    display: flex;
    min-width: 116px;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    border-radius: 17px;
    background: #f5f5f5;
}

.reward-page .quantity-picker button {
    display: flex;
    width: 36px;
    height: 34px;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 11px;
}

.reward-page .quantity-picker button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.reward-page .quantity-picker strong {
    min-width: 30px;
    font-size: 14px;
    text-align: center;
}

.reward-page .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reward-page .section-heading > span {
    color: var(--text-sub);
    font-size: 11px;
}

.reward-page .section-heading b {
    font-weight: normal;
}

.reward-page .reward-message {
    width: 100%;
    min-height: 72px;
    margin-top: 12px;
    padding: 10px;
    resize: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: 0;
    background: #fafafa;
    color: var(--text-main);
    font-size: 13px;
}

.reward-page .reward-message::placeholder {
    color: #bbb;
}

.reward-page .payment-section {
    position: relative;
}

.reward-page .payment-options {
    margin-top: 10px;
}

.reward-page .payment-option {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    text-align: left;
}

.reward-page .payment-option:last-child {
    border-bottom: 0;
}

.reward-page .payment-icon {
    display: flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 17px;
}

.reward-page .beans-icon {
    background: #f0ad22;
}

.reward-page .wechat-icon {
    background: #22a85a;
}

.reward-page .payment-info {
    display: flex;
    min-width: 0;
    flex: 1;
    margin-left: 10px;
    flex-direction: column;
}

.reward-page .payment-info strong {
    font-size: 13px;
    font-weight: normal;
}

.reward-page .payment-info small {
    margin-top: 3px;
    color: var(--text-sub);
    font-size: 10px;
}

.reward-page .payment-radio {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1px solid #ccc;
    border-radius: 50%;
}

.reward-page .payment-option.active .payment-radio {
    border-color: var(--primary-color);
}

.reward-page .payment-option.active .payment-radio::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    content: "";
}

.reward-page .reward-checkout {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    display: flex;
    width: 100%;
    max-width: 750px;
    min-height: calc(64px + env(safe-area-inset-bottom));
    margin: 0 auto;
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-top: 1px solid var(--border-color);
    background: #fff;
}

.reward-page .reward-total {
    display: flex;
    min-width: 0;
    flex-direction: column;
    color: var(--text-sub);
    font-size: 11px;
}

.reward-page .reward-total strong {
    margin-top: 2px;
    color: var(--primary-color);
    font-size: 16px;
}

.reward-page .reward-submit {
    min-width: 116px;
    min-height: 40px;
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--primary-color);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.reward-page .reward-submit:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.reward-page.reward-layer-open {
    overflow-y: hidden;
}

.reward-page .reward-layer {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    align-items: flex-end;
}

.reward-page .reward-layer-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.42);
}

.reward-page .reward-sheet {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: calc(100vh - 44px);
    max-height: calc(100dvh - 44px);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    background: #fff;
}

.reward-page .reward-sheet-header {
    display: flex;
    min-height: 52px;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.reward-page .reward-sheet-header h2 {
    font-size: 16px;
    font-weight: bold;
}

.reward-page .reward-sheet-close {
    width: 36px;
    height: 36px;
    color: var(--text-sub);
    font-size: 18px;
}

.reward-page .staff-sheet {
    display: flex;
    flex-direction: column;
}

.reward-page .staff-search {
    display: flex;
    min-height: 38px;
    margin: 12px 15px 6px;
    padding: 0 12px;
    align-items: center;
    gap: 8px;
    border-radius: 19px;
    background: #f5f5f5;
    color: var(--text-sub);
}

.reward-page .staff-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 12px;
}

.reward-page .staff-options {
    min-height: 0;
    flex: 1;
    padding: 0 15px calc(8px + env(safe-area-inset-bottom));
    overflow-y: auto;
}

.reward-page .staff-option {
    display: flex;
    width: 100%;
    min-height: 62px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    text-align: left;
}

.reward-page .staff-option .avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    margin: 0 10px 0 0;
}

.reward-page .staff-option > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.reward-page .staff-option strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reward-page .staff-option small {
    margin-top: 3px;
    color: var(--text-sub);
    font-size: 10px;
}

.reward-page .staff-option > i {
    visibility: hidden;
    color: var(--primary-color);
}

.reward-page .staff-option.active {
    color: var(--primary-color);
}

.reward-page .staff-option.active > i {
    visibility: visible;
}

.reward-page .staff-search-empty {
    padding: 30px 15px calc(30px + env(safe-area-inset-bottom));
    color: var(--text-sub);
    font-size: 12px;
    text-align: center;
}

.reward-page .confirm-summary {
    padding: 8px 15px;
}

.reward-page .confirm-summary > div {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-sub);
    font-size: 13px;
}

.reward-page .confirm-summary > div:last-child {
    border-bottom: 0;
}

.reward-page .confirm-summary strong {
    overflow-wrap: anywhere;
    color: var(--text-main);
    font-weight: normal;
    text-align: right;
}

.reward-page .confirm-summary b {
    font-weight: normal;
}

.reward-page .confirm-summary .confirm-cost {
    color: var(--primary-color);
    font-weight: bold;
}

.reward-page .confirm-actions {
    display: flex;
    gap: 10px;
    padding: 12px 15px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-color);
}

.reward-page .confirm-actions button {
    min-height: 40px;
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    font-size: 14px;
}

.reward-page .confirm-actions .confirm-submit {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.reward-page .success-sheet {
    padding: 32px 20px calc(24px + env(safe-area-inset-bottom));
    text-align: center;
}

.reward-page .success-sheet > i {
    color: #2f9e66;
    font-size: 48px;
}

.reward-page .success-sheet h2 {
    margin-top: 12px;
    font-size: 17px;
    font-weight: bold;
}

.reward-page .success-sheet p {
    margin-top: 8px;
    color: var(--text-sub);
    font-size: 12px;
}

.reward-page .success-sheet a {
    display: inline-flex;
    min-width: 120px;
    min-height: 40px;
    margin-top: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--primary-color);
    color: #fff;
    font-size: 14px;
}

@media (max-width: 359px) {
    .reward-page .gift-grid {
        gap: 6px;
    }

    .reward-page .gift-option {
        min-height: 106px;
        padding-right: 2px;
        padding-left: 2px;
    }
}
