/* 礼物模块专属样式，全部挂在 body.gift-page / .gift-app 下，避免污染全站 */
body.gift-page{
    margin:0;
    background:#e9e9f2;
    color:#181a32;
    font:14px/1.45 "PingFang HK","PingFang SC",system-ui,"Microsoft YaHei",sans-serif;
    padding-bottom:70px;
}
body.gift-page a{color:inherit;text-decoration:none;}
body.gift-page .gift-app{
    box-sizing:border-box;
    max-width:480px;
    min-height:100vh;
    min-height:100dvh;
    margin:0 auto;
    background:#f4f4fa;
    padding:16px 15px 80px;
}
body.gift-page .gift-app *,
body.gift-page .gift-app *::before,
body.gift-page .gift-app *::after{box-sizing:border-box;}
body.gift-page .gift-app a:focus-visible,
body.gift-page .gift-app button:focus-visible,
body.gift-page .gift-app input:focus-visible,
body.gift-page .gift-app textarea:focus-visible,
body.gift-page .gift-app summary:focus-visible{
    outline:2px solid #7668ed;
    outline-offset:3px;
}
body.gift-page .gift-app button,
body.gift-page .gift-app input,
body.gift-page .gift-app textarea{font:inherit;}
body.gift-page .gift-app h1,
body.gift-page .gift-app h2,
body.gift-page .gift-app h3,
body.gift-page .gift-app p{margin:0 0 8px;}
body.gift-page .gift-app h1{font-size:19px;}
body.gift-page .gift-app h2{font-size:17px;}
body.gift-page .gift-app h3{font-size:14px;margin-top:12px;}
body.gift-page .gift-app small{font-size:12px;color:#666b83;}
body.gift-page .gift-app img{display:block;max-width:100%;object-fit:contain;}

body.gift-page .gift-app .button,
body.gift-page .gift-app button.button,
body.gift-page .gift-dock .btn{
    border:0;
    border-radius:10px;
    background:#5147c9;
    color:#fff;
    cursor:pointer;
    padding:9px 14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    font-weight:600;
}
body.gift-page .gift-app .button.compact{padding:6px 10px;font-size:13px;}
body.gift-page .gift-app .button.secondary,
body.gift-page .gift-dock .btn2{
    background:#efedf9;
    color:#5147c9;
}

body.gift-page .gift-head{
    margin:-16px -15px 16px;
    background:linear-gradient(90deg,#25295b,#4846be);
    height:60px;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    font-size:18px;
    font-weight:600;
}
body.gift-page .gift-head a{
    position:absolute;
    left:8px;
    padding:2px 14px;
    font-size:32px;
    color:#fff;
    line-height:1;
}

body.gift-page .gift-app form.search{
    display:flex;
    align-items:center;
    gap:9px;
    background:#fff;
    border-radius:13px;
    padding:5px 5px 5px 11px;
    margin-bottom:14px;
}
body.gift-page .gift-app form.search svg{
    width:19px;height:19px;fill:none;stroke:#666b83;stroke-width:1.7;stroke-linecap:round;flex:none;
}
body.gift-page .gift-app form.search input{
    border:0;background:none;min-width:0;flex:1;outline:none;color:#181a32;padding:8px 0;
}
body.gift-page .gift-app form.search button{
    border:0;border-radius:10px;background:#5147c9;color:#fff;font-weight:600;padding:9px 14px;flex:none;cursor:pointer;
}

body.gift-page .gift-history{
    background:#fff;margin:0 0 14px;border-radius:13px;padding:10px 12px;display:none;
}
body.gift-page .gift-history .t{font-size:12px;color:#666b83;margin-bottom:6px;}
body.gift-page .gift-history .t a{color:#5147c9;float:right;}
body.gift-page .gift-history a.tag{
    display:inline-block;background:#eeedf8;border-radius:12px;padding:4px 10px;margin:0 6px 6px 0;font-size:12px;color:#181a32;
}

body.gift-page .gift-app .categories{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
    margin-bottom:16px;
}
body.gift-page .gift-app .categories a{
    position:relative;
    border-radius:11px;
    display:block;
    color:#fff;
    background:linear-gradient(#4f397d,#34245d);
    font-weight:600;
    font-size:clamp(10px,3.2vw,14px);
    text-align:center;
    height:0;
    padding-bottom:140%;
    overflow:hidden;
}
body.gift-page .gift-app .categories a:nth-child(4n+2){background:linear-gradient(#315985,#203c64);}
body.gift-page .gift-app .categories a:nth-child(4n+3){background:linear-gradient(#774931,#573028);}
body.gift-page .gift-app .categories a:nth-child(4n){background:linear-gradient(#315d62,#203f45);}
body.gift-page .gift-app .categories a.on{box-shadow:0 0 0 2px #fff,0 0 0 4px #5147c9;}
body.gift-page .gift-app .categories a .inner{
    position:absolute;left:0;top:0;right:0;bottom:0;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8%;
    padding:8px 4px;
}
body.gift-page .gift-app .categories a .ico{
    width:76%;
    padding-bottom:76%;
    background-repeat:no-repeat;
    background-position:center;
    background-size:contain;
}
body.gift-page .gift-app .categories a:nth-child(4n+1) .ico{background-image:url("../images/gift/cat-1.png?v=20261122b");}
body.gift-page .gift-app .categories a:nth-child(4n+2) .ico{background-image:url("../images/gift/cat-2.png?v=20261122b");}
body.gift-page .gift-app .categories a:nth-child(4n+3) .ico{background-image:url("../images/gift/cat-3.png?v=20261122b");}
body.gift-page .gift-app .categories a:nth-child(4n) .ico{background-image:url("../images/gift/cat-4.png?v=20261122b");}

body.gift-page .gift-limit{margin:0 0 12px;font-size:12px;color:#d12926;}

body.gift-page .gift-app .sort{
    display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;
    gap:30px;border-radius:11px;background:#eeedf8;padding:12px 14px;margin-bottom:14px;
    font-size:clamp(11px,3.4vw,14px);color:#666b83;
}
body.gift-page .gift-app .sort a.on{color:#5147c9;font-weight:700;}

body.gift-page .gift-app .recommend{
    display:flex;align-items:center;gap:7px;font-size:19px;font-weight:600;margin:0 0 12px;
}
body.gift-page .gift-app .recommend img{width:18px;height:18px;max-width:18px;max-height:18px;flex:none;object-fit:contain;display:block;overflow:hidden;}
body.gift-page .gift-app .recommend small{font-weight:400;color:#666b83;font-size:12px;}

body.gift-page .gift-app .grid{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:20px;
}
body.gift-page .gift-app .gift{
    border-radius:14px;overflow:hidden;background:#fff;
}
body.gift-page .gift-app .gift .art{
    position:relative;display:block;height:0;padding-bottom:58.8%; /* 1 / 1.7 */
    background:#e9e5f4;
}
body.gift-page .gift-app .gift:nth-child(3n+2) .art{background:#eee8ef;}
body.gift-page .gift-app .gift:nth-child(3n) .art{background:#f2e9e2;}
body.gift-page .gift-app .gift .art img{
    position:absolute;left:2.5%;top:2.5%;width:95%;height:95%;object-fit:contain;
    pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;
}
body.gift-page .gift-app .gift-gif{position:relative;overflow:hidden;}
body.gift-page .gift-app .gift-gif .mask,
body.gift-page .gift-app .gift .art .mask{
    position:absolute;left:0;top:0;right:0;bottom:0;z-index:2;
}
body.gift-page .gift-app .gift-body{padding:8px 10px 12px;}
body.gift-page .gift-app .gift-body strong,
body.gift-page .gift-app .gift-body .name{display:block;font-weight:600;font-size:14px;}
body.gift-page .gift-app .gift-body small{display:block;margin:3px 0;}
body.gift-page .gift-app .line{display:flex;align-items:center;justify-content:space-between;gap:8px;}
body.gift-page .gift-app .price{color:#d12926;font-weight:600;}
body.gift-page .gift-app .price.large{font-size:23px;margin-top:8px;}

body.gift-page .gift-empty{
    padding:48px 16px;text-align:center;color:#666b83;background:#fff;border-radius:14px;margin-bottom:16px;
}
body.gift-page .gift-empty b{display:block;color:#181a32;font-size:16px;margin-bottom:6px;}

body.gift-page .gift-app .detail-art{
    background:#ebe8fa;border-radius:16px;margin-bottom:12px;
    position:relative;height:0;padding-bottom:74%; /* ~1.35 */
}
body.gift-page .gift-app .detail-art img{
    position:absolute;left:4%;top:0;width:92%;height:100%;object-fit:contain;
    pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;
}

body.gift-page .gift-app section.panel{
    background:#fff;padding:14px;border-radius:14px;margin-bottom:12px;
}
body.gift-page .gift-app hr{border:0;border-top:1px solid #e9e8f4;margin:12px 0;}
body.gift-page .gift-app .stepper{
    display:grid;grid-template-columns:32px 40px 32px;align-items:center;text-align:center;
}
body.gift-page .gift-app .stepper button{
    border:0;padding:0;width:32px;height:32px;font-size:20px;border-radius:10px;cursor:pointer;
    background:#5147c9;color:#fff;
}
body.gift-page .gift-app .stepper button:first-child{background:#efedf9;color:#5147c9;}

body.gift-page .gift-dock{
    position:fixed;bottom:0;left:50%;transform:translateX(-50%);
    width:min(480px,100%);
    background:#fff;border-top:1px solid #e8e7f2;
    padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px));
    display:flex;align-items:center;gap:10px;z-index:20;
    box-sizing:border-box;
}
body.gift-page .gift-dock .btn,
body.gift-page .gift-dock .btn2{flex:1;height:40px;border:0;cursor:pointer;}
body.gift-page .gift-dock .price{flex:none;font-size:20px;}

body.gift-page .gift-mask{
    position:fixed;left:0;top:0;right:0;bottom:0;background:#15162699;z-index:50;display:none;
}
body.gift-page .gift-dialog{
    position:absolute;left:50%;top:15%;transform:translateX(-50%);
    width:min(90%,410px);background:#fff;border-radius:17px;padding:18px;
    max-height:70%;overflow:auto;color:#181a32;box-sizing:border-box;
}
body.gift-page .gift-dialog .line{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;}
body.gift-page .gift-dialog h2{font-size:17px;margin:0;}
body.gift-page .gift-dialog .notice-body{font-size:13px;color:#444;line-height:1.6;white-space:pre-wrap;}
body.gift-page .gift-dialog .btn,
body.gift-page .gift-dialog .btn2{
    width:100%;height:40px;border:0;border-radius:10px;margin-top:9px;cursor:pointer;font-weight:600;
}
body.gift-page .gift-dialog .btn{background:#5147c9;color:#fff;}
body.gift-page .gift-dialog .btn2{background:#efedf9;color:#5147c9;}
body.gift-page .gift-dialog .close{
    border:0;background:none;color:#181a32;font-size:24px;line-height:1;padding:0 4px;cursor:pointer;
}

body.gift-page .gift-app .gift-form label{display:block;margin:10px 0;font-weight:600;}
body.gift-page .gift-app .gift-form label input,
body.gift-page .gift-app .gift-form label textarea{
    width:100%;border:0;border-radius:8px;background:#f1f1f8;padding:9px;margin-top:4px;font-weight:400;font-family:inherit;
}
body.gift-page .gift-app .gift-form textarea{min-height:64px;}
body.gift-page .gift-app .gift-form .err{color:#d12926;margin:0 0 8px;}

body.gift-page .gift-app .tabs{
    display:flex;align-items:stretch;justify-content:stretch;gap:0;
    border-radius:11px;background:#e9e7f5;padding:3px;margin-bottom:12px;
    font-size:clamp(11px,3.4vw,14px);color:#666b83;overflow-x:auto;-webkit-overflow-scrolling:touch;
}
body.gift-page .gift-app .tabs a{
    flex:1 0 auto;text-align:center;padding:8px 10px;min-width:4.5em;white-space:nowrap;
}
body.gift-page .gift-app .tabs a.on,
body.gift-page .gift-app .tabs a.selected{
    background:#fff;border-radius:9px;color:#5147c9;font-weight:600;
}

body.gift-page .gift-app .order-card{
    background:#fff;padding:14px;border-radius:14px;margin-bottom:12px;
}
body.gift-page .gift-app .order-row{display:flex;align-items:center;gap:12px;}
body.gift-page .gift-app .order-row img,
body.gift-page .gift-app .order-row .thumb{
    width:66px;height:60px;background:#eeebf8;border-radius:9px;object-fit:contain;flex:none;
    pointer-events:none;
}
body.gift-page .gift-app .order-row .meta{flex:1;min-width:0;}
body.gift-page .gift-app .order-row small.status{margin-left:auto;color:#5147c9;flex:none;}
body.gift-page .gift-app .proof{
    margin-top:10px;display:grid;place-items:center;min-height:140px;
    background:#ebe8f8;color:#5147c9;border-radius:8px;overflow:hidden;
}
body.gift-page .gift-app .proof img{max-width:100%;pointer-events:none;}
body.gift-page .gift-app details summary{cursor:pointer;font-weight:600;}