/* ===== 追思先人：分类贡品弹窗 ===== */
.classify-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: cm-fade 0.25s ease;
}
@keyframes cm-fade { from { opacity:0 } to { opacity:1 } }

.classify-panel {
    width: 100%;
    max-width: 520px;
    background: #fafafa;
    border-radius: 18px 18px 0 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cm-up 0.3s ease;
}
@keyframes cm-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.classify-header {
    position: relative;
    padding: 14px 16px 10px;
    background: linear-gradient(135deg, #3c2f2f 0%, #5a4030 100%);
    color: #f5e6c8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.classify-header .title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.classify-header .subtitle {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
}
.classify-header .close {
    width: 22px;
    height: 22px;
    cursor: pointer;
    opacity: 0.85;
    filter: invert(1);
}

.classify-tabs {
    display: flex;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 6px 4px 0;
    flex-shrink: 0;
    scrollbar-width: none;
}
.classify-tabs::-webkit-scrollbar { display: none; }
.classify-tab {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 14px;
    color: #555;
    position: relative;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
.classify-tab.active {
    color: #b8860b;
    font-weight: 600;
}
.classify-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: #b8860b;
}

.classify-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px 8px;
    -webkit-overflow-scrolling: touch;
}
.classify-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    padding: 0 4px;
}
.classify-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.classify-item {
    background: #fff;
    border-radius: 10px;
    padding: 8px 6px 10px;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
    position: relative;
    overflow: hidden;
}
.classify-item:active {
    transform: scale(0.96);
}
.classify-item.selected {
    border-color: #b8860b;
    box-shadow: 0 2px 8px rgba(184,134,11,0.25);
}
.classify-item .img-wrap {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f0e6d8;
    margin-bottom: 6px;
}
.classify-item .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.classify-item .name {
    font-size: 12px;
    color: #333;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.classify-item .price {
    font-size: 11px;
    color: #d35454;
    margin-top: 2px;
    font-weight: 600;
}
.classify-item .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #d35454;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    z-index: 2;
}

.classify-footer {
    background: #fff;
    padding: 10px 14px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
.classify-footer .picked {
    font-size: 12px;
    color: #888;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.classify-footer .picked b {
    color: #b8860b;
    margin: 0 4px;
}
.classify-footer .pay-btn {
    background: linear-gradient(135deg, #e6b86f 0%, #b8860b 100%);
    color: #fff;
    border: 0;
    border-radius: 22px;
    padding: 8px 22px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(184,134,11,0.4);
    flex-shrink: 0;
}
.classify-footer .pay-btn[disabled] {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

/* 确认支付弹窗 */
.pay-confirm-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cm-fade 0.2s;
}
.pay-confirm {
    width: 86%;
    max-width: 360px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    animation: cm-pop 0.25s ease;
}
@keyframes cm-pop { from { transform: scale(0.85); opacity:0 } to { transform: scale(1); opacity:1 } }
.pay-confirm .hd {
    background: linear-gradient(135deg, #3c2f2f 0%, #5a4030 100%);
    color: #f5e6c8;
    padding: 14px 16px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}
.pay-confirm .bd {
    padding: 18px 16px;
    text-align: center;
}
.pay-confirm .bd img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: #f0e6d8;
    display: block;
    border: 3px solid #b8860b;
}
.pay-confirm .item-name {
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}
.pay-confirm .price {
    font-size: 22px;
    color: #d35454;
    font-weight: 700;
    margin: 6px 0 14px;
}
.pay-confirm .payer-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 14px;
    text-align: center;
}
.pay-confirm .btns {
    display: flex;
    gap: 10px;
}
.pay-confirm .btns button {
    flex: 1;
    padding: 11px 0;
    border: 0;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.pay-confirm .btns .cancel {
    background: #eee;
    color: #555;
}
.pay-confirm .btns .ok {
    background: linear-gradient(135deg, #e6b86f 0%, #b8860b 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(184,134,11,0.4);
}

/* 支付成功后大图弹出动画 */
.libation-flash-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.libation-flash-img {
    width: 240px;
    height: 240px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 0 60px 8px rgba(255, 215, 130, 0.7);
    animation: libation-flash-anim 3.4s ease-in-out forwards;
}
@keyframes libation-flash-anim {
    0%   { transform: scale(0.2); opacity: 0; filter: blur(8px); }
    18%  { transform: scale(1.0); opacity: 1; filter: blur(0); }
    28%  { transform: scale(1.2); opacity: 1; filter: blur(0); }
    70%  { transform: scale(1.4); opacity: 1; filter: blur(0); }
    100% { transform: scale(0.6); opacity: 0; filter: blur(6px); }
}

/* 用户已贡品展示列表（底部一行小图） */
.libation-wall {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(255,255,255,0.0);
    flex-wrap: wrap;
    justify-content: center;
}
.libation-wall::-webkit-scrollbar { display: none; }
.libation-wall-item {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #f5e6c8;
    background: #fff;
    flex: 0 0 auto;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.libation-wall-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.libation-wall-item .days {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 9px;
    color: #fff;
    background: rgba(0,0,0,0.55);
    padding: 1px 0;
    line-height: 1;
}

/* 桌面端调宽 */
@media (min-width: 600px) {
    .classify-item .name { font-size: 13px; }
    .classify-grid { grid-template-columns: repeat(4, 1fr); }
}
