/* ============================================================
   黑白之地 · 官网充值中心
   浅色现代风格：渐变 Banner / 卡片悬浮 / 弹窗动效 / 骨架屏
   ============================================================ */

:root {
    --primary: #3f7cff;
    --primary-dark: #2f63d8;
    --primary-light: #eef4ff;
    --wechat: #09bb07;
    --alipay: #1677ff;
    --gold: #f5a623;
    --text-1: #1f2329;
    --text-2: #646a73;
    --text-3: #8f959e;
    --bg: #f4f6fa;
    --card: #ffffff;
    --border: #e5e9f0;
    --radius: 14px;
    --shadow-sm: 0 1px 3px rgba(31, 35, 41, 0.06);
    --shadow-md: 0 6px 20px rgba(31, 35, 41, 0.10);
    --shadow-lg: 0 12px 40px rgba(31, 35, 41, 0.16);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(160deg, #e4f0ff 0%, #fdeef7 45%, #eaf6ff 100%);
    background-attachment: fixed;
    color: var(--text-1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ==================== 顶部导航 ==================== */

.site-header {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 1rem;
}

.header-home { color: #fbedd4; padding: .5rem 0; text-decoration: none; }
.header-home:hover, .header-home:focus-visible { text-decoration: underline; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(63, 124, 255, 0.35);
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.brand-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
}

.brand-sub {
    font-size: 15px;
    color: var(--text-2);
}

.header-user {
    margin-left: auto;
    font-size: 14px;
    color: var(--text-2);
}

/* ==================== 主体 ==================== */

.main {
    max-width: 1080px;
    margin: 34px auto 0;
    padding: 0 24px 40px;
    flex: 1;
    width: 100%;
    position: relative;
    z-index: 2;
}

.panel {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(100, 130, 200, 0.12);
    padding: 26px 28px;
    margin-bottom: 22px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.panel-title h2 {
    font-size: 18px;
    font-weight: 600;
}

.step-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== 登录表单 ==================== */

.login-form {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.field-grow { flex: 1; }

.field label {
    font-size: 13px;
    color: var(--text-2);
}

.field input,
.field select {
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--text-1);
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.field input:focus,
.field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(63, 124, 255, 0.15);
}

.select-wrap { position: relative; }

.select-wrap::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}

.select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.field-tip {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-3);
}

/* ==================== 用户信息卡 ==================== */

.user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--primary-light);
    border: 1px solid rgba(63, 124, 255, 0.25);
    border-radius: 12px;
    padding: 16px 20px;
    animation: fadeSlideIn 0.35s ease;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-meta { flex: 1; min-width: 0; }

.user-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-server {
    font-size: 13px;
    color: var(--text-2);
}

/* ==================== 按钮 ==================== */

.btn {
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
    font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    height: 44px;
    padding: 0 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(63, 124, 255, 0.35);
}

.btn-primary:hover { box-shadow: 0 6px 16px rgba(63, 124, 255, 0.45); }

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-ghost {
    height: 38px;
    padding: 0 18px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-2);
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    height: 34px;
    padding: 0 16px;
    font-size: 13px;
}

/* ==================== 商品网格（参考原神充值中心） ==================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
}

.product-card {
    background: #fff;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 10px rgba(100, 130, 200, 0.10);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(100, 130, 200, 0.22);
}

/* 图片区：淡蓝渐变底 */
.product-img-wrap {
    background: linear-gradient(150deg, #dce9ff 0%, #b8d2ff 55%, #a8c6f8 100%);
    padding: 26px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrap img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    transition: transform 0.25s;
    filter: drop-shadow(0 6px 12px rgba(60, 90, 160, 0.25));
}

.product-card:hover .product-img-wrap img { transform: scale(1.08); }

/* 信息区 */
.product-body { padding: 14px 14px 16px; }

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 12px;
}

.product-price {
    display: block;
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: #3f7cff;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-family: inherit;
}

.product-price:hover { background: #2f63d8; }
.product-price:active { transform: scale(0.97); }

/* 骨架屏 */
.product-card.skeleton {
    cursor: default;
    height: 218px;
    background: linear-gradient(100deg, rgba(255,255,255,0.55) 40%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.55) 60%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

.product-card.skeleton:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(100, 130, 200, 0.10);
}

@keyframes shimmer {
    0% { background-position: 120% 0; }
    100% { background-position: -80% 0; }
}

.agreement-tip {
    text-align: center;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
}

.agreement-tip a {
    color: var(--primary);
    text-decoration: none;
}

/* ==================== 收银台弹窗 ==================== */

.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 30, 0.55);
    backdrop-filter: blur(3px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 430px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: popIn 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
    max-height: 92vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px 0;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
    color: var(--text-1);
    background: var(--bg);
}

.order-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 22px 0;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: 12px;
}

.order-product {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.order-product img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.order-product-name {
    font-size: 14px;
    font-weight: 600;
}

.order-product-target {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}

.order-amount {
    font-size: 20px;
    font-weight: 800;
    color: #f5222d;
    white-space: nowrap;
}

/* 支付方式 tabs */

.pay-tabs {
    display: flex;
    gap: 10px;
    padding: 16px 22px 0;
}

.pay-tab {
    flex: 1;
    height: 46px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    font-family: inherit;
}

.pay-tab.active { border-color: var(--primary); color: var(--text-1); background: var(--primary-light); }

.pay-tab-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: inline-block;
}

/* 二维码区 */

.qr-area {
    margin: 18px 22px 0;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--text-2);
    font-size: 14px;
    padding: 40px 0;
}

.spinner {
    width: 34px;
    height: 34px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.spinner.header-session-spinner {
    width: 18px;
    height: 18px;
    border-width: 2px;
    border-color: #645b4c;
    border-top-color: #ffe5a8;
}

@media (prefers-reduced-motion: reduce) {
    .header-session-spinner { animation: none; }
}

.qr-box {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    line-height: 0;
}

.qr-box img { width: 220px; height: 220px; }

/* 支付宝：新窗口收银台的等待面板 */
.qr-redirect {
    text-align: center;
    padding: 30px 10px;
}

.redirect-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: rgba(22, 119, 255, 0.1);
    color: var(--alipay);
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.redirect-text {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.8;
    margin-bottom: 18px;
}

.qr-error {
    text-align: center;
    padding: 40px 0;
    color: var(--text-2);
    font-size: 14px;
}

.qr-error p { margin-bottom: 14px; }

.qr-tip {
    text-align: center;
    font-size: 13px;
    color: var(--text-2);
    padding: 14px 22px 0;
}

.modal-footer {
    display: flex;
    justify-content: center;
    padding: 16px 22px 22px;
}

.btn-block {
    width: 100%;
}

/* 支付成功 */

.pay-success {
    text-align: center;
    padding: 36px 30px 34px;
    animation: fadeSlideIn 0.35s ease;
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34c759, #28a745);
    color: #fff;
    font-size: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(52, 199, 89, 0.4);
    animation: popIn 0.4s cubic-bezier(0.34, 1.5, 0.64, 1);
}

.pay-success h3 {
    font-size: 19px;
    margin-bottom: 8px;
}

.pay-success p {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 22px;
}

/* ==================== Toast ==================== */

.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(31, 35, 41, 0.88);
    color: #fff;
    font-size: 14px;
    padding: 11px 22px;
    border-radius: 999px;
    z-index: 300;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.25s ease;
    max-width: 86vw;
    text-align: center;
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==================== 页脚 ==================== */

.site-footer {
    text-align: center;
    padding: 26px 20px 30px;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.9;
}

/* ==================== 响应式 ==================== */

@media (max-width: 640px) {
    .main { padding: 0 14px 30px; margin-top: 20px; }
    .panel { padding: 20px 16px; }
    .login-form { flex-direction: column; align-items: stretch; }
    .field { min-width: 0; }
    .login-form .btn { width: 100%; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .modal { max-width: 100%; }
}
/* Official storefront */
body { background: #161a22; color: #f6f2e9; }
.site-header { background: #10141b; border-color: #333039; }
.brand { text-decoration: none; }
.brand-logo { width: 106px; height: 44px; object-fit: contain; }
.brand-sub, .site-footer, .header-user .btn-ghost { color: #eee6d5; }
.header-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    min-width: 0;
    gap: .5rem;
}
.header-points {
    padding: .35rem .55rem;
    border-radius: .4rem;
    background: #332b25;
    color: #ffe5a8;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.header-user .header-role { max-width: min(43vw, 18rem); color: #eee6d5;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { width: min(1120px, calc(100% - 2rem)); margin: 1.5rem auto; }
/* A compact identity banner keeps products prominent on the first screen. */
.shop-hero { min-height: clamp(112px, 14vw, 160px); display: grid; align-content: center;
    justify-items: start; gap: .5rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: .75rem;
    border: 1px solid #454552;
    background: linear-gradient(90deg, rgba(13,18,26,.94), rgba(13,18,26,.5)),
        url('../img/world-dual.png') center 48% / cover, #282b36; }
.shop-hero h1 { font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.35; margin: 0; }
.shop-nav { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0; }
.shop-nav a { color: #fbedd4; background: #292d37; padding: .6rem .9rem; border-radius: .4rem; text-decoration: none; }
.shop-section { margin: 2rem 0; scroll-margin-top: 5rem; }
.shop-section h2 { margin-bottom: .8rem; }
.shop-section .product-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 192px), 1fr)); }
.shop-section .product-card { color: #fff2dc; background: #262933; border: 1px solid #454552;
    padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.shop-section .product-card img { width: 100%; height: 102px; object-fit: contain; }
.shop-section .product-card .btn { margin-top: auto; }
.shop-section .product-card p { color: #e5d8c3; text-align: center; }
#shop-feedback { margin: .75rem 0; color: #ffda92; }
#redeem-dialog { margin: auto; width: min(28rem, calc(100% - 2rem)); border: 0; padding: 1.5rem; border-radius: .75rem; }
#redeem-dialog::backdrop { background: rgba(0,0,0,.66); }
.redeem-actions { display: flex; justify-content: flex-end; gap: .55rem; margin-top: 1rem; }
.modal { color: #20232b; }

.site-header .btn-ghost { background: #252a35; border-color: #585360; }
.site-header .btn-ghost:hover { background: #383d4b; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.brand-logo { object-fit: cover; box-shadow: none; border-radius: 0; }
#gold-grid, #special-grid, #season-grid, #vip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.shop-section .purchase-card {
    position: relative;
    min-height: 17rem;
    padding: 1rem;
    gap: .65rem;
    cursor: pointer;
    background: radial-gradient(ellipse at 50% 43%, #3e6265 0%, #293e48 48%, #202b36 82%);
    border-color: #4c626a;
}
.shop-section .purchase-card h3 {
    font-size: clamp(1rem, 2vw, 1.25rem);
    text-align: center;
    overflow-wrap: anywhere;
}
.shop-section .purchase-card .product-art {
    height: 8.5rem;
    max-width: 80%;
    margin-block: auto;
    filter: drop-shadow(0 .45rem .6rem #13182180);
}
.purchase-quantity {
    padding: .2rem .9rem;
    border: 1px solid #f6d695;
    border-radius: 6px;
    background: #e9bb6b;
    color: #302118;
    font-weight: 700;
}
.purchase-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    column-gap: .5rem;
    row-gap: .4rem;
    margin-top: auto;
    padding-top: .35rem;
}
.purchase-points {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .7rem;
    clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
    background: #ebdfbf;
    color: #302719;
    font-size: .84rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.purchase-points-icon {
    width: 1rem;
    height: .7rem;
    border-radius: 2px;
    background: #805724;
    display: inline-grid;
    flex: none;
    place-items: center;
    transform: rotate(-12deg);
}
.purchase-points-icon::before {
    content: "";
    width: .4rem;
    height: .4rem;
    border: 1px solid #fae3a6;
    border-radius: 50%;
}
.shop-section .purchase-footer .btn {
    margin: 0 0 0 auto;
    height: 41px;
    padding: 0 .75rem;
    box-shadow: none;
    background: #111a24;
    border: 1px solid #789098;
    white-space: nowrap;
}
/* Extend the native purchase button over the paid card. */
.purchase-footer .btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
}
.purchase-footer .btn:focus-visible::after {
    outline: 2px solid #f6d695;
    outline-offset: -3px;
}
.shop-section .purchase-footer .btn:active { transform: none; }
.shop-section .purchase-footer .btn:hover { background: #344951; }
#reward-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
#redemption-list { padding: 1rem 0 0 1.25rem; }
@media (max-width: 840px) {
    #gold-grid, #special-grid, #season-grid, #vip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
    .brand-sub { display: none; }
    .header-inner { gap: .5rem; padding: .65rem .75rem; }
    .brand-logo { width: 74px; }
}
@media (max-width: 520px) {
    #gold-grid, #special-grid, #season-grid, #vip-grid { grid-template-columns: minmax(0, 1fr); }
}

.header-user select {
    max-width: min(43vw, 18rem);
    padding: .55rem;
    color: #eee6d5;
    background: #252a35;
    border: 1px solid #585360;
    border-radius: .4rem;
}
.purchase-card:has(button:disabled) { cursor: default; }
.shop-section .purchase-footer .btn:disabled { opacity: .65; cursor: default; }

.shop-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .5rem;
}
#redemption-history-btn,
#redemption-history-dialog .btn-ghost {
    color: #eee6d5;
    background: #252a35;
    border-color: #585360;
}
#redemption-history-btn:hover,
#redemption-history-dialog .btn-ghost:hover { background: #383d4b; }
#redemption-history-btn:focus-visible,
#redemption-history-dialog .btn-ghost:focus-visible {
    outline: 2px solid #ffe5a8;
    outline-offset: 2px;
}
.shop-nav a[aria-current="page"] { background: #66512e; color: #ffe5a8; }
#redemption-history-dialog {
    margin: auto;
    width: min(640px, calc(100vw - 2rem));
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.5rem;
    border: 1px solid #585360;
    border-radius: .75rem;
    background: #1b202b;
    color: #eee6d5;
}
#redemption-history-dialog::backdrop { background: rgba(0, 0, 0, .65); }
#redemption-history-dialog .shop-section-heading {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
#redemption-history-title { grid-column: 2; }
#redemption-history-dialog .shop-section-heading form { justify-self: end; }
#redemption-list { list-style: none; padding: 0; margin: 1rem 0 0; }
#redemption-list li { padding: .9rem 0; border-top: 1px solid #383d48; }
#redemption-list p { margin: .4rem 0 0; overflow-wrap: anywhere; }
#redemption-list .redemption-meta { color: #b7b4bd; font-size: .85rem; }
#payment-refresh { margin: 0 .35rem .35rem 0; }

/* Season dates and points purpose have one shared home above the catalogue. */
.shop-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem; margin-top: 1rem; }
.season-summary, .points-guide { min-width: 0; padding: 1rem 1.1rem; border: 1px solid #454552; border-radius: .65rem; background: #202630; }
.season-summary { display: flex; flex-wrap: wrap; align-content: center; align-items: baseline; gap: .4rem .8rem; }
.season-summary strong { font-size: 1rem; }
#shop-season-dates { color: #d4cfc5; font-size: .875rem; }
#shop-season-countdown { color: #ffe5a8; font-size: .875rem; }
.points-guide { display: flex; align-items: center; gap: .8rem; }
.points-guide strong { font-size: 1rem; }
.points-guide p { color: #d4cfc5; font-size: .875rem; line-height: 1.65; margin-top: .3rem; }
.points-guide a, .pay-points a { color: #ffe5a8; text-underline-offset: 3px; white-space: nowrap; }
.points-guide .purchase-points-icon { width: 1.7rem; height: 1.1rem; }
.points-guide .purchase-points-icon::before { width: .65rem; height: .65rem; }
.shop-nav { align-items: center; gap: .7rem; }
.shop-anchor-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: .5rem 0 1.4rem; padding-bottom: .9rem; border-bottom: 1px solid #454552; }
.shop-anchor-nav a { color: #eee6d5; font-size: .9rem; text-decoration: none; }
.shop-anchor-nav a:hover { color: #ffe5a8; text-decoration: underline; }
.shop-section-intro { margin: -.2rem 0 1rem; color: #bfbcc5; line-height: 1.7; font-size: .9rem; }
.header-points { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; border: 1px solid #8b744d; }
.header-points:hover { border-color: #ffe5a8; }
.header-points .purchase-points-icon { width: 1.2rem; height: .85rem; }
#season-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#vip-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shop-section .catalog-card { align-items: stretch; min-height: 22rem; gap: .65rem; padding: 1.2rem; }
.shop-section .catalog-season { background: radial-gradient(ellipse at 50% 35%, #514c60, #2c303f 65%, #222633); border-color: #747082; }
.shop-section .catalog-vip { background: radial-gradient(ellipse at 50% 35%, #46493e, #2b3438 65%, #222c33); }
.catalog-badge { align-self: flex-start; padding: .25rem .6rem; border: 1px solid #c5a45f; border-radius: .3rem; background: #f2d997; color: #332817; font-size: .875rem; font-weight: 700; }
.catalog-limit { align-self: flex-start; padding: .25rem .6rem; border: 1px solid #9b8356; border-radius: .3rem; background: #302c25; color: #ffe5a8; font-size: .875rem; }
.shop-section .catalog-card h3 { text-align: left; font-size: 1.2rem; }
.shop-section .catalog-card .product-art { align-self: center; height: 6rem; width: 6rem; max-width: 100%; margin: .4rem auto; image-rendering: pixelated; }
.shop-section .catalog-card > p { text-align: left; color: #e0dcd4; font-size: .9rem; line-height: 1.8; }
.shop-section .catalog-card > .catalog-description { white-space: pre-line; }
.catalog-card .purchase-footer { gap: .6rem; container-type: inline-size; }
.catalog-status-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .12rem;
    line-height: 1.05;
}
.catalog-status-button strong { font-variant-numeric: tabular-nums; }
.catalog-button-status { font-size: .8rem; }
@container (min-width: 14rem) {
    .catalog-status-button { flex-direction: row; gap: .35rem; }
    .catalog-button-status { font-size: inherit; }
}
.catalog-card .purchase-points { font-size: .875rem; }
#vip-grid .purchase-footer { column-gap: .35rem; }
#vip-grid .purchase-points { gap: .25rem; padding-inline: .45rem; }
#vip-grid .purchase-footer .btn { padding-inline: .45rem; }
.shop-section .catalog-card > .catalog-state { font-size: .875rem; color: #c3bec7; }
.shop-section .catalog-card.is-purchased { background: #30333a; border-color: #65666b; box-shadow: none; cursor: default; }
.catalog-card.is-purchased :is(.product-art, .catalog-limit, .purchase-points) { filter: grayscale(1); opacity: .75; }
.shop-section .catalog-card.is-purchased:hover { transform: none; }
.shop-section .catalog-card.is-pending { background: #292e38; border-style: dashed; box-shadow: none; cursor: default; }
.shop-section .catalog-card.is-pending:hover { transform: none; }
.shop-section .purchase-footer .btn:disabled { background: #3d414b; border-color: #727682; color: #dedfe3; opacity: 1; }
.pay-points { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin: 1rem 22px 0; padding: .85rem 1rem; border: 1px solid #d5c599; border-radius: .65rem; background: #fbf5e8; color: #51452c; font-size: .9rem; line-height: 1.7; }
.pay-points strong { color: #78551d; }
.pay-points a { color: #78551d; }
.pay-points .pay-points-purpose { flex-basis: 100%; }
@media (max-width: 1050px) { #season-grid, #vip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
    .shop-summary { grid-template-columns: 1fr; gap: .6rem; }
    .season-summary, .points-guide { padding: .8rem .9rem; }
    .shop-section .catalog-card { min-height: 20rem; padding: 1rem; }
    .shop-anchor-nav { gap: .5rem 1rem; }
}
@media (max-width: 520px) { #season-grid, #vip-grid { grid-template-columns: minmax(0, 1fr); } }

.battlepass-card .battlepass-options { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; width: 100%; }
.battlepass-option { position: relative; z-index: 2; min-height: 2.4rem; padding: .35rem .5rem; border: 1px solid #897b5e; border-radius: .4rem; background: #262a35; color: #eee6d5; font: inherit; cursor: pointer; }
.battlepass-option[aria-pressed="true"] { border-color: #f2d997; background: #f2d997; color: #332817; font-weight: 700; }
.battlepass-option:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 520px) { #season-grid { grid-template-columns: minmax(0, 1fr); } }
.battlepass-owned { align-self: flex-start; padding: .35rem .6rem; border: 1px solid #88ae9c; border-radius: .35rem; background: #e1eee6; color: #294c3b; font-size: .9rem; font-weight: 700; }
.season-decoration-preview { display: flex; align-items: center; justify-content: space-evenly; gap: .75rem; width: 100%; min-height: 9rem; padding: .5rem; border: 1px solid #555260; border-radius: .65rem; background: rgba(16, 20, 29, .55); }
.season-decoration-piece { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; margin: 0; min-width: 0; }
.season-decoration-piece figcaption { color: #eee6d5; font-size: .8rem; text-align: center; }
.season-deco-sprite { display: block; flex: none; background-repeat: no-repeat; image-rendering: pixelated; }
.season-deco-head { width: 68px; height: 112px; background-image: url('../img/wardrobe-head-wocao.png'); background-size: 272px 112px; animation: wardrobe-head-wocao .5s step-end infinite; }
.season-deco-back { width: 96px; height: 96px; background-image: url('../img/wardrobe-back-xitieshi.png'); background-size: 384px 192px; animation: wardrobe-back-xitieshi 1s step-end infinite; }
@keyframes wardrobe-head-wocao {
    0% { background-position: 0 0; }
    25% { background-position: 33.333% 0; }
    50% { background-position: 66.667% 0; }
    75% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}
@keyframes wardrobe-back-xitieshi {
    0% { background-position: 0 0; }
    12.5% { background-position: 33.333% 0; }
    25% { background-position: 66.667% 0; }
    37.5% { background-position: 100% 0; }
    50% { background-position: 0 100%; }
    62.5% { background-position: 33.333% 100%; }
    75% { background-position: 66.667% 100%; }
    87.5% { background-position: 100% 100%; }
    100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    .season-deco-sprite { animation: none !important; }
}
.battlepass-card .product-art { width: 9rem; height: 9rem; }
@media (max-width: 550px) {
    .season-decoration-preview { min-height: 8rem; }
    .season-deco-head { width: 54px; height: 90px; background-size: 216px 90px; }
    .season-deco-back { width: 82px; height: 82px; background-size: 328px 164px; }
    .battlepass-card .product-art { width: 7.5rem; height: 7.5rem; }
}
.purchase-points-bonus { background: linear-gradient(135deg, #fbd78b 0%, #f4ba62 55%, #e6a14c 100%); color: #3b250a; }
.purchase-points-bonus .purchase-points-icon { background: #956112; }
.purchase-points-bonus .purchase-points-icon::before { border-color: #fff4d6; }
.purchase-points-sparkle { position: relative; display: inline-flex; flex: none; }
.purchase-points-sparkle::before,
.purchase-points-sparkle::after {
    content: "";
    position: absolute;
    top: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff0be;
    box-shadow: 0 0 5px #ffcf70, 8px -5px 0 -.5px #ffc765, -5px -3px 0 -1px #fff0be;
    pointer-events: none;
    opacity: 0;
}
.purchase-points-sparkle::before { left: 18%; }
.purchase-points-sparkle::after { right: 21%; top: 3px; }
@media (prefers-reduced-motion: no-preference) {
    .purchase-points-sparkle::before { animation: purchase-points-spark-rise 3.8s ease-out infinite; }
    .purchase-points-sparkle::after { animation: purchase-points-spark-rise 3.8s -1.35s ease-out infinite; }
    @keyframes purchase-points-spark-rise {
        0%, 55% { opacity: 0; transform: translateY(0); }
        67% { opacity: .95; }
        94%, 100% { opacity: 0; transform: translateY(-15px); }
    }
}
.rewards-unavailable { max-width:760px; margin:34px auto 54px; padding:42px 28px; text-align:center; border:1px solid rgba(228,196,126,.42); border-radius:16px; background:linear-gradient(145deg,rgba(39,43,56,.96),rgba(24,28,38,.98)); box-shadow:0 18px 48px rgba(0,0,0,.2); color:#f4edde; }
.rewards-unavailable-icon { display:inline-grid; place-items:center; width:58px; height:58px; border:1px solid #b99756; border-radius:50%; color:#e8c77f; font-size:27px; }
.rewards-unavailable h2 { margin:18px 0 10px; color:#f4dfb1; }
.rewards-unavailable p { margin:0 auto 24px; max-width:520px; color:#c8c6c2; line-height:1.8; }
@media(max-width:600px) { .rewards-unavailable { margin:22px 0 38px; padding:32px 20px; } }

.purchase-card.is-closed { filter: saturate(.65); }
.purchase-card.is-closed .catalog-state { color: #e6cc8e; font-weight: 700; }
.battlepass-card.is-closed .battlepass-option:disabled { cursor: not-allowed; opacity: .58; }
