: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;
    gap: 24px;
    width: 67%;
    height: 178px;
    top: 32px;
    left: 1%;
    padding: 22px 28px;
    color: #f7dddd;
    background: linear-gradient(145deg, #292526, #080808);
    transform: rotate(-8deg);
}
.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; }

/* ---------- 信封 ---------- */
.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; gap: 14px; }
.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;
    gap: 9px;
    margin: 36px 0 10px;
}
.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;
    gap: 6px;
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 13px;
}
.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;
    gap: 9px;
    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 .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); }

/* ---------- 列表区 ---------- */
.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;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.tabs {
    display: flex;
    align-items: center;
    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;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    border: 1px solid var(--line);
}
.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;
    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;
    gap: 8px;
    margin-bottom: 6px;
}
.link-no { color: var(--ink); font-size: 15px; font-weight: 800; }

.link-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    color: #a59495;
    font-size: 12px;
    line-height: 1;
}
.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.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;
    gap: 8px;
}

.admin-actions { display: none; }
body.admin-visible .admin-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.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; gap: 10px; }
.pc-actions button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: .15s;
}
.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; gap: 10px; }
.claim-actions button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 12px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
}
.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 { 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; gap: 7px; }
    .link-no { font-size: 14.5px; }
    .link-meta { gap: 10px; font-size: 11.5px; }
    .meta-item .svg-icon { width: 12px; height: 12px; }
    .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;
        gap: 10px;
        border-radius: 14px;
        box-shadow: 0 12px 26px rgba(40,18,20,.22);
    }
    .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; }

    .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 { gap: 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; gap: 6px; white-space: nowrap; }
    .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 .svg-icon { width: 13px; height: 13px; }
    .total-claimed b { font-size: 15px; }

    .primary-share { padding: 13px 16px; font-size: 15px; gap: 7px; }

    .links {
        width: 100%;
        max-width: 100%;
        margin-top: 18px;
        padding: 18px 14px 20px;
        border-radius: 16px;
        overflow: hidden;
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
    .link-list { grid-template-columns: 1fr; }
    .section-head { padding-bottom: 14px; gap: 8px; }
    .tabs { gap: 10px; }
    .tabs h2 { font-size: 16px; }
    .list-label { font-size: 10px; }

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

    .link-card {
        grid-template-columns: auto minmax(0,1fr) auto;
        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; gap: 6px; }
    .link-no { font-size: 13.5px; }

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

    .actions { gap: 6px; }
    .admin-actions { gap: 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; }

    .bottom-share {
        width: 100%;
        max-width: 100%;
        margin-top: 16px;
        padding: 13px;
        font-size: 15px;
        gap: 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 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 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; gap: 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: 16px 12px 18px; }
    .tabs h2 { font-size: 15px; }
    .list-label { display: none; }

    .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; gap: 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; }

    .claim-actions {
        flex-direction: column;
        gap: 8px;
    }
    .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; }
}