/* Inventory and deposit refinements — scoped, no changes to crafting result screens. */
.inventory-gift .gift-bottom { gap:0!important; }
.inventory-gift .gift-bottom .price {
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    flex:1 1 100%!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    padding:0 11px!important;
    font-size:12px!important;
}
.inventory-gift .gift-bottom .price small { font-size:11px;letter-spacing:-.015em;color:#bfc2c9 }
.inventory-gift .gift-bottom .price b {flex:none;justify-content:flex-end;font-size:12px}
.inventory-gift .gift-bottom .basket {display:none!important}

/* Override the legacy "product > div = bottom caption" rule only for the new tools. */
#sheet .portal-product > .gift-detail-tools {
    position:absolute;top:10px;right:10px;left:auto;bottom:auto;
    width:auto;height:auto;padding:0;margin:0;
    background:none;display:flex;align-items:center;gap:7px;
    text-align:unset;z-index:7;pointer-events:auto;
}
#sheet .portal-product .gift-detail-tools .gift-detail-tool {
    display:grid;place-items:center;
    position:static!important;inset:auto!important;
    flex:none;width:37px;height:37px;padding:0;
    background:#151820ba;border:1px solid #ffffff48;border-radius:13px;
    color:white;cursor:pointer;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    transition:background .15s,transform .15s;
}
#sheet .portal-product .gift-detail-tools .gift-detail-tool:active {transform:scale(.94)}
#sheet .portal-product .gift-detail-tools .gift-send-tool {background:#168beddc;color:white}
#sheet .portal-product .gift-detail-tools .gift-detail-tool svg {width:19px;height:19px}
#sheet .portal-product .gift-detail-tools .gift-send-tool svg {
    fill:currentColor;stroke:none;width:18px;height:18px
}
#sheet .portal-product .gift-detail-tools .gift-detail-tool:disabled {opacity:.43;cursor:default}
#sheet .portal-product .gift-detail-tools .gift-detail-tool:focus-visible {outline:2px solid #fff;outline-offset:2px}

/* Portal-style Telegram gift deposit guide; native SVG icons, asset-backed Crafter branding. */
#sheet.gift-deposit-sheet {
    position:fixed;
    inset:auto 0 0;
    margin:0 auto;
    padding:12px 12px calc(14px + env(safe-area-inset-bottom));
    width:min(100%,510px);
    max-width:510px;
    max-height:min(96dvh,1000px);
    border:1px solid #414146;
    border-bottom:0;
    border-radius:30px 30px 0 0;
    color:#f6f6f8;
    background:#1b1b1e;
    overflow-y:auto;
    overscroll-behavior:contain;
}
#sheet.gift-deposit-sheet::backdrop {background:#000a;backdrop-filter:blur(12px)}
#sheet.gift-deposit-sheet::before {
    content:"";position:sticky;display:block;top:0;margin:-4px auto 7px;
    width:36px;height:5px;border-radius:9px;background:#66666b;
}
#sheet.gift-deposit-sheet .sheet-head {
    display:flex;align-items:center;justify-content:space-between;
    margin:0 3px 12px;
}
#sheet.gift-deposit-sheet .sheet-head h2 {font-size:19px;line-height:1.2;font-weight:800;margin:0}
#sheet.gift-deposit-sheet .sheet-head .close {position:static!important;width:34px;height:34px;border-radius:12px;background:#333439}
#sheet.gift-deposit-sheet #sheet-body {padding:0!important}
.gift-deposit-content {display:flex;flex-direction:column;gap:0}
.gift-deposit-hero {
    position:relative;isolation:isolate;
    height:clamp(170px,40vw,238px);
    display:grid;place-items:center;
    overflow:hidden;
    border-radius:23px;
    background:linear-gradient(146deg,#2089f9 0%,#41aafa 55%,#72c7f1 100%);
}
.gift-deposit-hero::before {
    content:"";position:absolute;inset:0;pointer-events:none;
    background:radial-gradient(circle at 45% 10%,#ffffff38,transparent 50%);
}
.gift-deposit-sparkle {
    position:absolute;width:13px;height:13px;
    background:#ffffffe7;
    clip-path:polygon(50% 0,64% 35%,100% 50%,64% 64%,50% 100%,35% 64%,0 50%,35% 35%);
}
.gift-deposit-sparkle-a {top:19%;left:18%;width:14px;height:14px}
.gift-deposit-sparkle-b {top:68%;left:9%;width:22px;height:22px}
.gift-deposit-sparkle-c {top:24%;right:15%;width:17px;height:17px;opacity:.65}
.gift-deposit-sparkle-d {top:73%;right:8%;width:25px;height:25px;opacity:.32}
.gift-deposit-exchange {
    display:flex;gap:7px;align-items:center;justify-content:center;
    position:relative;z-index:1;
    background:#fff;color:#85878d;
    border-radius:23px;padding:12px 16px;
    box-shadow:0 10px 25px #0c6cb327;
}
.gift-deposit-party {display:flex;flex-direction:column;align-items:center;gap:7px;min-width:76px}
.gift-deposit-party img {
    width:63px;height:63px;padding:0;object-fit:contain;
    border-radius:50%;background:#e9f2f9;
}
.gift-deposit-party:last-child img {padding:10px;background:#218fff}
.gift-deposit-party strong {font-size:12px;font-weight:750;color:#666a72}
.gift-deposit-exchange-arrow svg {width:18px;height:18px;opacity:.6;color:#848991}
.gift-deposit-step-list {display:grid;gap:10px;margin:13px 0}
.gift-deposit-step {
    display:flex;gap:12px;align-items:flex-start;
    padding:15px 14px;
    min-height:67px;
    border-radius:19px;background:#29292c;
}
.gift-deposit-step-icon {
    flex:0 0 24px;width:24px;height:24px;
    display:grid;place-items:center;
    margin-top:1px;border-radius:8px;
    background:#379bf5;color:white;
}
.gift-deposit-step:nth-child(2) .gift-deposit-step-icon {background:#ac44e4}
.gift-deposit-step:nth-child(3) .gift-deposit-step-icon {background:#37bd65}
.gift-deposit-step-icon svg {display:block;width:15px;height:15px}
.gift-deposit-step div {min-width:0;flex:1}
.gift-deposit-step b {display:block;font-size:13px;font-weight:800;line-height:1.4}
.gift-deposit-step small {display:block;margin-top:4px;color:#aaaab0;font-size:11px;line-height:1.4}
.gift-deposit-step.is-danger {background:#42282a;border:1px solid #622e30}
.gift-deposit-step.is-danger .gift-deposit-step-icon {background:#e44950}
.gift-deposit-step.is-alert {background:#3e341f;border:1px solid #60502b}
.gift-deposit-step.is-alert .gift-deposit-step-icon {background:#e2a60c}
.gift-deposit-user {color:#85c6ff;font-weight:750}
.gift-deposit-status {min-height:18px;text-align:center;color:#adb2bf;font-size:11px;line-height:1.45;margin:2px 3px 11px}
.gift-deposit-open {
    display:block;position:sticky;bottom:0;
    width:100%;height:52px;min-height:52px;
    background:#fff;color:#111319;
    border:0;border-radius:28px;
    font-size:14px;font-weight:800;box-shadow:0 7px 22px #0003;
}
.gift-deposit-open:disabled {background:#777984;color:#dcdce0;opacity:.8}
.gift-deposit-open:not(:disabled):active {transform:scale(.988)}
@media(max-width:365px) {
  .gift-deposit-hero {height:155px}
  .gift-deposit-party {min-width:65px}
  .gift-deposit-step {padding:11px 12px}
  .gift-deposit-step-list {gap:8px}
  .gift-deposit-exchange {padding:10px}
}
html[data-crafter-theme="light"] #sheet.gift-deposit-sheet {
    background:#1b1b1e!important;color:#f6f6f8!important;
}
html[data-crafter-theme="light"] .gift-deposit-step {background:#29292c;color:#f6f6f8}
html[data-crafter-theme="light"] .gift-deposit-step.is-danger {background:#42282a}
html[data-crafter-theme="light"] .gift-deposit-step.is-alert {background:#3e341f}

/* Gift deposit: rotate authentic Crafter PNG presents with smooth, pattern-free gradients. */
.gift-deposit-random-tile {
    width:64px;height:64px;flex:none;
    display:grid;place-items:center;overflow:hidden;
    border-radius:50%;background:linear-gradient(145deg,#c04bca,#5a2ea1);
}
.gift-deposit-party .gift-deposit-random-tile img {
    display:block;width:56px;height:56px;
    padding:0;object-fit:contain;
    background:transparent!important;border-radius:0;
    filter:drop-shadow(0 4px 4px #0003);
}
.gift-deposit-spawn {animation:gift-deposit-spawn .4s cubic-bezier(.18,.9,.26,1.12) both}
@keyframes gift-deposit-spawn {from{opacity:.2;transform:scale(.6)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.gift-deposit-spawn{animation:none}}

.gifts-empty-guide {grid-column:1/-1;min-width:0;padding:18px 0 26px;text-align:center}
.gifts-empty-slides {display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.gifts-empty-slide {display:grid;flex:0 0 100%;justify-items:center;align-content:start;scroll-snap-align:start;padding:6px 12px 8px}
.gifts-empty-slide img {width:104px;height:104px;object-fit:contain;margin-bottom:13px}
.gifts-empty-slide h2 {margin:0 0 7px;font-size:17px;color:inherit}
.gifts-empty-slide p {margin:0 0 15px;font-size:13px;color:#92949b}
.gifts-empty-slide button {padding:9px 16px;border-radius:22px;background:#fff;color:#161616;font-size:13px;font-weight:750}
.gifts-empty-dots {display:flex;justify-content:center;gap:1px;margin-top:13px}
.gifts-empty-dots button {display:grid;place-items:center;width:24px;height:26px;padding:0}
.gifts-empty-dots button::after {content:'';width:14px;height:4px;border-radius:3px;background:#65656b}
.gifts-empty-dots button[aria-current="true"]::after {background:#f5f5f8}
html[data-crafter-theme="light"] .gifts-empty-slide button {background:#23262b;color:#fff}
html[data-crafter-theme="light"] .gifts-empty-dots button[aria-current="true"]::after {background:#262832}


/* The Telegram transfer action belongs to each owned NFT tile. */
#main .inventory-gift .inventory-send-plane {
    position:absolute; top:12px; right:12px; z-index:6;
    display:grid; place-items:center; box-sizing:border-box;
    width:42px; height:42px; aspect-ratio:1;
    flex:none; padding:0;
    border:1px solid rgba(255,255,255,.54);
    border-radius:50%; color:#fff;
    background:rgba(10,13,19,.15);
    -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
    box-shadow:0 2px 9px rgba(0,0,0,.16);
    cursor:pointer; -webkit-tap-highlight-color:transparent;
}
#main .inventory-gift .inventory-send-plane svg {
    display:block; width:20px; height:20px; fill:currentColor;
    stroke:none; pointer-events:none;
    filter:drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
#main .inventory-gift .inventory-send-plane:not(:disabled):active {transform:scale(.94)}
#main .inventory-gift .inventory-send-plane:focus-visible {outline:2px solid #fff;outline-offset:2px}
#main .inventory-gift .inventory-send-plane:disabled {
    color:#e3e6ea; background:rgba(10,13,19,.12); border-color:rgba(255,255,255,.26);
    opacity:.55; cursor:not-allowed;
}
@media(max-width:370px){
    #main .inventory-gift .inventory-send-plane {top:9px;right:9px;width:38px;height:38px;border-radius:50%}
    #main .inventory-gift .inventory-send-plane svg {width:18px;height:18px}
}

/* Center the Telegram plane in the oval of the inventory's existing Send action. */
#main .inventory-actions button[data-inventory-transfer] .inventory-send-oval-icon {
    display:grid;place-items:center;flex:none; width:48px;height:27px;
    border-radius:999px;background:#168aff;color:#fff;
}
#main .inventory-actions button[data-inventory-transfer] .inventory-send-oval-icon svg {width:18px;height:18px;fill:currentColor;stroke:none;margin:auto}

/* Small, visually quiet corner actions — matched to copy-link affordances. */
#main .inventory-gift .inventory-send-plane,
#main .inventory-gift .inventory-craft-dot {
    position:absolute;
    box-sizing:border-box;
    top:10px;
    width:28px;
    height:28px;
    min-width:28px;
    min-height:28px;
    padding:0;
    display:grid;
    place-items:center;
    border-radius:50%;
    border:1px solid rgba(255,255,255,.35);
    background:rgba(17,19,24,.14);
    color:#fff;
    box-shadow:0 1px 4px #0003;
    -webkit-backdrop-filter:blur(4px);
    backdrop-filter:blur(4px);
    z-index:6;
}
#main .inventory-gift .inventory-send-plane {right:10px;}
#main .inventory-gift .inventory-craft-dot {left:10px;}
#main .inventory-gift .inventory-send-plane svg,
#main .inventory-gift .inventory-craft-dot .inventory-anvil {
    display:block;
    width:15px;
    height:15px;
    margin:0;
}
#main .inventory-gift .inventory-send-plane:disabled {
    background:rgba(17,19,24,.14);
    opacity:.45;
}
@media(max-width:370px) {
    #main .inventory-gift .inventory-send-plane,
    #main .inventory-gift .inventory-craft-dot {
        top:9px;
        width:27px;
        height:27px;
        min-width:27px;
        min-height:27px;
    }
    #main .inventory-gift .inventory-send-plane {right:9px;}
    #main .inventory-gift .inventory-craft-dot {left:9px;}
}

/* Inventory toolbar: unframed Telegram glyph, matching tile action silhouette. */
#main .inventory-actions button[data-inventory-transfer] .inventory-send-oval-icon {
  background:none!important;border:0!important;box-shadow:none!important;
  border-radius:0!important;width:auto!important;height:auto!important;
  padding:0!important;
}
#main .inventory-actions button[data-inventory-transfer] > svg {
  display:block!important;
  width:24px!important;height:24px!important;
  min-width:24px;margin:0 auto!important;
  fill:currentColor!important;stroke:none!important;
  background:none!important;border:none!important;box-shadow:none!important;
}
#main .inventory-gift .inventory-send-plane svg {
  width:15px!important;height:15px!important;
  fill:currentColor!important;stroke:none!important;
}
