:root {
    --red: #ff393f;
    --red-deep: #e92730;
    --ink: #211617;
    --muted: #897879;
    --pink: #ffd5d7;
    --cream: #fff6f4;
    --line: rgba(81, 32, 35, .1);
}

* { box-sizing: border-box; }

html {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background: #ffdfe0;
}
html.dialog-open { overflow: hidden; }

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--ink);
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 85% 6%, rgba(255,255,255,.75) 0 2px, transparent 3px),
        radial-gradient(circle at 18% 24%, rgba(255,255,255,.7) 0 2px, transparent 3px),
        linear-gradient(180deg, #ffcacc 0%, #ffe5e3 42%, #fff2ef 100%);
}
body.dialog-open { overflow: hidden; }

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    opacity: .1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

button, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.svg-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    flex-shrink: 0;
    fill: currentColor;
    vertical-align: -0.14em;
    pointer-events: none;
}

/* ---------- 装饰彩带 ---------- */
.gift-ribbon {
    position: absolute;
    z-index: 0;
    overflow: hidden;
    max-width: 100%;
    height: 74px;
    padding-top: 26px;
    color: rgba(255,255,255,.24);
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 3px, transparent 3px 7px),
        var(--red);
    font: 800 12px/1 "Trebuchet MS", sans-serif;
    letter-spacing: .15em;
    white-space: nowrap;
}
.ribbon-left  { width: 68vw; top: 500px; left: 0;  transform: translateX(-34%) rotate(22deg);  transform-origin: center; }
.ribbon-right { width: 58vw; top: 315px; right: 0; transform: translateX(34%)  rotate(-38deg); transform-origin: center; }

.spark {
    position: absolute;
    z-index: 1;
    color: #fff;
    text-shadow: 0 0 18px #fff;
    animation: twinkle 2.2s ease-in-out infinite;
}
.spark-one   { top: 275px; left: 23%;  font-size: 28px; }
.spark-two   { top: 405px; right: 20%; font-size: 47px; animation-delay: .5s; }
.spark-three { top: 700px; left: 13%;  font-size: 30px; animation-delay: 1s; }

.page-shell {
    position: relative;
    z-index: 2;
    width: min(980px, calc(100% - 48px));
    margin: 0 auto;
    padding-top: 32px;
    padding-bottom: 72px;
}

/* ---------- 卡片区 ---------- */
.gift-stage { position: relative; margin-top: 24px; padding-top: 150px; }

.cards {
    position: absolute;
    z-index: 1;
    width: min(690px, 84%);
    height: 220px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);

    cursor: default;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;

    pointer-events: auto;
}
.cards:active,
.cards:focus,
.cards:focus-visible { outline: none; }

.vip-card { position: absolute; overflow: hidden; border-radius: 16px; box-shadow: 0 24px 38px rgba(103,35,40,.2); }

.card-back {
    width: 54%;
    height: 178px;
    top: 10px;
    right: 3%;
    padding: 24px;
    color: #513a22;
    background: linear-gradient(135deg, #fff5bf, #d7a93c);
    transform: rotate(8deg);
}
.card-back::after {
    content: "";
    position: absolute;
    width: 150px; height: 150px;
    right: -26px; bottom: -56px;
    border: 22px solid rgba(60,41,17,.24);
    border-radius: 50%;
}
.card-back small, .card-back b { position: relative; z-index: 1; display: block; }
.card-back small { font-size: 11px; letter-spacing: .12em; }
.card-back b { margin-top: 46px; font: 900 38px/1 "Trebuchet MS", sans-serif; }

.card-front {
    display: flex;
    align-items: center;
    width: 67%;
    height: 178px;
    top: 32px;
    left: 1%;
    padding: 22px 28px;
    color: #f7dddd;
    background: linear-gradient(145deg, #292526, #080808);
    transform: rotate(-8deg);
}
.card-front > * { margin-right: 24px; }
.card-front > *:last-child { margin-right: 0; }

.card-front::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0 43%, rgba(255,255,255,.07) 44% 55%, transparent 56%);
}
.record-art {
    position: relative;
    flex: 0 0 auto;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, #101010 0 5px, #282526 6px, #0b0b0b 8px);
}
.record-art i {
    position: absolute;
    inset: 39%;
    border-radius: 50%;
    background: var(--red);
}
.card-front div { position: relative; z-index: 1; }
.card-front small, .card-front b, .card-front em { display: block; }
.card-front small { font-size: 10px; letter-spacing: .12em; }
.card-front b { margin: 6px 0; font-family: "Songti SC", serif; font-size: 34px; }
.card-front em { color: #76696a; font: 700 8px/1 "Trebuchet MS", sans-serif; letter-spacing: .22em; }

/* ============================================================
 * ★ 手机端黑胶邀请官推广卡（替换手机端 .cards）
 * ============================================================ */
.promo-card {
    display: none;
}

.promo-card__inner {
    width: 100%;
    background: linear-gradient(180deg, #dceeff 0%, #cce6ff 100%);
    border-radius: 20px;
    padding: 16px 16px 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(40, 100, 180, 0.12);
}

.promo-card__header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
}

.promo-card__title {
    font-size: 18px;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    line-height: 1.3;
    text-align: center;
}
.promo-card__title > * { margin-right: 4px; }
.promo-card__title > *:last-child { margin-right: 0; }

.promo-card__title .hl {
    color: #2b9bf4;
}

.icon-sparkle-left {
    width: 22px;
    height: 22px;
    margin-right: 6px;
    flex: 0 0 auto;
}
.icon-sparkle-right {
    width: 22px;
    height: 22px;
    margin-left: 6px;
    flex: 0 0 auto;
}

.promo-card__cards {
    display: flex;
    margin-bottom: 12px;
    margin-left: -5px;
    margin-right: -5px;
}
.promo-card__cards > * {
    margin-left: 5px;
    margin-right: 5px;
}

.promo-card__item {
    flex: 1;
    background: linear-gradient(180deg, #fff8f0 0%, #fff0eb 100%);
    border-radius: 14px;
    padding: 16px 10px 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 92px;
}
.promo-card__item--right {
    background: linear-gradient(180deg, #fffaf0 0%, #fff0ea 100%);
}

.promo-card__badge {
    position: absolute;
    top: -9px;
    left: -4px;
    background: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 900;
    font-style: italic;
    z-index: 2;
    transform: rotate(-6deg);
    color: #f5427b;
    border: 2px solid #f5427b;
    box-shadow: 0 2px 8px rgba(245, 66, 123, 0.2);
}
.promo-card__badge--right {
    color: #1f8bf5;
    border-color: #1f8bf5;
    box-shadow: 0 2px 8px rgba(31, 139, 245, 0.2);
    left: auto;
    right: -4px;
    transform: rotate(6deg);
}

.promo-card__content {
    display: flex;
    flex-direction: column;
    z-index: 1;
}
.promo-card__content > * { margin-bottom: 4px; }
.promo-card__content > *:last-child { margin-bottom: 0; }

.promo-card__line {
    font-size: 13px;
    color: #333;
    font-weight: bold;
    line-height: 1.25;
}
.promo-card__line .num-big {
    font-size: 22px;
    color: #e62e5c;
    font-weight: 900;
    margin: 0 2px;
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.promo-card__line .num-small {
    font-size: 16px;
    color: #e62e5c;
    font-weight: 900;
    margin: 0 1px;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.promo-card__graphic {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 50px;
    height: 50px;
    pointer-events: none;
}

.promo-card__footer {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.promo-card__footer > * { margin-right: 10px; }
.promo-card__footer > *:last-child { margin-right: 0; }

.promo-card__footer-text {
    font-size: 14.5px;
    color: #1a1a1a;
    font-weight: bold;
    line-height: 1.2;
    min-width: 0;
}
.promo-card__footer-text .num-footer {
    color: #e62e5c;
    font-size: 20px;
    margin: 0 2px;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.promo-card__btn {
    background: linear-gradient(90deg, #f55d5d 0%, #ea3a3a 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 9px 22px;
    font-size: 14.5px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(234, 58, 58, 0.3);
    transition: transform .1s, box-shadow .1s;
    white-space: nowrap;
    flex: 0 0 auto;
}
.promo-card__btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(234, 58, 58, 0.3);
}

/* ---------- 信封 ---------- */
.envelope {
    position: relative;
    z-index: 2;
    min-height: 0;
    padding: 40px 48px 38px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,238,235,.63));
    box-shadow: 0 24px 60px rgba(137,59,65,.15), inset 0 1px 1px #fff;
    backdrop-filter: blur(18px);
}
.envelope::before, .envelope::after { content: ""; position: absolute; pointer-events: none; }
.envelope::before { inset: 0; border-radius: inherit; background: linear-gradient(125deg, rgba(255,255,255,.45), transparent 34%); }
.envelope::after  { width: 130%; height: 1px; left: -15%; top: 57%; background: rgba(255,255,255,.7); transform: rotate(-20deg); opacity: .38; }

.giver { position: relative; z-index: 1; display: flex; align-items: center; }
.giver > * { margin-right: 14px; }
.giver > *:last-child { margin-right: 0; }

.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #4e2e32, #da7d83);
    box-shadow: 0 5px 15px rgba(69,31,34,.16);
}
.avatar .svg-icon { width: 22px; height: 22px; }
.giver strong { font-size: 17px; }
.giver p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.vip-badge {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    color: #4e3817;
    background: #e7c35d;
    font: 800 10px/1 sans-serif;
}

.gift-count {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin: 36px 0 10px;
}
.gift-count > * { margin-right: 9px; }
.gift-count > *:last-child { margin-right: 0; }

.gift-count span { font-size: 15px; color: #6f5a5b; }
.gift-count strong {
    font: 800 clamp(54px, 7.5vw, 84px)/.82 "Trebuchet MS", sans-serif;
    letter-spacing: -.06em;
    color: var(--ink);
}

.total-claimed {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 13px;
}
.total-claimed > * { margin-right: 6px; }
.total-claimed > *:last-child { margin-right: 0; }

.total-claimed .svg-icon { width: 14px; height: 14px; color: #ff7a83; }
.total-claimed b {
    margin: 0 2px;
    color: var(--red-deep);
    font: 800 17px/1 "Trebuchet MS", sans-serif;
    letter-spacing: -.01em;
}

.primary-share, .bottom-share {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(660px, 100%);
    margin: 0 auto;
    padding: 17px 22px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    box-shadow: 0 14px 26px rgba(255,57,63,.22);
    font-size: 20px;
    font-weight: 850;
    cursor: pointer;
    transition: .2s;
}
.primary-share > *, .bottom-share > * { margin-right: 9px; }
.primary-share > *:last-child, .bottom-share > *:last-child { margin-right: 0; }

.primary-share .svg-icon,
.bottom-share .svg-icon { width: 1.05em; height: 1.05em; }
.primary-share:hover, .bottom-share:hover { background: var(--red-deep); transform: translateY(-2px); }

/* ============================================================
 * ★ 顶部双按钮：我也要分享 / 分享方法
 * ============================================================ */
.share-actions {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(660px, 100%);
    margin: 0 auto;
    gap: 10px;
}

.share-actions .primary-share,
.share-actions .guide-share {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 17px 18px;
    border: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 850;
    cursor: pointer;
    transition: .2s;
    white-space: nowrap;
}

.share-actions .primary-share {
    color: #fff;
    background: var(--red);
    box-shadow: 0 14px 26px rgba(255,57,63,.22);
}
.share-actions .primary-share:hover {
    background: var(--red-deep);
    transform: translateY(-2px);
}

/* 分享方法按钮：暖金色调，与红色主按钮区分 */
.share-actions .guide-share {
    color: #6b4a12;
    background: linear-gradient(135deg, #ffdd8f, #f0b94a);
    box-shadow: 0 14px 26px rgba(240,185,74,.28);
}
.share-actions .guide-share:hover {
    background: linear-gradient(135deg, #ffe4a6, #e7ad38);
    transform: translateY(-2px);
}
.share-actions .guide-share .svg-icon,
.share-actions .primary-share .svg-icon {
    width: 1.05em;
    height: 1.05em;
}

@media (max-width: 720px) {
    .share-actions {
        gap: 8px;
    }

    .share-actions .primary-share,
    .share-actions .guide-share {
        padding: 13px 10px;
        font-size: 14px;
        gap: 5px;
    }
}

@media (max-width: 380px) {
    .share-actions {
        gap: 6px;
    }

    .share-actions .primary-share,
    .share-actions .guide-share {
        padding: 12px 8px;
        font-size: 13px;
        gap: 4px;
    }
}

/* ---------- 列表区 ---------- */
.links {
    margin-top: 55px;
    padding: 32px 42px 38px;
    background: rgba(255,255,255,.65);
    box-shadow: 0 22px 55px rgba(138,74,77,.08);
    backdrop-filter: blur(10px);
    border-radius: 24px;
}

/* ============================================================
 * 主 Tabs
 * ============================================================ */
.main-tabs {
    display: flex;
    padding: 4px;
    margin-bottom: 26px;
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    border: 1px solid var(--line);
    box-shadow: 0 4px 14px rgba(138,74,77,.06);
}
.main-tabs > * { margin-right: 4px; }
.main-tabs > *:last-child { margin-right: 0; }

.main-tab {
    flex: 1;
    padding: 11px 22px;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    font-size: 14.5px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    transition: .18s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.main-tab:hover { color: var(--ink); }
.main-tab.active {
    color: #fff;
    background: var(--red);
    box-shadow: 0 6px 16px rgba(255,57,63,.28);
}

.tab-panel { display: block; }
.tab-panel[hidden] { display: none; }

/* ============================================================
 * 其他会员活动 —— 参照 link-card 的列表风格
 * ============================================================ */
.others-list {
    display: grid;
}

.other-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    row-gap: 16px;
    column-gap: 16px;
    align-items: center;
    padding: 18px 4px;
    border-bottom: 1px solid rgba(77,35,38,.07);
    animation: rise .45s both;
    transition: background .2s;
}

.other-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 3px solid #fff;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffeae6, #ffd5d7);
    box-shadow: 0 5px 12px rgba(138,74,77,.15);
    flex: 0 0 auto;
}
.other-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.other-main {
    min-width: 0;
}

.other-title {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: .01em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.other-time {
    display: inline-flex;
    align-items: center;
    color: #a59495;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}
.other-time > * { margin-right: 4px; }
.other-time > *:last-child { margin-right: 0; }

.other-time .svg-icon {
    width: 13px;
    height: 13px;
    color: #bcaaab;
}

.other-claim {
    border: 0;
    min-width: 92px;
    padding: 11px 18px;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: .18s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.other-claim > * { margin-right: 5px; }
.other-claim > *:last-child { margin-right: 0; }

.other-claim:hover {
    background: var(--red-deep);
    transform: translateY(-1px);
}
.other-claim .svg-icon {
    width: 13px;
    height: 13px;
}

.others-empty {
    padding: 50px 4px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ---------- 列表头部 ---------- */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    row-gap: 12px;
    column-gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.tabs {
    display: flex;
    align-items: center;
    row-gap: 16px;
    column-gap: 16px;
    flex-wrap: wrap;
    min-width: 0;
}
.tabs h2 { margin: 0; font-size: 23px; }
.list-label { color: var(--muted); font-size: 12px; white-space: nowrap; }

.sort-tabs {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    border: 1px solid var(--line);
}
.sort-tabs > * { margin-right: 2px; }
.sort-tabs > *:last-child { margin-right: 0; }

.sort-tab {
    padding: 5px 14px;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: .15s;
    white-space: nowrap;
}
.sort-tab:hover { color: var(--ink); }
.sort-tab.active {
    color: #fff;
    background: var(--red);
    box-shadow: 0 3px 10px rgba(255,57,63,.25);
}

.link-list { display: grid; }

.link-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    row-gap: 16px;
    column-gap: 16px;
    align-items: center;
    padding: 18px 4px;
    border-bottom: 1px solid rgba(77,35,38,.07);
    animation: rise .45s both;
    transition: background .2s;
}

/* ---------- 序号方块 ---------- */
.link-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 3px solid #fff;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, #ff7a83, #ff393f);
    box-shadow: 0 5px 12px rgba(255,57,63,.22);
    font-family: "Trebuchet MS", "Noto Sans SC", sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1;
}

.link-main { min-width: 0; }

.link-title {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}
.link-title > * { margin-right: 8px; }
.link-title > *:last-child { margin-right: 0; }

.link-no { color: var(--ink); font-size: 15px; font-weight: 800; }

.link-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    color: #a59495;
    font-size: 12px;
    line-height: 1;
    margin-bottom: -4px;
}
.link-meta > * { margin-right: 12px; margin-bottom: 4px; }
.link-meta > *:last-child { margin-right: 0; }

.meta-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.meta-item > * { margin-right: 4px; }
.meta-item > *:last-child { margin-right: 0; }

.meta-item .svg-icon { width: 13px; height: 13px; color: #bcaaab; }
.meta-item b { color: var(--red-deep); font-weight: 800; }

.actions {
    display: flex;
    align-items: center;
}
.actions > * { margin-right: 8px; }
.actions > *:last-child { margin-right: 0; }

.admin-actions { display: none; }
body.admin-visible .admin-actions {
    display: flex;
    align-items: center;
}
body.admin-visible .admin-actions > * { margin-right: 6px; }
body.admin-visible .admin-actions > *:last-child { margin-right: 0; }

.icon-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #8a7677;
    background: rgba(255,255,255,.85);
    cursor: pointer;
    transition: .15s;
}
.icon-btn .svg-icon { width: 15px; height: 15px; }
.icon-btn:hover { color: var(--ink); background: #fff; transform: translateY(-1px); }
.icon-btn:disabled { opacity: .5; cursor: wait; transform: none; }

.icon-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #ffc65c, #e7a125);
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(231,161,37,.3);
}
.icon-btn.active:hover { color: #fff; background: linear-gradient(135deg, #ffce70, #e7a125); }

.icon-btn.danger { color: #c53a43; border-color: rgba(213,45,55,.25); }
.icon-btn.danger:hover { color: #fff; background: #d52d37; border-color: transparent; }

.claim {
    border: 0;
    min-width: 92px;
    padding: 11px 18px;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: .18s;
}
.claim:hover { background: var(--red-deep); transform: translateY(-1px); }
.claim:disabled { opacity: .5; cursor: wait; transform: none; }

.loading, .empty { padding: 50px 4px; color: var(--muted); font-size: 13px; text-align: center; }

.bottom-share { width: min(660px, calc(100% - 35px)); margin-top: 30px; font-size: 19px; }
button:disabled { opacity: .5; cursor: wait; }

/* ============================================================
 * PC 端提示弹窗
 * ============================================================ */
.pc-dialog {
    width: min(440px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 22px;
    color: var(--ink);
    background: #fff7f5;
    box-shadow: 0 35px 100px rgba(89,31,35,.3);
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.pc-dialog::backdrop {
    background: rgba(84,42,45,.42);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.pc-dialog[open] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}
.pc-dialog.fallback::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: -100vh -100vw;
    background: rgba(84,42,45,.48);
}
.pc-dialog-body {
    padding: 32px 26px 24px;
    text-align: center;
}
.pc-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #ff5b64, #e92730);
    box-shadow: 0 12px 26px rgba(255,57,63,.3), inset 0 0 0 3px rgba(255,255,255,.25);
}
.pc-icon .svg-icon { width: 30px; height: 30px; }
.pc-dialog h2 {
    margin: 0 0 10px;
    font-family: "Songti SC", "STSong", serif;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: .01em;
}
.pc-dialog p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.75;
}
.pc-url {
    padding: 10px 14px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: rgba(255,255,255,.9);
    border: 1px dashed rgba(81,32,35,.2);
    color: #6a5556;
    font-size: 12px;
    line-height: 1.5;
    word-break: break-all;
    user-select: all;
    -webkit-user-select: all;
}
.pc-actions { display: flex; }
.pc-actions > * { margin-right: 10px; }
.pc-actions > *:last-child { margin-right: 0; }

.pc-actions button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: .15s;
}
.pc-actions button > * { margin-right: 6px; }
.pc-actions button > *:last-child { margin-right: 0; }

.pc-actions .svg-icon { width: 15px; height: 15px; }
.pc-actions .pc-copy {
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
}
.pc-actions .pc-copy:hover { background: #fdf2f2; }
.pc-actions .pc-ok {
    color: #fff;
    background: var(--red);
}
.pc-actions .pc-ok:hover { background: var(--red-deep); }

/* ============================================================
 * 微信内选择领取方式弹窗
 * ============================================================ */
.claim-dialog {
    width: min(420px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 22px;
    color: var(--ink);
    background: #fff7f5;
    box-shadow: 0 35px 100px rgba(89,31,35,.3);
    overflow: visible;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.claim-dialog::backdrop {
    background: rgba(84,42,45,.42);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.claim-dialog[open] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}
.claim-dialog.fallback::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: -100vh -100vw;
    background: rgba(84,42,45,.48);
}

.claim-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #927f80;
    background: rgba(255,255,255,.7);
    cursor: pointer;
    transition: .15s;
}
.claim-close:hover { color: var(--ink); background: #fff; }
.claim-close .svg-icon { width: 16px; height: 16px; }

.claim-dialog-body {
    padding: 28px 22px 24px;
    text-align: center;
}
.claim-icon {
    display: inline-grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #ff5b64, #e92730);
    box-shadow: 0 12px 26px rgba(255,57,63,.3), inset 0 0 0 3px rgba(255,255,255,.25);
}
.claim-icon .svg-icon { width: 28px; height: 28px; }
.claim-dialog h2 {
    margin: 0 0 10px;
    font-family: "Songti SC", "STSong", serif;
    font-size: 20px;
    font-weight: 900;
}
.claim-dialog p {
    margin: 0 0 20px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #8a6a6c;
    background: rgba(255,235,232,.7);
    font-size: 12.5px;
    line-height: 1.75;
    text-align: left;
}
.claim-actions { display: flex; }
.claim-actions > * { margin-right: 10px; }
.claim-actions > *:last-child { margin-right: 0; }

.claim-actions button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 12px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
}
.claim-actions button > * { margin-right: 6px; }
.claim-actions button > *:last-child { margin-right: 0; }

.claim-actions .svg-icon { width: 15px; height: 15px; }
.claim-actions .claim-copy {
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
}
.claim-actions .claim-copy:hover { background: #fdf2f2; }
.claim-actions .claim-go {
    color: #fff;
    background: var(--red);
    box-shadow: 0 8px 18px rgba(255,57,63,.25);
}
.claim-actions .claim-go:hover { background: var(--red-deep); }

/* ---------- 通用弹窗 ---------- */
dialog {
    width: min(540px, calc(100% - 30px));
    padding: 0;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 25px;
    color: var(--ink);
    background: #fff3f1;
    box-shadow: 0 35px 100px rgba(89,31,35,.28);
    overscroll-behavior: contain;
}
dialog::backdrop { background: rgba(84,42,45,.35); backdrop-filter: blur(7px); }
dialog.dialog-fallback {
    position: fixed;
    z-index: 40;
    inset: 50% auto auto 50%;
    display: block;
    transform: translate(-50%, -50%);
}
dialog.dialog-fallback::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: -100vh -100vw;
    background: rgba(84,42,45,.48);
}
dialog form { padding: 30px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-head small { color: var(--red); font: 800 9px/1 "Trebuchet MS", sans-serif; letter-spacing: .2em; }
.dialog-head h2 { margin: 8px 0 27px; font-family: "Songti SC", serif; font-size: 30px; }

.close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #927f80;
    background: rgba(255,255,255,.6);
    cursor: pointer;
    transition: .15s;
}
.close:hover { color: var(--ink); background: #fff; }
.close .svg-icon { width: 18px; height: 18px; }

label { display: block; margin-bottom: 9px; color: #766566; font-size: 12px; }
textarea {
    width: 100%;
    resize: vertical;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font-size: 13px;
    line-height: 1.75;
}
textarea:focus { border-color: rgba(255,57,63,.55); box-shadow: 0 0 0 4px rgba(255,57,63,.07); }
.form-message { min-height: 21px; margin: 7px 0; color: var(--red-deep); font-size: 12px; }
.submit {
    width: 100%;
    padding: 15px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-weight: 800;
    cursor: pointer;
}

.toast {
    position: fixed;
    z-index: 30;
    left: 50%;
    bottom: 25px;
    padding: 11px 18px;
    border-radius: 999px;
    color: #fff;
    background: rgba(48,22,24,.9);
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 15px);
    transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes twinkle { 50% { opacity: .25; transform: scale(.8) rotate(15deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ============================================================
   ==========  桌面端（≥860px）  ================
   ============================================================ */
@media (min-width: 860px) {
    .link-list {
        grid-template-columns: 1fr 1fr;
        column-gap: 30px;
        row-gap: 0;
    }
    .link-card { row-gap: 14px; column-gap: 14px; padding: 16px 4px; }
    .link-avatar {
        width: 42px;
        height: 42px;
        border-width: 3px;
        border-radius: 11px;
        font-size: 14px;
    }
    .link-title { margin-bottom: 5px; }
    .link-title > * { margin-right: 7px; }
    .link-no { font-size: 14.5px; }
    .link-meta > * { margin-right: 10px; }
    .link-meta { font-size: 11.5px; }
    .meta-item .svg-icon { width: 12px; height: 12px; }
    .claim { min-width: 78px; padding: 10px 13px; font-size: 13px; }

    .others-list {
        grid-template-columns: 1fr 1fr;
        column-gap: 30px;
        row-gap: 0;
    }
    .other-card { row-gap: 14px; column-gap: 14px; padding: 16px 4px; }
    .other-icon {
        width: 42px;
        height: 42px;
        border-width: 3px;
        border-radius: 11px;
    }
    .other-title { font-size: 14.5px; margin-bottom: 5px; }
    .other-time { font-size: 11.5px; }
    .other-time .svg-icon { width: 12px; height: 12px; }
    .other-claim { min-width: 78px; padding: 10px 13px; font-size: 13px; }
}

/* ============================================================
   ===============  手机端（≤720px）紧凑布局  =================
   ============================================================ */
@media (max-width: 720px) {
    .gift-ribbon, .spark { display: none; }

    .page-shell {
        width: auto;
        max-width: none;
        margin: 0 14px;
        padding-top: 16px;
        padding-bottom: 40px;
    }

    .gift-stage { margin-top: 0; padding-top: 0; }
    .cards {
        position: static;
        width: 100%;
        max-width: none;
        height: auto;
        transform: none;
        margin-bottom: 10px;
        pointer-events: auto;
    }
    .card-back { display: none; }
    .card-front {
        position: static;
        width: 100%;
        height: auto;
        transform: none;
        padding: 12px 14px;
        border-radius: 14px;
        box-shadow: 0 12px 26px rgba(40,18,20,.22);
    }
    .card-front > * { margin-right: 10px; }
    .card-front::before { border-radius: inherit; }
    .card-front .record-art { width: 40px; height: 40px; }
    .card-front small { font-size: 9px; letter-spacing: .1em; }
    .card-front b { font-size: 18px; margin: 2px 0 1px; }
    .card-front em { display: none; }

    .cards { display: none; }
    .promo-card {
        display: block;
        margin-bottom: 10px;
    }

    .promo-card__inner {
        padding: 12px 14px 10px;
        border-radius: 18px;
    }

    .promo-card__header {
        margin-bottom: 8px;
    }

    .promo-card__title {
        font-size: 16px;
        line-height: 1.2;
    }
    .promo-card__title > * { margin-right: 4px; }

    .icon-sparkle-left,
    .icon-sparkle-right {
        width: 18px;
        height: 18px;
    }
    .icon-sparkle-left  { margin-right: 4px; }
    .icon-sparkle-right { margin-left: 4px; }

    .promo-card__cards {
        margin-bottom: 8px;
        margin-left: -4px;
        margin-right: -4px;
    }
    .promo-card__cards > * {
        margin-left: 4px;
        margin-right: 4px;
    }

    .promo-card__item {
        padding: 12px 10px 6px;
        min-height: 0;
        border-radius: 12px;
    }

    .promo-card__badge {
        top: -7px;
        padding: 2px 10px;
        font-size: 11.5px;
    }

    .promo-card__line {
        font-size: 12px;
        line-height: 1.2;
    }
    .promo-card__line .num-big {
        font-size: 20px;
    }
    .promo-card__line .num-small {
        font-size: 15px;
    }

    .promo-card__graphic {
        width: 44px;
        height: 44px;
        right: 2px;
        bottom: 2px;
    }

    .promo-card__footer {
        padding: 6px 12px;
        border-radius: 14px;
    }
    .promo-card__footer > * { margin-right: 8px; }

    .promo-card__footer-text {
        font-size: 13px;
        line-height: 1.15;
    }
    .promo-card__footer-text .num-footer {
        font-size: 18px;
    }

    .promo-card__btn {
        padding: 7px 18px;
        font-size: 13px;
    }

    .envelope {
        min-height: 0;
        padding: 16px 16px 18px;
        border-radius: 16px;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        overflow: hidden;
    }
    .envelope::after { display: none; }

    .giver > * { margin-right: 9px; }
    .giver > div { min-width: 0; }
    .avatar { width: 38px; height: 38px; border-width: 2px; }
    .avatar .svg-icon { width: 17px; height: 17px; }
    .giver strong {
        display: block; overflow: hidden;
        font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap;
    }
    .giver p {
        display: block; overflow: hidden;
        margin-top: 2px; font-size: 11px;
        text-overflow: ellipsis; white-space: nowrap;
    }
    .vip-badge { padding: 3px 8px; font-size: 9px; }

    .gift-count { margin: 16px 0 6px; white-space: nowrap; }
    .gift-count > * { margin-right: 6px; }
    .gift-count span { font-size: 13px; }
    .gift-count strong { font-size: clamp(44px, 14vw, 58px); }

    .total-claimed { margin: 0 0 14px; font-size: 12px; }
    .total-claimed > * { margin-right: 5px; }
    .total-claimed .svg-icon { width: 13px; height: 13px; }
    .total-claimed b { font-size: 15px; }

    .primary-share { padding: 13px 16px; font-size: 15px; }
    .primary-share > *, .bottom-share > * { margin-right: 7px; }

    .links {
        width: 100%;
        max-width: 100%;
        margin-top: 18px;
        padding: 16px 12px 18px;
        border-radius: 16px;
        overflow: hidden;
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    .main-tabs { padding: 3px; margin-bottom: 18px; }
    .main-tabs > * { margin-right: 3px; }
    .main-tab { padding: 9px 12px; font-size: 13px; }

    .link-list { grid-template-columns: 1fr; }
    .section-head { padding-bottom: 14px; row-gap: 8px; column-gap: 8px; }
    .tabs { row-gap: 10px; column-gap: 10px; }
    .tabs h2 { font-size: 16px; }
    .list-label { font-size: 10px; }

    .sort-tabs { padding: 2px; }
    .sort-tabs > * { margin-right: 2px; }
    .sort-tab { padding: 4px 11px; font-size: 11.5px; }

    .link-card {
        grid-template-columns: auto minmax(0,1fr) auto;
        row-gap: 10px;
        column-gap: 10px;
        padding: 13px 0;
    }
    .link-avatar {
        width: 36px;
        height: 36px;
        border-width: 2px;
        border-radius: 10px;
        font-size: 13px;
    }

    .link-title { margin-bottom: 4px; }
    .link-title > * { margin-right: 6px; }
    .link-no { font-size: 13.5px; }

    .link-meta { font-size: 11px; }
    .link-meta > * { margin-right: 9px; }
    .meta-item > * { margin-right: 3px; }
    .meta-item .svg-icon { width: 12px; height: 12px; }

    .actions > * { margin-right: 6px; }
    body.admin-visible .admin-actions > * { margin-right: 5px; }

    .icon-btn { width: 30px; height: 30px; }
    .icon-btn .svg-icon { width: 14px; height: 14px; }

    .claim { min-width: 60px; padding: 9px 12px; font-size: 13px; }

    .others-list { grid-template-columns: 1fr; }
    .other-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
        row-gap: 10px;
        column-gap: 10px;
        padding: 13px 0;
    }
    .other-icon {
        width: 36px;
        height: 36px;
        border-width: 2px;
        border-radius: 10px;
    }
    .other-title { font-size: 13.5px; margin-bottom: 4px; }
    .other-time { font-size: 11px; }
    .other-time .svg-icon { width: 12px; height: 12px; }
    .other-claim {
        min-width: 60px;
        padding: 9px 12px;
        font-size: 13px;
    }

    .bottom-share {
        width: 100%;
        max-width: 100%;
        margin-top: 16px;
        padding: 13px;
        font-size: 15px;
    }
    .bottom-share > * { margin-right: 7px; }

    .pc-dialog { width: calc(100% - 24px); border-radius: 20px; }
    .pc-dialog-body { padding: 26px 20px 20px; }
    .pc-icon { width: 56px; height: 56px; margin-bottom: 14px; }
    .pc-icon .svg-icon { width: 26px; height: 26px; }
    .pc-dialog h2 { font-size: 19px; }
    .pc-dialog p { font-size: 13px; margin-bottom: 16px; }
    .pc-url { font-size: 11.5px; padding: 9px 12px; }
    .pc-actions > * { margin-right: 8px; }
    .pc-actions button { padding: 11px 14px; font-size: 13.5px; }

    .claim-dialog { width: calc(100% - 24px); border-radius: 20px; }
    .claim-dialog-body { padding: 24px 18px 20px; }
    .claim-close { top: 8px; right: 8px; width: 30px; height: 30px; }
    .claim-close .svg-icon { width: 15px; height: 15px; }
    .claim-icon { width: 54px; height: 54px; margin-bottom: 12px; }
    .claim-icon .svg-icon { width: 24px; height: 24px; }
    .claim-dialog h2 { font-size: 18px; }
    .claim-dialog p { font-size: 12px; margin-bottom: 16px; padding: 9px 11px; }
    .claim-actions > * { margin-right: 8px; }
    .claim-actions button { padding: 12px 10px; font-size: 13px; }
    .claim-actions .svg-icon { width: 14px; height: 14px; }

    dialog {
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 24px);
        margin: auto 12px;
        overflow-y: auto;
        border-radius: 20px;
    }
    dialog form { max-width: 100%; padding: 22px 18px; }
    .dialog-head h2 { margin-bottom: 20px; font-size: 24px; }
    .close { width: 30px; height: 30px; }
    .close .svg-icon { width: 16px; height: 16px; }
    textarea { max-width: 100%; min-height: 120px; font-size: 16px; }

    .toast {
        max-width: calc(100% - 28px);
        bottom: max(18px, env(safe-area-inset-bottom));
        text-align: center;
        white-space: nowrap;
    }
}

/* ---------- 超小屏（≤380px） ---------- */
@media (max-width: 380px) {
    .page-shell { margin-inline: 10px; }

    .card-front { padding: 11px 12px; }
    .card-front > * { margin-right: 9px; }
    .card-front .record-art { width: 36px; height: 36px; }
    .card-front b { font-size: 16px; }

    .envelope { padding: 14px 14px 16px; }
    .avatar { width: 34px; height: 34px; }
    .avatar .svg-icon { width: 15px; height: 15px; }
    .giver strong { font-size: 13px; }
    .giver p { font-size: 10.5px; }

    .gift-count { margin: 14px 0 6px; }
    .gift-count strong { font-size: 46px; }
    .gift-count span { font-size: 12px; }

    .total-claimed { font-size: 11.5px; margin-bottom: 12px; }
    .total-claimed b { font-size: 14px; }

    .links { padding: 14px 10px 16px; }
    .tabs h2 { font-size: 15px; }
    .list-label { display: none; }

    .main-tab { padding: 8px 10px; font-size: 12.5px; }

    .sort-tab { padding: 4px 9px; font-size: 11px; }

    .link-avatar {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        font-size: 12px;
    }
    .link-no { font-size: 13px; }
    .link-meta { font-size: 10.5px; }
    .link-meta > * { margin-right: 8px; }
    .meta-item .svg-icon { width: 11px; height: 11px; }

    .icon-btn { width: 28px; height: 28px; }
    .icon-btn .svg-icon { width: 13px; height: 13px; }

    .claim { min-width: 56px; padding: 8px 10px; font-size: 12px; }

    .other-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }
    .other-title { font-size: 13px; }
    .other-time { font-size: 10.5px; }
    .other-time .svg-icon { width: 11px; height: 11px; }
    .other-claim {
        min-width: 56px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .promo-card__inner { padding: 10px 12px 8px; border-radius: 16px; }
    .promo-card__title { font-size: 15px; }
    .promo-card__item { padding: 10px 8px 4px; min-height: 0; }
    .promo-card__line { font-size: 11.5px; }
    .promo-card__line .num-big { font-size: 18px; }
    .promo-card__line .num-small { font-size: 14px; }
    .promo-card__badge { font-size: 11px; padding: 2px 9px; }
    .promo-card__graphic { width: 38px; height: 38px; }
    .promo-card__footer-text { font-size: 12.5px; }
    .promo-card__footer-text .num-footer { font-size: 16px; }
    .promo-card__btn { padding: 6px 15px; font-size: 12.5px; }

    .claim-actions {
        flex-direction: column;
    }
    .claim-actions > * { margin-right: 0; margin-bottom: 8px; }
    .claim-actions > *:last-child { margin-bottom: 0; }
    .claim-actions .claim-go { order: 0; }
    .claim-actions .claim-copy { order: 1; }
    .claim-actions button { padding: 12px; font-size: 13.5px; }
}

@supports not (height: 100dvh) {
    @media (max-width: 720px) { dialog { max-height: calc(100vh - 24px); } }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; animation-duration: 0.001s !important; transition: none !important; }
}

/* ============================================================
 * 会员领取规则入口按钮
 * ============================================================ */
.rules-btn {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    padding: 5px 11px;
    border: 0;
    border-radius: 999px;
    color: #4e3817;
    background: linear-gradient(135deg, #f4d166, #e7c35d);
    box-shadow: 0 3px 8px rgba(231, 195, 93, .35);
    font: 800 11px/1 "Noto Sans SC", "Microsoft YaHei", sans-serif;
    letter-spacing: .01em;
    white-space: nowrap;
    cursor: pointer;
    transition: .18s;
    -webkit-tap-highlight-color: transparent;
}
.rules-btn > * { margin-right: 4px; }
.rules-btn > *:last-child { margin-right: 0; }

.rules-btn .svg-icon {
    width: 13px;
    height: 13px;
}
.rules-btn:hover {
    background: linear-gradient(135deg, #ffdd7a, #eecb66);
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(231, 195, 93, .45);
}
.rules-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(231, 195, 93, .3);
}

/* ============================================================
 * 规则及免责声明弹窗
 * ============================================================ */
.rules-dialog {
    width: min(680px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 22px;
    color: var(--ink);
    background: #fff7f5;
    box-shadow: 0 35px 100px rgba(89, 31, 35, .32);
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.rules-dialog::backdrop {
    background: rgba(84, 42, 45, .42);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.rules-dialog[open] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}
.rules-dialog.fallback::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: -100vh -100vw;
    background: rgba(84, 42, 45, .48);
}

.rules-dialog-body {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}

.rules-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #927f80;
    background: rgba(255, 255, 255, .78);
    cursor: pointer;
    transition: .15s;
}
.rules-close:hover {
    color: var(--ink);
    background: #fff;
}
.rules-close .svg-icon {
    width: 17px;
    height: 17px;
}

.rules-head {
    flex: 0 0 auto;
    padding: 26px 58px 18px 28px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(255, 246, 244, .9), rgba(255, 236, 232, .7));
}
.rules-head small {
    display: block;
    margin-bottom: 6px;
    color: var(--red);
    font: 800 9px/1 "Trebuchet MS", sans-serif;
    letter-spacing: .22em;
}
.rules-head h2 {
    margin: 0;
    font-family: "Songti SC", "STSong", serif;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: .01em;
    line-height: 1.4;
}

.rules-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 28px 28px;
    color: #4a3a3b;
    font-size: 13.5px;
    line-height: 1.85;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.rules-scroll h3 {
    margin: 22px 0 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: .01em;
}
.rules-scroll h3:first-child {
    margin-top: 0;
}
.rules-scroll h4 {
    margin: 16px 0 8px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--red-deep);
}
.rules-scroll p {
    margin: 0 0 10px;
}
.rules-scroll ol {
    margin: 0 0 10px;
    padding-left: 22px;
}
.rules-scroll li {
    margin-bottom: 6px;
}
.rules-scroll li::marker {
    color: var(--red);
    font-weight: 800;
}

@media (max-width: 720px) {
    .rules-btn {
        padding: 4px 9px;
        font-size: 10px;
    }
    .rules-btn > * { margin-right: 3px; }
    .rules-btn .svg-icon {
        width: 12px;
        height: 12px;
    }

    .rules-dialog {
        width: calc(100% - 24px);
        border-radius: 20px;
    }
    .rules-dialog-body {
        max-height: calc(100dvh - 24px);
    }
    .rules-head {
        padding: 22px 52px 14px 20px;
    }
    .rules-head h2 {
        font-size: 16.5px;
    }
    .rules-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }
    .rules-close .svg-icon {
        width: 15px;
        height: 15px;
    }
    .rules-scroll {
        padding: 16px 20px 24px;
        font-size: 13px;
        line-height: 1.8;
    }
    .rules-scroll h3 {
        font-size: 14px;
        margin: 18px 0 8px;
    }
    .rules-scroll h4 {
        font-size: 13px;
        margin: 14px 0 6px;
    }
}

@media (max-width: 380px) {
    .rules-btn {
        padding: 3px 8px;
        font-size: 9.5px;
    }
    .rules-head {
        padding: 18px 48px 12px 16px;
    }
    .rules-head h2 {
        font-size: 15.5px;
    }
    .rules-scroll {
        padding: 14px 16px 20px;
        font-size: 12.5px;
    }
    .rules-scroll h3 {
        font-size: 13.5px;
    }
}

@supports not (height: 100dvh) {
    @media (max-width: 720px) {
        .rules-dialog-body {
            max-height: calc(100vh - 24px);
        }
    }
}

/* ============================================================
 * ★ 分享方法教程弹窗
 * ============================================================ */
.guide-dialog {
    width: min(560px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 22px;
    color: var(--ink);
    background: #fff8f4;
    box-shadow: 0 35px 100px rgba(89,31,35,.32);
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.guide-dialog::backdrop {
    background: rgba(84,42,45,.42);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.guide-dialog[open] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}
.guide-dialog.fallback::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: -100vh -100vw;
    background: rgba(84,42,45,.48);
}

.guide-dialog-body {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}

.guide-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #927f80;
    background: rgba(255,255,255,.78);
    cursor: pointer;
    transition: .15s;
}
.guide-close:hover { color: var(--ink); background: #fff; }
.guide-close .svg-icon { width: 17px; height: 17px; }

.guide-head {
    flex: 0 0 auto;
    padding: 26px 58px 18px 28px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(255,246,244,.9), rgba(255,236,232,.7));
}
.guide-head small {
    display: block;
    margin-bottom: 6px;
    color: var(--red);
    font: 800 9px/1 "Trebuchet MS", sans-serif;
    letter-spacing: .22em;
}
.guide-head h2 {
    margin: 0;
    font-family: "Songti SC", "STSong", serif;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.4;
}

.guide-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 28px 28px;
    color: #4a3a3b;
    font-size: 13.5px;
    line-height: 1.85;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.guide-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 4px 0 20px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(137,59,65,.14);
}

.guide-scroll p {
    margin: 0 0 12px;
}
.guide-scroll .guide-highlight {
    color: var(--red-deep);
    font-weight: 800;
}
.guide-scroll h3 {
    margin: 20px 0 10px;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ink);
}
.guide-scroll h3:first-child { margin-top: 0; }

.guide-steps {
    margin: 0 0 14px;
    padding-left: 22px;
}
.guide-steps li {
    margin-bottom: 8px;
}
.guide-steps li::marker {
    color: var(--red);
    font-weight: 800;
}

.guide-earn {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    color: #7a5a12;
    background: linear-gradient(135deg, rgba(255,232,180,.7), rgba(255,244,214,.7));
    border: 1px dashed rgba(231,195,93,.7);
    font-size: 13px;
    line-height: 1.8;
}
.guide-earn strong { color: #b8801a; }

@media (max-width: 720px) {
    .guide-dialog {
        width: calc(100% - 24px);
        border-radius: 20px;
    }
    .guide-dialog-body { max-height: calc(100dvh - 24px); }
    .guide-head { padding: 22px 52px 14px 20px; }
    .guide-head h2 { font-size: 16.5px; }
    .guide-close { top: 10px; right: 10px; width: 30px; height: 30px; }
    .guide-close .svg-icon { width: 15px; height: 15px; }
    .guide-scroll {
        padding: 16px 20px 24px;
        font-size: 13px;
        line-height: 1.8;
    }
    .guide-image { border-radius: 14px; margin-bottom: 16px; }
    .guide-scroll h3 { font-size: 14px; margin: 18px 0 8px; }
}

@supports not (height: 100dvh) {
    @media (max-width: 720px) {
        .guide-dialog-body { max-height: calc(100vh - 24px); }
    }
}

/* ============================================================
 * SEO 辅助样式
 * ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-intro {
    margin: 36px auto 0;
    max-width: 720px;
    padding: 0 8px;
    color: #b0a0a1;
    font-size: 11.5px;
    line-height: 1.85;
    text-align: center;
    letter-spacing: .01em;
}
@media (max-width: 720px) {
    .page-intro {
        margin-top: 22px;
        padding: 0 4px;
        font-size: 11px;
        line-height: 1.75;
    }
}

/* ============================================================
 * ★ SEO：首页底部指南与 FAQ 内链导航（纯文字版）
 * ============================================================ */
.site-guide-nav {
    margin: 32px auto 0;
    max-width: 720px;
    padding: 0 8px;
    text-align: center;
    color: #b0a0a1;
    font-size: 11px;
    line-height: 2.2;
}

.site-guide-nav a {
    color: #b0a0a1;
    text-decoration: none;
    transition: .15s;
}

.site-guide-nav a:hover {
    color: var(--red);
}

@media (max-width: 720px) {
    .site-guide-nav {
        margin-top: 22px;
        padding: 0 4px;
        font-size: 11.5px;
        line-height: 2;
    }
}

/* ============================================================
 * ★ SEO：文章页 / 天数聚合页兜底样式
 * ============================================================ */
.article-shell {
    padding-bottom: 48px;
}

.article-back-top {
    position: sticky;
    top: 0;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(255, 57, 63, .25);
    transition: .18s;
    -webkit-tap-highlight-color: transparent;
}
.article-back-top > * { margin-right: 6px; }
.article-back-top > *:last-child { margin-right: 0; }

.article-back-top:hover {
    background: var(--red-deep);
    transform: translateY(-1px);
}

.article-back-top .svg-icon {
    width: 16px;
    height: 16px;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 12.5px;
}
.article-breadcrumb > * { margin-right: 6px; }
.article-breadcrumb > *:last-child { margin-right: 0; }

.article-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.article-breadcrumb a:hover {
    color: var(--red);
}

.article-breadcrumb .sep {
    color: #c8b8b9;
}

.article-envelope {
    padding: 36px 44px 32px;
    border-radius: 24px;
}

.article-hero h1 {
    margin: 0 0 10px;
    font-family: "Songti SC", "STSong", serif;
    font-size: clamp(22px, 3.6vw, 30px);
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: .01em;
}

.article-hero h1::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin-top: 14px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--red), #ff9aa0);
}

.article-body {
    margin-top: 26px;
    color: #3f3031;
    font-size: 15px;
    line-height: 1.9;
    word-wrap: break-word;
}

.article-body h2 {
    margin: 32px 0 12px;
    padding-left: 12px;
    border-left: 4px solid var(--red);
    color: var(--ink);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
}

.article-body h3 {
    margin: 24px 0 10px;
    color: var(--red-deep);
    font-size: 15.5px;
    font-weight: 800;
}

.article-body p { margin: 0 0 14px; }

.article-body ol,
.article-body ul {
    margin: 0 0 14px;
    padding-left: 24px;
}

.article-body li { margin-bottom: 8px; }

.article-body li::marker {
    color: var(--red);
    font-weight: 800;
}

.article-body strong {
    color: var(--ink);
    font-weight: 800;
}

.article-body a {
    color: var(--red-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-related {
    margin-top: 28px;
    padding: 0 4px;
}

.article-related h2 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 800;
    color: var(--red-deep);
    letter-spacing: .06em;
}

.article-related-links {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 2;
}

.article-related-links a {
    color: var(--muted);
    text-decoration: none;
    transition: .15s;
}

.article-related-links a:hover {
    color: var(--red);
}

.article-back-bottom {
    margin-top: 30px;
    text-align: center;
}

.days-summary {
    margin: 22px 0 18px;
    color: #5a4a4b;
    font-size: 14.5px;
    line-height: 1.85;
}

.days-summary strong {
    color: var(--red-deep);
    font-weight: 900;
}

.days-switch {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    margin: 0 0 22px;
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    border: 1px solid var(--line);
}
.days-switch > * { margin-right: 2px; }
.days-switch > *:last-child { margin-right: 0; }

.days-switch a {
    padding: 6px 16px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    transition: .15s;
    white-space: nowrap;
}

.days-switch a:hover {
    color: var(--ink);
}

.days-switch a.active {
    color: #fff;
    background: var(--red);
    box-shadow: 0 3px 10px rgba(255,57,63,.25);
}

@media (max-width: 720px) {
    .article-shell {
        padding-bottom: 32px;
    }

    .article-back-top {
        padding: 9px 16px;
        font-size: 13px;
        margin-bottom: 14px;
    }

    .article-breadcrumb {
        margin-bottom: 14px;
        font-size: 12px;
    }

    .article-envelope {
        padding: 22px 18px 20px;
        border-radius: 18px;
    }

    .article-hero h1 {
        font-size: 20px;
    }

    .article-body {
        margin-top: 20px;
        font-size: 14.5px;
        line-height: 1.85;
    }

    .article-body h2 {
        font-size: 16px;
        margin-top: 26px;
    }

    .article-body h3 {
        font-size: 14.5px;
    }

    .article-related {
        margin-top: 22px;
    }

    .article-related-links {
        font-size: 12.5px;
        line-height: 1.9;
    }

    .article-back-bottom {
        margin-top: 22px;
    }

    .days-summary {
        font-size: 13.5px;
    }

    .days-switch a {
        padding: 5px 13px;
        font-size: 12.5px;
    }
}

@media (max-width: 380px) {
    .article-envelope {
        padding: 18px 14px 16px;
    }

    .article-hero h1 {
        font-size: 18px;
    }

    .article-body {
        font-size: 14px;
    }
}

/* ============================================================
 * ★ 数字滚动动画：等宽数字，防止滚动时宽度抖动
 * ============================================================ */
#totalClaimed,
.link-meta b {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}
/* ============================================================
 * ★ 主 Tabs 三列自适应（QQ音乐 tab 加入后修复手机端错位）
 * ------------------------------------------------------------
 * 原理：
 *   - flex: 1 0 0 —— 空间足够时三个 tab 平分宽度
 *   - flex-shrink: 0 —— 空间不足时 tab 不压缩（不会挤压文字）
 *   - overflow-x: auto —— 空间不足时父容器横向滚动
 * 效果：
 *   - 桌面端：三个 tab 平分，视觉不变
 *   - 手机端：放得下平分；放不下则手指左右滑动
 *   - 1～2 个 tab 时行为完全不变，与原来一致
 * ============================================================ */

.main-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;              /* Firefox 隐藏滚动条 */
    -ms-overflow-style: none;           /* IE/Edge 隐藏滚动条 */
    -webkit-overflow-scrolling: touch;  /* iOS 惯性滚动 */
    scroll-behavior: smooth;
    scroll-padding: 3px;
}

.main-tabs::-webkit-scrollbar {
    display: none;                      /* Chrome/Safari 隐藏滚动条 */
    width: 0;
    height: 0;
}

/* ★ 关键改动：flex: 1 0 0 
 * - flex-grow: 1     → 空间够时平分
 * - flex-shrink: 0   → 空间不够时不压缩（核心！）
 * - flex-basis: 0    → 从 0 开始分配，保证真正平分
 */
.main-tab {
    flex: 1 0 0;
}

/* 手机端：略微收紧字号与内边距，让三个 tab 更容易完整放下 */
@media (max-width: 720px) {
    .main-tab {
        padding: 9px 10px;
        font-size: 12.5px;
    }
}

/* 超小屏（≤ 380px）：再收紧一点 */
@media (max-width: 380px) {
    .main-tab {
        padding: 8px 8px;
        font-size: 12px;
    }
}
/* ============================================================
 * ★ 网易云会员头像（link-no 前的正方形小头像）
 * ------------------------------------------------------------
 * - 尺寸：1em × 1em，与文字高度一致
 * - 圆角：4px
 * - 图片加载失败时自动隐藏（由 JS onerror 处理）
 * ============================================================ */
.link-avatar-img {
    display: inline-block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    margin-right: 6px;
    border-radius: 4px;
    overflow: hidden;
    background: #f0e6e6;
    vertical-align: -0.12em;
    line-height: 0;
    box-shadow: 0 1px 3px rgba(137, 59, 65, .12);
}

.link-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 0;
}

/* 手机端稍微小一点，与 link-no 的字体高度保持一致 */
@media (max-width: 720px) {
    .link-avatar-img {
        margin-right: 5px;
        border-radius: 3px;
    }
}

@media (max-width: 380px) {
    .link-avatar-img {
        margin-right: 4px;
        border-radius: 3px;
    }
}