/* Gift Market — liquid glass: translucent layers over a deep, softly lit background. */
:root {
  --bg: #07080b;
  --ink: #f5f6fa;
  --ink2: rgba(235, 238, 245, .64);
  --ink3: rgba(235, 238, 245, .4);
  --g1: rgba(255, 255, 255, .055);
  --g2: rgba(255, 255, 255, .09);
  --g3: rgba(255, 255, 255, .14);
  --edge: rgba(255, 255, 255, .12);
  --edge2: rgba(255, 255, 255, .2);
  --blue: #2f8cff;
  --blue2: #1a6dff;
  --ok: #34d399;
  --bad: #ff6b6b;
  --warn: #fbbf24;
  --leg: #ffd479;
  --epic: #c0a6ff;
  --rare: #74c2ff;
  --hi: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .04);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', Roboto, 'Vazirmatn', system-ui, sans-serif;
  --pattern: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M54.60,23.00 L51.17,24.17 L50.00,27.60 L48.83,24.17 L45.40,23.00 L48.83,21.83 L50.00,18.40 L51.17,21.83Z M77.98,36.50 L74.55,37.67 L73.38,41.10 L72.21,37.67 L68.78,36.50 L72.21,35.33 L73.38,31.90 L74.55,35.33Z M77.98,63.50 L74.55,64.67 L73.38,68.10 L72.21,64.67 L68.78,63.50 L72.21,62.33 L73.38,58.90 L74.55,62.33Z M54.60,77.00 L51.17,78.17 L50.00,81.60 L48.83,78.17 L45.40,77.00 L48.83,75.83 L50.00,72.40 L51.17,75.83Z M31.22,63.50 L27.79,64.67 L26.62,68.10 L25.45,64.67 L22.02,63.50 L25.45,62.33 L26.62,58.90 L27.79,62.33Z M31.22,36.50 L27.79,37.67 L26.62,41.10 L25.45,37.67 L22.02,36.50 L25.45,35.33 L26.62,31.90 L27.79,35.33Z M65.41,17.99 L62.65,16.64 L59.90,17.99 L61.25,15.23 L59.90,12.47 L62.65,13.83 L65.41,12.47 L64.06,15.23Z M84.80,34.26 L82.04,32.90 L79.29,34.26 L80.64,31.50 L79.29,28.74 L82.04,30.10 L84.80,28.74 L83.45,31.50Z M89.20,59.18 L86.44,57.83 L83.68,59.18 L85.03,56.42 L83.68,53.67 L86.44,55.02 L89.20,53.67 L87.84,56.42Z M76.54,81.10 L73.78,79.75 L71.03,81.10 L72.38,78.34 L71.03,75.59 L73.78,76.94 L76.54,75.59 L75.19,78.34Z M52.76,89.76 L50.00,88.40 L47.24,89.76 L48.60,87.00 L47.24,84.24 L50.00,85.60 L52.76,84.24 L51.40,87.00Z M28.97,81.10 L26.22,79.75 L23.46,81.10 L24.81,78.34 L23.46,75.59 L26.22,76.94 L28.97,75.59 L27.62,78.34Z M16.32,59.18 L13.56,57.83 L10.80,59.18 L12.16,56.42 L10.80,53.67 L13.56,55.02 L16.32,53.67 L14.97,56.42Z M20.71,34.26 L17.96,32.90 L15.20,34.26 L16.55,31.50 L15.20,28.74 L17.96,30.10 L20.71,28.74 L19.36,31.50Z M40.10,17.99 L37.35,16.64 L34.59,17.99 L35.94,15.23 L34.59,12.47 L37.35,13.83 L40.10,12.47 L38.75,15.23Z M57.93,6.11 L55.67,5.00 L53.40,6.11 L54.51,3.85 L53.40,1.58 L55.67,2.69 L57.93,1.58 L56.82,3.85Z M78.73,14.03 L76.47,12.92 L74.20,14.03 L75.31,11.77 L74.20,9.50 L76.47,10.61 L78.73,9.50 L77.62,11.77Z M93.47,30.71 L91.20,29.60 L88.94,30.71 L90.05,28.45 L88.94,26.18 L91.20,27.29 L93.47,26.18 L92.35,28.45Z M98.76,52.33 L96.50,51.21 L94.24,52.33 L95.35,50.06 L94.24,47.80 L96.50,48.91 L98.76,47.80 L97.65,50.06Z M93.41,73.93 L91.14,72.82 L88.88,73.93 L89.99,71.66 L88.88,69.40 L91.14,70.51 L93.41,69.40 L92.30,71.66Z M78.63,90.57 L76.36,89.46 L74.10,90.57 L75.21,88.30 L74.10,86.04 L76.36,87.15 L78.63,86.04 L77.52,88.30Z M57.81,98.43 L55.54,97.32 L53.28,98.43 L54.39,96.17 L53.28,93.91 L55.54,95.02 L57.81,93.91 L56.69,96.17Z M35.72,95.72 L33.45,94.61 L31.19,95.72 L32.30,93.46 L31.19,91.19 L33.45,92.30 L35.72,91.19 L34.60,93.46Z M17.42,83.05 L15.15,81.94 L12.89,83.05 L14.00,80.79 L12.89,78.53 L15.15,79.64 L17.42,78.53 L16.30,80.79Z M7.10,63.33 L4.84,62.22 L2.57,63.33 L3.68,61.07 L2.57,58.80 L4.84,59.92 L7.10,58.80 L5.99,61.07Z M7.13,41.07 L4.87,39.96 L2.60,41.07 L3.71,38.81 L2.60,36.55 L4.87,37.66 L7.13,36.55 L6.02,38.81Z M17.50,21.38 L15.24,20.27 L12.97,21.38 L14.08,19.12 L12.97,16.86 L15.24,17.97 L17.50,16.86 L16.39,19.12Z M35.83,8.76 L33.57,7.65 L31.31,8.76 L32.42,6.50 L31.31,4.24 L33.57,5.35 L35.83,4.24 L34.72,6.50Z M52.70,-6.00 L50.69,-5.31 L50.00,-3.30 L49.31,-5.31 L47.30,-6.00 L49.31,-6.69 L50.00,-8.70 L50.69,-6.69Z M74.13,-1.74 L72.12,-1.05 L71.43,0.96 L70.74,-1.05 L68.73,-1.74 L70.74,-2.42 L71.43,-4.44 L72.12,-2.42Z M92.30,10.40 L90.29,11.09 L89.60,13.10 L88.91,11.09 L86.90,10.40 L88.91,9.71 L89.60,7.70 L90.29,9.71Z M104.44,28.57 L102.42,29.26 L101.74,31.27 L101.05,29.26 L99.04,28.57 L101.05,27.88 L101.74,25.87 L102.42,27.88Z M108.70,50.00 L106.69,50.69 L106.00,52.70 L105.31,50.69 L103.30,50.00 L105.31,49.31 L106.00,47.30 L106.69,49.31Z M104.44,71.43 L102.42,72.12 L101.74,74.13 L101.05,72.12 L99.04,71.43 L101.05,70.74 L101.74,68.73 L102.42,70.74Z M92.30,89.60 L90.29,90.29 L89.60,92.30 L88.91,90.29 L86.90,89.60 L88.91,88.91 L89.60,86.90 L90.29,88.91Z M74.13,101.74 L72.12,102.42 L71.43,104.44 L70.74,102.42 L68.73,101.74 L70.74,101.05 L71.43,99.04 L72.12,101.05Z M52.70,106.00 L50.69,106.69 L50.00,108.70 L49.31,106.69 L47.30,106.00 L49.31,105.31 L50.00,103.30 L50.69,105.31Z M31.27,101.74 L29.26,102.42 L28.57,104.44 L27.88,102.42 L25.87,101.74 L27.88,101.05 L28.57,99.04 L29.26,101.05Z M13.10,89.60 L11.09,90.29 L10.40,92.30 L9.71,90.29 L7.70,89.60 L9.71,88.91 L10.40,86.90 L11.09,88.91Z M0.96,71.43 L-1.05,72.12 L-1.74,74.13 L-2.42,72.12 L-4.44,71.43 L-2.42,70.74 L-1.74,68.73 L-1.05,70.74Z M-3.30,50.00 L-5.31,50.69 L-6.00,52.70 L-6.69,50.69 L-8.70,50.00 L-6.69,49.31 L-6.00,47.30 L-5.31,49.31Z M0.96,28.57 L-1.05,29.26 L-1.74,31.27 L-2.42,29.26 L-4.44,28.57 L-2.42,27.88 L-1.74,25.87 L-1.05,27.88Z M13.10,10.40 L11.09,11.09 L10.40,13.10 L9.71,11.09 L7.70,10.40 L9.71,9.71 L10.40,7.70 L11.09,9.71Z M31.27,-1.74 L29.26,-1.05 L28.57,0.96 L27.88,-1.05 L25.87,-1.74 L27.88,-2.42 L28.57,-4.44 L29.26,-2.42Z'/%3E%3C/svg%3E");
  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --nav: 66px;
  color-scheme: dark;
}
[lang='fa'] { --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 400 15px/1.45 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  overscroll-behavior-y: none;
}
/* Soft colored light behind the glass (fixed, painted once) */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 8% 0%, rgba(47, 140, 255, .32), transparent 70%),
    radial-gradient(50% 35% at 100% 22%, rgba(122, 77, 255, .26), transparent 72%),
    radial-gradient(70% 45% at 50% 108%, rgba(20, 184, 166, .14), transparent 70%);
}
body.locked { overflow: hidden; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 12px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; }
h1 { font-size: 28px; font-weight: 750; }
h2 { font-size: 21px; font-weight: 700; line-height: 1.2; }
h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
em { font-style: normal; }
.muted { color: var(--ink2); }
.pad { padding: 18px; }
.hint { color: var(--ink2); font-size: 13px; }
.i { width: 20px; height: 20px; flex: none; }
.i-ton { width: 1em; height: 1em; color: var(--blue); }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; font-size: 14px; }
.link.danger { color: var(--bad); align-self: flex-start; }
.link .i { width: 16px; height: 16px; }
.badge { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.amt { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.neg::before { content: '−'; }
.amt.pos::before { content: '+'; }
.amt.pos { color: var(--ok); }
.amt.neg, .amt.pos { direction: ltr; }

/* ---------- glass ---------- */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .045));
  border: 1px solid var(--edge);
  box-shadow: var(--hi), 0 8px 28px rgba(0, 0, 0, .32);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(28, 30, 38, .92); }
}

/* ---------- shell ---------- */
#app { max-width: 600px; margin: 0 auto; padding: calc(var(--safe-top) + 8px) 14px calc(var(--nav) + var(--safe-bottom) + 34px); }
body.has-cartbar #app { padding-bottom: calc(var(--nav) + var(--safe-bottom) + 108px); }
.top { display: flex; align-items: center; gap: 8px; padding: 4px 0 12px; }
.grow { flex: 1; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.mark { width: 32px; height: 32px; flex: none; filter: drop-shadow(0 4px 12px rgba(59, 125, 255, .45)); }
.bal { display: flex; align-items: center; gap: 6px; height: 40px; padding-inline: 13px 4px; border-radius: 20px; font-variant-numeric: tabular-nums; }
.bal b { font-weight: 700; font-size: 16px; }
.bal-plus { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 16px; background: linear-gradient(180deg, #4da2ff, var(--blue2)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.bal-plus .i { width: 16px; height: 16px; }
.hbtn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 20px; }
.hbtn .i { width: 19px; height: 19px; }
.hbtn .badge { position: absolute; top: -4px; inset-inline-end: -4px; box-shadow: 0 0 0 2px var(--bg); }

/* floating tab bar */
.tabs {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(44, 46, 58, .66), rgba(16, 18, 24, .78));
  bottom: calc(var(--safe-bottom) + 12px); width: min(calc(100vw - 28px), 440px); height: var(--nav);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 5px; border-radius: 33px;
}
.tab-lens {
  position: absolute; top: 5px; bottom: 5px; inset-inline-start: 5px; width: calc((100% - 10px) / 4);
  border-radius: 28px; background: linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .07));
  box-shadow: var(--hi), 0 2px 10px rgba(0, 0, 0, .25);
  transform: translateX(calc(var(--i) * 100%)); transition: transform .38s cubic-bezier(.3, 1.3, .5, 1);
}
[dir='rtl'] .tab-lens { transform: translateX(calc(var(--i) * -100%)); }
.tab { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink3); font-size: 11px; font-weight: 600; transition: color .2s; }
.tab .i { width: 23px; height: 23px; }
.tab[aria-current='true'] { color: var(--ink); }
.tab[aria-current='true'] .i { color: var(--blue); }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.view-head h1 { white-space: nowrap; }
.view-head.stack { flex-direction: column; align-items: stretch; }
.view-head.stack .seg { display: grid; grid-template-columns: repeat(3, 1fr); }

/* ---------- market ---------- */
.promo {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 78px; margin-bottom: 12px; padding: 14px 16px; overflow: hidden; cursor: pointer;
  border-radius: 24px; border: 1px solid var(--edge);
  background: linear-gradient(120deg, rgba(47, 140, 255, .38), rgba(122, 77, 255, .3) 60%, rgba(255, 140, 90, .22));
  box-shadow: var(--hi);
}
.promo-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; z-index: 1; }
.promo-txt b { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.promo-txt span { color: rgba(255, 255, 255, .78); font-size: 13.5px; }
.promo-art { width: 54px; height: 54px; margin-inline-end: 14px; }
.promo-art .mark { width: 54px; height: 54px; transform: rotate(-8deg); }
.promo-x { position: absolute; top: 8px; inset-inline-end: 8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 13px; background: rgba(0, 0, 0, .25); }
.promo-x .i { width: 14px; height: 14px; }

.tools {
  position: sticky; top: 0; z-index: 20; margin: 0 -14px; padding: 8px 14px 10px;
  background: linear-gradient(180deg, rgba(7, 8, 11, .82), rgba(7, 8, 11, .6));
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
}
.search-row { display: flex; gap: 8px; }
.search { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; height: 44px; padding-inline: 14px; border-radius: 22px; background: var(--g2); border: 1px solid var(--edge); color: var(--ink3); box-shadow: var(--hi); }
.search:focus-within { border-color: var(--edge2); color: var(--ink2); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--ink); }
.search input::placeholder { color: var(--ink3); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }
.search.in-sheet { flex: none; }
.sq-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 22px; background: var(--g2); border: 1px solid var(--edge); color: var(--ink); box-shadow: var(--hi); }
.sq-btn.big { width: 56px; height: 56px; border-radius: 28px; }
.sq-btn.on { background: rgba(52, 211, 153, .16); border-color: rgba(52, 211, 153, .4); color: var(--ok); }

.fchips { display: flex; gap: 7px; overflow-x: auto; margin: 10px -14px 0; padding: 0 14px; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding-inline: 13px 9px; border-radius: 17px; background: var(--g1); border: 1px solid var(--edge); color: var(--ink2); font-size: 13.5px; font-weight: 600; white-space: nowrap; max-width: 220px; }
.fchip span { overflow: hidden; text-overflow: ellipsis; }
.fchip .i { width: 15px; height: 15px; opacity: .6; }
.fchip.on { color: var(--ink); background: rgba(47, 140, 255, .2); border-color: rgba(47, 140, 255, .5); }
.fchip.clear { padding-inline: 10px 13px; color: var(--bad); }

.chead { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; padding: 12px; border-radius: 24px; background: var(--g1); border: 1px solid var(--edge); box-shadow: var(--hi); }
.chead-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.chead-main h2 { font-size: 18px; }
.chead-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; }
.chead-stats span { display: inline-flex; align-items: center; gap: 5px; }
.chead-stats em { color: var(--ink2); }
.thumb { position: relative; display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 14px; overflow: hidden; background: var(--g2); font-size: 22px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.thumb img.ok { opacity: 1; }
.thumb.all { color: var(--blue); }
.thumb-lg { width: 54px; height: 54px; border-radius: 17px; font-size: 28px; }

.grid-meta { display: flex; justify-content: space-between; gap: 10px; margin: 4px 4px 10px; color: var(--ink3); font-size: 12.5px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 480px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- cards (no blur: cheap to scroll) ---------- */
.card {
  position: relative; display: flex; flex-direction: column; padding: 6px; text-align: start; cursor: pointer;
  border-radius: 26px; border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  content-visibility: auto; contain-intrinsic-size: auto 270px;
  transition: transform .14s ease;
}
.card:active { transform: scale(.97); }
.card-art { position: relative; }
.card-art .art { border-radius: 20px; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 9px 4px 3px; }
.card-name { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; padding-inline: 4px; }
.card-name b { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; }
.card-name span { color: var(--ink3); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.card-foot { display: flex; align-items: center; gap: 6px; }
.card-foot .tag { flex: 1; min-width: 0; }
.cart-btn { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 18px; background: var(--g2); border: 1px solid var(--edge); color: var(--ink); transition: background .15s, color .15s; }
.cart-btn .i { width: 18px; height: 18px; }
.cart-btn.on { background: rgba(52, 211, 153, .18); border-color: rgba(52, 211, 153, .45); color: var(--ok); }
.yours { flex: none; padding: 0 10px; height: 36px; display: grid; place-items: center; border-radius: 18px; background: var(--g2); color: var(--ink2); font-size: 12px; font-weight: 650; }
.rar { position: absolute; top: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 3px; height: 23px; padding: 0 8px 0 6px; border-radius: 12px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgba(10, 12, 18, .45); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.rar .i { width: 11px; height: 11px; }
.rar-leg { color: var(--leg); } .rar-epic { color: var(--epic); } .rar-rare { color: var(--rare); }
.lockb { position: absolute; top: 8px; inset-inline-end: 8px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 14px; background: rgba(10, 12, 18, .45); border: 1px solid rgba(255, 255, 255, .14); }
.lockb .i { width: 14px; height: 14px; }

.card.add { align-items: center; justify-content: center; gap: 6px; min-height: 236px; padding: 16px; text-align: center; background: transparent; border: 1.5px dashed rgba(255, 255, 255, .18); box-shadow: none; content-visibility: visible; }
.card.add b { font-size: 16px; font-weight: 700; }
.card.add > span:last-child { color: var(--ink2); font-size: 12.5px; max-width: 18ch; }
.add-plus { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 25px; background: linear-gradient(180deg, #4da2ff, var(--blue2)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 18px rgba(26, 109, 255, .4); }

/* gift art: backdrop + pattern show at once, the real picture fades in on top */
.art {
  position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 18px; container-type: inline-size;
  background: radial-gradient(circle at 50% 46%, var(--c1) 0%, var(--c2) 84%);
}
.art-pat { position: absolute; inset: 0; background: var(--pc); opacity: .14; -webkit-mask: var(--pattern) center / 100% 100% no-repeat; mask: var(--pattern) center / 100% 100% no-repeat; }
.art-emo { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; font-size: 40cqw; line-height: 1; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35)); }
.art img, .art-cv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .18s ease; }
.art img.ok, .art-cv.ok { opacity: 1; }
.art img.instant { transition: none; }
.art.drawn .art-emo, .art.drawn .art-pat { visibility: hidden; }
.art.live img { opacity: 0; transition: opacity .3s ease; }
.art-anim { position: absolute; inset: 16%; pointer-events: none; }
.art-anim canvas { width: 100% !important; height: 100% !important; }
.art-lg { border-radius: 0; }
.art-sm { width: 58px; flex: none; border-radius: 16px; }
.art-xs { width: 46px; flex: none; border-radius: 14px; }
.art-mq { width: 100%; border-radius: 22px; }

/* ---------- price capsule ---------- */
.tag {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 36px; padding-inline: 14px;
  border-radius: 18px; color: #fff; font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: linear-gradient(180deg, #4ea3ff, var(--blue2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 4px 14px rgba(26, 109, 255, .3);
}
.tag b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.tag .i-ton { color: inherit; width: .95em; height: .95em; flex: none; opacity: .95; }
.tag-ghost { background: var(--g2); border: 1px solid var(--edge); color: var(--ink); box-shadow: var(--hi); }
.tag-ghost .i-ton { color: var(--blue); }
.tag-inverse { background: #fff; color: var(--blue2); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }

.state { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding-inline: 4px; color: var(--ink2); font-size: 13px; font-weight: 600; }
.state .i { width: 15px; height: 15px; }

/* skeletons: opacity pulse only */
.sk { pointer-events: none; }
.sk .art, .art.sk, .sk-line, .feed-sk, .sk-stats div, .sp-stat.sk { background: var(--g2); animation: pulse 1.2s ease-in-out infinite; }
.sk .art { aspect-ratio: 1; }
.sk-line { display: block; height: 12px; border-radius: 6px; }
.sk-line.short { height: 36px; border-radius: 18px; }
@keyframes pulse { 50% { opacity: .45; } }
.empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 44px 20px; text-align: center; list-style: none; color: var(--ink2); }
.empty p { max-width: 30ch; }
.empty-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 30px; background: var(--g2); border: 1px solid var(--edge); color: var(--ink2); box-shadow: var(--hi); }
.empty-ic .i { width: 26px; height: 26px; }
.empty-line { margin-top: 14px; text-align: center; color: var(--ink2); }
.sentinel { height: 1px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding-inline: 16px; border-radius: 25px; font-weight: 650; font-size: 15.5px; transition: transform .1s; }
.btn:active { transform: scale(.98); }
.btn.sm { height: 36px; padding-inline: 13px; border-radius: 18px; font-size: 13.5px; }
.btn.wide { width: 100%; }
.btn.big { height: 56px; border-radius: 28px; font-size: 17px; width: 100%; }
.btn.primary { background: linear-gradient(180deg, #4ea3ff, var(--blue2)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 8px 24px rgba(26, 109, 255, .35); }
.btn.ghost { background: var(--g2); color: var(--ink); border: 1px solid var(--edge); box-shadow: var(--hi); }
.btn .i { width: 18px; height: 18px; }
.btn.buy { flex: 1; width: 100%; height: 56px; justify-content: space-between; padding-inline: 20px 8px; border-radius: 28px; font-size: 16.5px; color: #fff;
  background: linear-gradient(180deg, #4ea3ff, var(--blue2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 8px 24px rgba(26, 109, 255, .35); transition: background .15s; }
.btn.buy .tag { height: 42px; border-radius: 21px; font-size: 16px; }
.btn.buy.armed { background: linear-gradient(180deg, #4ee0a8, #10b981); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 8px 24px rgba(16, 185, 129, .35); }
.btn.buy.armed .tag { color: #0e8f63; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 19px; background: var(--g2); border: 1px solid var(--edge); color: var(--ink); flex: none; }
.icon-btn .i { width: 18px; height: 18px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 16px; }
.icon-btn.glass { background: rgba(12, 14, 20, .38); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.row2 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.row-buy { display: flex; gap: 10px; }

/* ---------- sheets ---------- */
#sheet { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#sheet:empty { display: none; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .26s ease; }
.sheet {
  position: absolute; inset-inline: 8px; bottom: 8px; max-width: 584px; margin: 0 auto; max-height: calc(100vh - var(--safe-top) - 24px);
  display: flex; flex-direction: column; overflow: hidden; border-radius: 34px;
  background: linear-gradient(180deg, rgba(40, 42, 52, .78), rgba(22, 24, 30, .86));
  border: 1px solid var(--edge2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 20px 60px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(34px) saturate(180%); backdrop-filter: blur(34px) saturate(180%);
  padding-bottom: max(0px, calc(var(--safe-bottom) - 8px));
  transform: translateY(calc(100% + 20px)); transition: transform .34s cubic-bezier(.2, .9, .25, 1);
  will-change: transform;
}
#sheet.open { pointer-events: auto; }
#sheet.open .scrim { opacity: 1; }
#sheet.open .sheet { transform: none; }
.sheet-grab { flex: none; width: 38px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: rgba(255, 255, 255, .25); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px 8px; }
.sheet-pad { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 8px; }
.sheet-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.sheet-scroll > * { flex-shrink: 0; }
.sheet-scroll.flush { padding: 0 0 18px; }
.sheet-actions { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .07); }
.sheet-actions.two { display: grid; grid-template-columns: 1fr 1.3fr; }

.hero { position: relative; }
.hero .art-lg { width: 100%; max-height: 50vh; }
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(to bottom, transparent, rgba(24, 26, 33, .95)); pointer-events: none; }
.hero .art.sk { aspect-ratio: 1; max-height: 50vh; }
.hero-btns { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; display: flex; gap: 8px; }
.gbody { display: flex; flex-direction: column; gap: 14px; margin-top: -30px; padding: 0 18px; position: relative; z-index: 1; }
.gift-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.gift-head h2 { font-size: 26px; font-weight: 750; letter-spacing: -0.03em; }
.gift-num { color: var(--ink2); font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.gdesc { color: var(--ink2); font-size: 14px; margin-top: -6px; }
#gextra { display: flex; flex-direction: column; gap: 14px; }
.attrs { display: grid; gap: 1px; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .07); border: 1px solid var(--edge); }
.attr { display: grid; grid-template-columns: 6.3em 1fr auto; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(255, 255, 255, .04); }
.attr em { color: var(--ink2); font-size: 13.5px; }
.attr b { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attr-r { color: var(--ink2); font-weight: 650; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.rar-t-leg { color: var(--leg); } .rar-t-epic { color: var(--epic); } .rar-t-rare { color: var(--rare); }
.sw { width: 18px; height: 18px; flex: none; border-radius: 9px; background: radial-gradient(circle at 50% 45%, var(--c1), var(--c2) 85%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.gstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gstats > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px 12px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--edge); }
.gstats em { color: var(--ink2); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-stats > div { height: 58px; border: 0; }
.gsales { display: flex; flex-direction: column; gap: 8px; }
.sub { color: var(--ink2); font-weight: 600; font-size: 13.5px; }
.spark { width: 100%; height: 56px; display: block; }
.spark-line { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark-fill { fill: rgba(47, 140, 255, .14); stroke: none; }
.sales { list-style: none; margin: 0; padding: 0; }
.sales li { display: grid; grid-template-columns: 1fr auto 6.5em; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 14px; }
.sales li:last-child { border-bottom: 0; }
.sales em { color: var(--ink2); }
.sales time, .feed time, .tx time { color: var(--ink3); font-size: 12.5px; text-align: end; white-space: nowrap; }
.note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 11px 14px; border-radius: 16px; background: rgba(255, 255, 255, .06); font-size: 14px; }
.note .i { width: 16px; height: 16px; color: var(--leg); }
.note.warn { background: rgba(251, 191, 36, .12); color: #fcd57a; }
.done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 0 18px; position: relative; z-index: 1; margin-top: -30px; }
.done-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 27px; background: linear-gradient(180deg, #4ee0a8, #10b981); color: #fff; box-shadow: 0 0 0 5px rgba(24, 26, 33, .95), 0 8px 24px rgba(16, 185, 129, .4); }
.done .muted { max-width: 34ch; }

/* pickers */
.opts { display: flex; flex-direction: column; border-radius: 20px; border: 1px solid var(--edge); overflow: hidden; background: rgba(255, 255, 255, .03); }
.opt { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 8px 12px; text-align: start; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.opt:last-child { border-bottom: 0; }
.opt:active { background: rgba(255, 255, 255, .06); }
.opt-check { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 11px; border: 1.5px solid rgba(255, 255, 255, .25); color: transparent; transition: background .12s, border-color .12s; }
.opt-check .i { width: 14px; height: 14px; }
.opt.on .opt-check { background: var(--blue); border-color: var(--blue); color: #fff; }
.opt.coll.on { background: rgba(47, 140, 255, .1); }
.opt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.opt-main span { color: var(--ink3); font-size: 12px; }
.opt-name { flex: 1; font-weight: 600; }
.opt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 13.5px; }
.opt-side em { color: var(--ink3); font-size: 11.5px; }
.opt-side .rar-t { color: var(--leg); font-weight: 650; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { height: 36px; padding-inline: 14px; border-radius: 18px; background: var(--g2); border: 1px solid var(--edge); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pill:active { background: var(--g3); }
.range { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); align-items: center; }
.range-sep { height: 2px; background: var(--edge2); margin: 0 3px; }
.field { min-width: 0; display: flex; align-items: center; gap: 8px; height: 48px; padding-inline: 14px; border-radius: 24px; background: var(--g2); border: 1px solid var(--edge); }
.field:focus-within, .big-field:focus-within { border-color: var(--blue); }
.field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-variant-numeric: tabular-nums; }
.field.col { flex-direction: column; align-items: stretch; height: auto; padding: 10px 14px; gap: 4px; border-radius: 20px; }
.field.col span { color: var(--ink2); font-size: 12.5px; }
.field.col input { height: 26px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13.5px; direction: ltr; }

/* cart */
#cartbar { position: fixed; inset-inline: 0; bottom: calc(var(--nav) + var(--safe-bottom) + 22px); z-index: 25; max-width: 600px; margin: 0 auto; padding: 0 14px; animation: rise .3s cubic-bezier(.2, .9, .25, 1); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.cartbar { display: flex; align-items: center; gap: 12px; width: 100%; height: 62px; padding-inline: 8px; border-radius: 31px; color: #fff; text-align: start;
  background: linear-gradient(180deg, rgba(78, 163, 255, .92), rgba(26, 109, 255, .92)); border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 30px rgba(26, 109, 255, .4); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.cartbar-n { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 23px; background: rgba(255, 255, 255, .18); }
.cartbar-n i { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #fff; color: var(--blue2); font-size: 11px; font-weight: 800; font-style: normal; display: grid; place-items: center; }
.cartbar-t { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.cartbar-t b { font-size: 16px; font-weight: 700; }
.cartbar-t span { font-size: 12.5px; opacity: .85; }
.cartbar .tag { height: 44px; border-radius: 22px; font-size: 16px; }
.clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.crow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.crow-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; text-align: start; }
.crow-t { min-width: 0; display: flex; flex-direction: column; }
.crow-t b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.crow-t em { color: var(--bad); font-size: 12.5px; font-weight: 600; }
.crow.bad .art, .crow.bad .amt { opacity: .45; }

/* sell / wallet */
.row-gift { display: flex; align-items: center; gap: 12px; }
.row-gift div { display: flex; flex-direction: column; }
.big-field { display: flex; align-items: center; gap: 10px; height: 72px; padding-inline: 18px; border-radius: 26px; background: var(--g2); border: 1px solid var(--edge); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.big-field .i-ton { width: 26px; height: 26px; }
.big-field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-variant-numeric: tabular-nums; }
.big-field .link { letter-spacing: 0; }
.calc { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.calc div { display: flex; justify-content: space-between; gap: 12px; }
.calc dt { color: var(--ink2); }
.calc dd { margin: 0; }
.calc .total { padding-top: 9px; border-top: 1px dashed rgba(255, 255, 255, .14); font-weight: 700; }
.calc .total dt { color: var(--ink); }
.manual { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.copy-row { display: grid; grid-template-columns: 4.5em 1fr auto; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 14px 6px; border-radius: 20px; background: var(--g1); border: 1px solid var(--edge); }
.copy-row .k { color: var(--ink2); font-size: 13px; }
.copy-row code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13.5px; direction: ltr; text-align: start; overflow: hidden; text-overflow: ellipsis; }
.copy-row.memo code { color: var(--leg); font-size: 17px; font-weight: 700; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 14px; background: rgba(47, 140, 255, .18); color: var(--blue); font-weight: 750; }
[dir='rtl'] .steps li::before { content: counter(s, persian); }
.steps b { font-weight: 500; padding-top: 3px; }

/* inventory */
.seg { display: inline-flex; padding: 3px; border-radius: 20px; background: var(--g1); border: 1px solid var(--edge); }
.seg button { height: 32px; padding-inline: 13px; border-radius: 16px; color: var(--ink2); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
.seg button[aria-selected='true'] { background: linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .07)); color: var(--ink); box-shadow: var(--hi); }
.seg.wide { display: grid; grid-template-columns: 1fr 1fr; }
.inv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.inv-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; border-radius: 20px; background: var(--g1); border: 1px solid var(--edge); box-shadow: var(--hi); }
.inv-stats em { color: var(--ink2); font-size: 12px; }
.inv-stats b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }

/* activity */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.feed-sk { height: 68px; border-radius: 22px; }
.feed-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 22px; text-align: start; background: var(--g1); border: 1px solid rgba(255, 255, 255, .07); }
.feed-row:active { background: var(--g2); }
.feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.feed-main b { max-width: 100%; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; }
.feed-main .muted { font-weight: 500; }
.ftype { font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 9px; background: var(--g2); color: var(--ink2); }
.ftype.t-sale, .ftype.t-buy { background: rgba(52, 211, 153, .14); color: var(--ok); }
.ftype.t-list, .ftype.t-price { background: rgba(47, 140, 255, .16); color: var(--rare); }
.ftype.t-withdraw, .ftype.t-deposit { background: rgba(255, 212, 121, .14); color: var(--leg); }
.feed-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

/* profile */
.profile { display: flex; align-items: center; gap: 16px; margin: 8px 2px 18px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: linear-gradient(150deg, #3a4a6a, #1c2232); font-weight: 700; font-size: 14px; box-shadow: 0 0 0 1px var(--edge2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 66px; height: 66px; font-size: 22px; }
.balance-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; overflow: hidden; border-radius: 30px;
  background: linear-gradient(135deg, rgba(47, 140, 255, .32), rgba(122, 77, 255, .22) 55%, rgba(255, 255, 255, .04)); border: 1px solid var(--edge2); box-shadow: var(--hi), 0 14px 40px rgba(0, 0, 0, .3); }
.balance-card::after { content: ''; position: absolute; width: 220px; height: 220px; inset-inline-end: -60px; top: -70px; background: #fff; opacity: .06; -webkit-mask: var(--pattern) center / cover no-repeat; mask: var(--pattern) center / cover no-repeat; }
.balance-big { display: flex; align-items: baseline; gap: 8px; }
.balance-big .i-ton { width: 28px; height: 28px; align-self: center; color: #fff; }
.balance-big b { font-size: 42px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.balance-big span { color: var(--ink2); font-weight: 600; }
.balance-card .row2 { margin-top: 8px; grid-template-columns: 1fr 1fr; }
.panel { margin-top: 12px; padding: 16px; border-radius: 26px; background: var(--g1); border: 1px solid var(--edge); box-shadow: var(--hi); display: flex; flex-direction: column; gap: 10px; }
.panel .row2 { grid-template-columns: 1fr 1fr; }
.panel-row { display: flex; align-items: center; gap: 12px; }
.panel-ic { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 21px; background: var(--g2); color: var(--blue); }
.panel-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.panel-main .muted { font-size: 13px; direction: ltr; text-align: start; }
[dir='rtl'] .panel-main .muted { text-align: right; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats div { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; border-radius: 18px; background: var(--g1); border: 1px solid rgba(255, 255, 255, .07); }
.stats b { font-size: 19px; font-weight: 700; }
.stats span { color: var(--ink2); font-size: 12.5px; }
.tx { list-style: none; margin: 0; padding: 0; }
.tx li { display: grid; grid-template-columns: 1fr auto 6.5em; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 14px; }
.tx li:last-child { border-bottom: 0; }
.tx li .link { grid-column: 1 / -1; justify-self: start; font-size: 13px; }
.tx-k { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tx-k .i { width: 16px; height: 16px; }
.tx-k.in .i { color: var(--ok); }
.tx-k.out .i { color: var(--leg); }
.st { font-size: 11.5px; font-weight: 650; padding: 1px 8px; border-radius: 8px; background: var(--g2); color: var(--ink2); }
.st-sent { color: var(--ok); }
.st-rejected { color: var(--bad); }
.fine { margin: 16px 4px 0; color: var(--ink3); font-size: 12.5px; }

/* toast: glass capsule at the top, like an iOS notification */
#toast {
  position: fixed; left: 50%; top: calc(var(--safe-top) + 10px); z-index: 90; transform: translate(-50%, -16px);
  max-width: min(92vw, 520px); padding: 11px 18px; border-radius: 22px;
  background: rgba(36, 38, 48, .78); border: 1px solid var(--edge2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 30px rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  color: var(--ink); font-weight: 600; font-size: 14px; text-align: center;
  opacity: 0; transition: opacity .2s, transform .3s cubic-bezier(.2, .9, .25, 1); pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { color: #ffb4b4; }
#toast.ok { color: #9ff0cb; }

.outside { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; }
.outside p { max-width: 32ch; }
.out-mark .mark { width: 76px; height: 76px; }

/* ---------- start screen ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; overflow: hidden;
  padding: calc(var(--safe-top) + 20px) 22px calc(var(--safe-bottom) + 22px);
  background:
    radial-gradient(70% 45% at 50% 30%, rgba(59, 125, 255, .3), transparent 70%),
    radial-gradient(60% 40% at 100% 0%, rgba(122, 77, 255, .3), transparent 70%),
    radial-gradient(70% 40% at 0% 100%, rgba(20, 184, 166, .16), transparent 70%),
    var(--bg);
  transition: opacity .45s ease, transform .45s cubic-bezier(.3, .8, .3, 1);
}
.splash.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.marquee { position: absolute; inset: 0 0 auto; padding-top: calc(var(--safe-top) + 6px); opacity: 0; transition: opacity .8s ease; pointer-events: none;
  -webkit-mask: linear-gradient(180deg, #000 30%, transparent 100%); mask: linear-gradient(180deg, #000 30%, transparent 100%); }
.splash.has-mq .marquee { opacity: .55; }
.mq-row { overflow: hidden; }
.mq-track { display: flex; gap: 12px; width: max-content; animation: mq 46s linear infinite; }
.mq-row.rev .mq-track { animation-direction: reverse; animation-duration: 54s; }
@keyframes mq { to { transform: translateX(-50%); } }
.mq-card { width: 104px; padding: 5px; border-radius: 26px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.splash-main { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.brand-anim { width: min(64vw, 270px); aspect-ratio: 1; margin-bottom: -18px; }
.brand-static { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; animation: pop .5s cubic-bezier(.3, 1.5, .5, 1); }
.brand-static .mark { width: 40%; height: 40%; }
.brand-static b { font-size: 24px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.headline {
  font-size: clamp(36px, 11.5vw, 54px); font-weight: 850; line-height: .95; letter-spacing: -0.045em; text-wrap: balance; direction: ltr;
  background: linear-gradient(180deg, #ffffff 30%, #a9cbff); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rise-in .7s .15s cubic-bezier(.2, .9, .25, 1) both;
}
.sp-sub { max-width: 30ch; color: var(--ink2); font-size: 15.5px; animation: rise-in .7s .25s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes rise-in { from { transform: translateY(14px); opacity: 0; } }
.sp-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; min-height: 52px; animation: rise-in .7s .35s cubic-bezier(.2, .9, .25, 1) both; }
.sp-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 92px; height: 52px; padding: 0 14px; border-radius: 26px; }
.sp-stat.sk { width: 92px; }
.sp-stat b { display: inline-flex; align-items: center; gap: 3px; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-stat b .i-ton { color: #fff; }
.sp-stat em { color: var(--ink2); font-size: 11.5px; }
.splash-foot { position: relative; display: flex; flex-direction: column; gap: 12px; align-items: center; animation: rise-in .7s .45s cubic-bezier(.2, .9, .25, 1) both; }
.splash-foot .btn { max-width: 420px; }
#sp-enter .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
#sp-enter.ready .spin { display: none; }
#sp-enter:disabled { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }
.sp-fine { color: var(--ink3); font-size: 12.5px; text-align: center; }

/* ---------- full catalogue: every collection and model ---------- */
.thumb.icon { background: radial-gradient(circle at 50% 40%, rgba(120, 150, 255, .28), rgba(255, 255, 255, .05) 75%); }
.thumb img.ico { inset: 12%; width: 76%; height: 76%; object-fit: contain; }
.opt.dim .thumb, .opt.dim .apic, .opt.dim .sw { opacity: .7; }
.opt.dim .opt-main b { color: var(--ink2); }
.opt-div { padding: 9px 14px 7px; color: var(--ink3); font-size: 12px; font-weight: 650; letter-spacing: .01em; background: rgba(255, 255, 255, .025); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.apic { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 13px; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 75%); border: 1px solid rgba(255, 255, 255, .08); }
.apic img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; opacity: 0; transition: opacity .18s ease; }
.apic img.ok { opacity: 1; }
.apic img.instant { transition: none; }
.apic > b { color: var(--ink3); font-size: 16px; font-weight: 700; }
.apic img.ok + b { visibility: hidden; }
.apic-symbol { border-radius: 20px; }
.apic-symbol img { inset: 20%; width: 60%; height: 60%; filter: brightness(0) invert(1); opacity: 0; }
.apic-symbol img.ok { opacity: .85; }
.credit { margin: 12px 4px 4px; color: var(--ink3); font-size: 11.5px; text-align: center; }
.credit .link { font-size: 11.5px; }

.mrail-wrap { margin: -2px 0 12px; }
.mrail { gap: 8px; }
.mcard { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 88px; padding: 7px 5px 8px; scroll-snap-align: start;
  border-radius: 20px; background: var(--g1); border: 1px solid var(--edge); transition: transform .14s ease, background .15s, border-color .15s; }
.mcard:active { transform: scale(.95); }
.mcard.on { background: rgba(47, 140, 255, .18); border-color: rgba(47, 140, 255, .55); }
.mcard.dim .apic { opacity: .75; }
.mcard.sk { height: 128px; background: var(--g2); animation: pulse 1.2s ease-in-out infinite; }
.apic-lg { width: 62px; height: 62px; border-radius: 18px; }
.mcard b { max-width: 100%; font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; }
.mcard-r { color: var(--leg); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 14px; }
.mcard-p { display: inline-flex; align-items: center; gap: 2px; color: var(--ink2); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mcard-p .i-ton { width: 10px; height: 10px; }
.mcard.dim .mcard-p { color: var(--ink3); font-weight: 600; }

/* ---------- motion & polish ---------- */
/* tab change */
#view.enter { animation: view-in .32s cubic-bezier(.2, .85, .25, 1) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* balance pill reacts to changes */
.bal, .mini-bal { transition: box-shadow .3s ease; }
.bal.up, .mini-bal.up { animation: bal-up 1.1s ease; }
.bal.down, .mini-bal.down { animation: bal-down 1.1s ease; }
@keyframes bal-up { 15% { box-shadow: var(--hi), 0 0 0 2px rgba(52, 211, 153, .65), 0 0 28px rgba(52, 211, 153, .45); } }
@keyframes bal-down { 15% { box-shadow: var(--hi), 0 0 0 2px rgba(47, 140, 255, .6), 0 0 24px rgba(47, 140, 255, .4); } }

/* the toolbar becomes the compact header once the real one scrolls away */
#tools-top { height: 0; }
.tools { transition: box-shadow .25s ease, background-color .25s ease; }
.tools.stuck {
  background: linear-gradient(180deg, rgba(10, 11, 16, .9), rgba(10, 11, 16, .74));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .07), 0 12px 32px rgba(0, 0, 0, .38);
}
.mini-bal {
  display: none; align-items: center; gap: 5px; height: 44px; padding-inline: 13px; flex: none; border-radius: 22px;
  background: linear-gradient(180deg, #4ea3ff, var(--blue2)); color: #fff; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 4px 14px rgba(26, 109, 255, .3);
}
.mini-bal b { font-weight: 700; font-size: 14.5px; }
.mini-bal .i-ton { color: #fff; width: 15px; height: 15px; }
.tools.stuck .mini-bal { display: flex; animation: pop .28s cubic-bezier(.3, 1.4, .5, 1); }

/* top collections rail */
.rail-sec { margin: 2px 0 6px; }
.rail-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 8px; }
.rail-head h3 { font-size: 16px; font-weight: 700; }
.rail { display: flex; gap: 10px; overflow-x: auto; margin: 0 -14px; padding: 2px 14px 6px; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rc { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 92px; padding: 8px 6px 9px; scroll-snap-align: start;
  border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: transform .14s ease; }
.rc:active { transform: scale(.95); }
.thumb-xl { width: 64px; height: 64px; border-radius: 20px; font-size: 32px; }
.rc b { max-width: 100%; font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; }
.rc-floor { display: inline-flex; align-items: center; gap: 3px; color: var(--ink2); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rc-floor .i-ton { width: 11px; height: 11px; }
.rc-rank { position: absolute; top: 4px; inset-inline-start: 6px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: rgba(10, 12, 18, .6); border: 1px solid rgba(255, 255, 255, .16); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rc:nth-child(1) .rc-rank { color: var(--leg); } .rc:nth-child(2) .rc-rank { color: #d9e2f2; } .rc:nth-child(3) .rc-rank { color: #f0a77a; }

/* grid density */
.gm-end { display: inline-flex; align-items: center; gap: 8px; }
.dens { display: grid; place-items: center; width: 30px; height: 26px; margin: -4px 0; border-radius: 9px; color: var(--ink2); background: var(--g1); border: 1px solid var(--edge); }
.dens .i { width: 15px; height: 15px; }
.grid.dense { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
@media (min-width: 480px) { .grid.dense { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid.dense .card { padding: 4px; border-radius: 20px; contain-intrinsic-size: auto 190px; }
.grid.dense .card-art .art { border-radius: 16px; }
.grid.dense .card-body { gap: 6px; padding: 6px 2px 2px; }
.grid.dense .card-name { padding-inline: 3px; }
.grid.dense .card-name b { font-size: 12px; }
.grid.dense .card-name span { display: none; }
.grid.dense .tag { height: 30px; padding-inline: 8px; font-size: 12.5px; border-radius: 15px; gap: 3px; }
.grid.dense .cart-btn, .grid.dense .yours { width: 30px; height: 30px; border-radius: 15px; }
.grid.dense .yours { width: auto; padding: 0 7px; font-size: 10.5px; }
.grid.dense .cart-btn .i { width: 15px; height: 15px; }
.grid.dense .rar { top: 5px; inset-inline-start: 5px; height: 19px; padding: 0 6px 0 4px; font-size: 10px; }
.grid.dense .lockb { top: 5px; inset-inline-end: 5px; width: 22px; height: 22px; }
.grid.dense .sk .sk-line.short { height: 30px; }

/* similar gifts in the gift sheet */
.gsim { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.gsim .rail { margin: 0 -18px; padding-inline: 18px; }
.mini { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 112px; padding: 4px 4px 6px; scroll-snap-align: start;
  border-radius: 20px; background: var(--g1); border: 1px solid var(--edge); transition: transform .14s ease; }
.mini:active { transform: scale(.95); }
.art-mini { border-radius: 16px; }
.mini-n { padding-inline: 4px; color: var(--ink2); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: start; }
.tag-sm { height: 28px; padding-inline: 8px; font-size: 12.5px; border-radius: 14px; }

/* fly to cart, badge bump */
.art.fly { position: fixed; z-index: 70; margin: 0; pointer-events: none; transform-origin: center; will-change: transform, opacity;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45); }
.bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 35% { transform: scale(1.22); } }

/* confetti */
.confetti { position: fixed; inset: 0; z-index: 80; width: 100vw; height: 100vh; pointer-events: none; }

/* pull to refresh */
#ptr {
  position: fixed; z-index: 25; top: calc(var(--safe-top) - 40px); left: 50%; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 20px;
  color: var(--ink2); opacity: 0; transform: translate(-50%, 0); pointer-events: none;
  background: linear-gradient(180deg, rgba(60, 64, 80, .9), rgba(26, 28, 36, .92)); border: 1px solid var(--edge); box-shadow: var(--hi), 0 8px 24px rgba(0, 0, 0, .4);
  transition: transform .3s cubic-bezier(.3, 1.3, .5, 1), opacity .25s ease;
}
#ptr .i { width: 20px; height: 20px; }
#ptr.ready { color: var(--blue); }
#ptr.spin { opacity: 1; color: var(--blue); }
#ptr.spin .i { animation: spin .7s linear infinite; }

/* back to top */
#totop {
  position: fixed; z-index: 28; inset-inline-end: max(14px, calc(50vw - 286px)); bottom: calc(var(--nav) + var(--safe-bottom) + 24px);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 22px; color: var(--ink);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .22s ease, transform .22s ease;
}
#totop.show { opacity: 1; transform: none; pointer-events: auto; }
body.has-cartbar #totop { bottom: calc(var(--nav) + var(--safe-bottom) + 98px); }
body.locked #totop { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .mq-track { animation: none; }
}
