/* Original gift backdrop, without the site's dark palette overlays. */
body .gift-art,body:not(.light-theme) .gift-art,
body .detail-art,body:not(.light-theme) .detail-art{
  background:radial-gradient(circle at 50% 40%,var(--c1),var(--c2));
}
body .gift-art{aspect-ratio:1}
body .gift-art::after,body:not(.light-theme) .gift-art::after{background:none}
body .gift-art::before,body:not(.light-theme) .gift-art::before,
body .detail-art::before{
  content:'';position:absolute;inset:0;z-index:0;pointer-events:none;
  background:rgba(0,0,0,.16);opacity:1;filter:none;
  mask-image:var(--pattern);mask-size:56px 56px;mask-repeat:repeat;
  -webkit-mask-image:var(--pattern);-webkit-mask-size:56px 56px;-webkit-mask-repeat:repeat;
}
body .detail-art>.pattern{display:none}
body .gift-art .nft-animation{inset:17%;width:66%;height:66%;aspect-ratio:auto;margin:0}
body .gift-art .gift-image{inset:17%;width:66%;height:66%;object-fit:contain}
body .detail-art .nft-animation{inset:0;width:72%;height:72%;max-width:512px;aspect-ratio:1;margin:auto}
body .detail-art .gift-image{width:72%;height:auto;aspect-ratio:1;object-fit:contain}

body .gift-art::before,body:not(.light-theme) .gift-art::before,body .detail-art::before{content:none}
.nft-pattern-grid{position:absolute;inset:0;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(4,1fr);place-items:center;padding:5%;z-index:0;pointer-events:none}
.nft-pattern-grid>span{display:block;width:24px;height:24px;max-width:45%;aspect-ratio:1;background:#000;opacity:.09;mask:var(--pattern) center/contain no-repeat;-webkit-mask:var(--pattern) center/contain no-repeat}
.nft-pattern-grid>span:nth-child(3n+1){transform:rotate(-12deg)}
.nft-pattern-grid>span:nth-child(3n+2){transform:rotate(10deg)}
.detail-art .nft-pattern-grid>span{width:30px;height:30px}

/* Offset each second row by half a repeat. */
.nft-pattern-grid{display:block;padding:0}
.nft-pattern-grid>span{position:absolute;left:var(--pattern-x);top:var(--pattern-y);translate:-50% -50%}

.nft-animation svg{transform:none!important;filter:none!important;shape-rendering:geometricPrecision}

.nft-animation .nft-poster{display:block;width:100%;height:100%;object-fit:contain;filter:none}
.gift-card{content-visibility:auto;contain-intrinsic-size:auto 320px}

body .gift-art.nft-ready>.nft-pattern-grid,body .detail-art.nft-ready>.nft-pattern-grid{display:none}
body .gift-art .nft-animation,body .detail-art .nft-animation{max-width:none}

body .gift-art .nft-animation{inset:0;width:100%;height:100%;margin:0}

.nft-detail-preview{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.detail-art.nft-ready>.nft-detail-preview{visibility:hidden}

body .gift-card{border-radius:26px;overflow:hidden;padding:7px}
body .gift-art{border-radius:21px;overflow:hidden}
body .gift-body{padding:12px 7px 10px}
@media(max-width:480px){body .gift-card{border-radius:22px;padding:5px}body .gift-art{border-radius:17px}}

body .gift-card .favorite-button{top:12px;right:12px;border-radius:50%}
body .gift-card .gift-number{top:11px;left:11px}
@media(max-width:480px){body .gift-card .favorite-button{top:8px;right:8px}body .gift-card .gift-number{top:9px;left:9px}}

body .gift-card .gift-price{font-size:26px;font-weight:850;line-height:1.15;letter-spacing:-.65px;color:var(--text)}
.card-buy{display:flex;align-items:center;justify-content:center;width:calc(100% - 14px);min-height:40px;margin:0 7px 8px;padding:9px 14px;border:1px solid #c7dcf5;border-radius:22px;background:linear-gradient(110deg,#abc8eb,#d1e3f7);color:#102137;font-size:14px;font-weight:850;box-shadow:0 3px 14px #99bee61c;transition:filter .16s,box-shadow .16s}
.card-buy:hover{filter:brightness(1.07);box-shadow:0 4px 18px #99bee635}
.card-buy:focus-visible{outline:2px solid #d6e7fc;outline-offset:3px}
@media(max-width:480px){body .gift-card .gift-price{font-size:23px}.card-buy{width:calc(100% - 10px);margin:0 5px 7px;min-height:38px;font-size:13px}}
@media(prefers-reduced-motion:reduce){.card-buy{transition:none}}

body .gift-card .gift-body h3{font-size:15px;font-weight:850;line-height:1.3;letter-spacing:-.2px;margin:0 0 3px}
body .gift-card .gift-model{font-size:12px;font-weight:750;line-height:1.4;color:#98a6b8;margin:0}
.light-theme .gift-card .gift-model{color:#65788f}
@media(max-width:480px){body .gift-card .gift-body h3{font-size:14px}body .gift-card .gift-model{font-size:11px}}

/* A centered catalogue with consistent card widths and defined frames. */
body .catalog-section{width:100%;max-width:1280px;margin-inline:auto}
body .gift-grid:not(.list-view){grid-template-columns:repeat(6,minmax(0,1fr));gap:18px 16px}
body .gift-card,body:not(.light-theme) .gift-card{
  border:1px solid #354355;background:linear-gradient(150deg,#17222f,#111b27);
  box-shadow:inset 0 1px 0 #ffffff06;
}
body .gift-card:hover{border-color:#839fbe;box-shadow:0 6px 18px #0002,inset 0 1px 0 #ffffff09}
.light-theme .gift-card{border-color:#c2d0e0;background:#fff}
@media(max-width:1199px){body .gift-grid:not(.list-view){grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:1000px){body .gift-grid:not(.list-view){grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){body .gift-grid:not(.list-view){grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}}

/* List view: one compact row, with an independent purchase action. */
body .gift-grid.list-view{grid-template-columns:1fr;gap:12px}
body .list-view .gift-card{display:grid;grid-template-columns:minmax(0,1fr) 136px;align-items:center;gap:20px;padding:10px 16px 10px 10px;border-radius:24px;contain-intrinsic-size:auto 110px}
body .list-view .card-open{display:flex;align-items:center;gap:16px;min-width:0;width:100%}
body .list-view .gift-art{width:88px;height:88px;flex:0 0 88px;border-radius:17px;aspect-ratio:1}
body .list-view .gift-body{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 24px;align-items:center;flex:1;min-width:0;padding:0}
body .list-view .gift-body h3{grid-column:1;grid-row:1;margin:0;font-size:16px;overflow-wrap:anywhere}
body .list-view .gift-model{grid-column:1;grid-row:2;font-size:12px;margin:0}
body .list-view .gift-bottom{grid-column:2;grid-row:1/3;margin:0;justify-content:flex-end}
body .list-view .gift-price{font-size:24px;white-space:nowrap}
body .list-view .card-buy{width:136px;min-height:42px;margin:0;justify-self:end;border-radius:22px}
body .list-view .favorite-button{left:68px;right:auto;top:12px;width:28px;height:28px}
@media(max-width:600px){
 body .list-view .gift-card{grid-template-columns:minmax(0,1fr) 88px;gap:10px;padding:8px;border-radius:20px}
 body .list-view .card-open{gap:10px}
 body .list-view .gift-art{width:64px;height:64px;flex-basis:64px;border-radius:13px}
 body .list-view .gift-body{grid-template-columns:1fr;gap:2px}
 body .list-view .gift-body h3{font-size:13px}
 body .list-view .gift-model{font-size:10px}
 body .list-view .gift-bottom{grid-column:1;grid-row:3;justify-content:flex-start;margin-top:2px}
 body .list-view .gift-price{font-size:18px}
 body .list-view .card-buy{width:88px;min-height:36px;padding:7px 10px;font-size:12px}
 body .list-view .favorite-button{left:46px;top:9px;width:25px;height:25px}
}

.card-buy:disabled{cursor:not-allowed;opacity:.5;box-shadow:none}
.gift-card[data-unavailable=true] .gift-price{opacity:.5}

/* Myth Mask: transparent model assets retain the selected gift backdrop. */
body .myth-mask-art .nft-animation{inset:12%!important;width:76%!important;height:76%!important;margin:0!important}
body .myth-mask-art .nft-detail-preview{inset:12%;width:76%;height:76%}
.myth-mask-pattern{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.myth-mask-pattern>span{position:absolute;width:11%;height:11%;background:#000;opacity:.12;mask:var(--pattern) center/contain no-repeat;-webkit-mask:var(--pattern) center/contain no-repeat}

body .detail-art.myth-mask-art{background:radial-gradient(circle at 50% 40%,var(--c1),var(--c2))!important}
