/* Twipe 1.7.0: товары Twipe, аукционы, розыгрыши, отзывы, блок биржи в профиле. */

/* ---------- карточки ---------- */
.tg-cover { background: linear-gradient(140deg, var(--g1), var(--g2)); }
.tg-cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 10% 0%, rgba(255, 255, 255, .28), transparent 55%), radial-gradient(80% 60% at 100% 100%, rgba(0, 0, 0, .18), transparent 60%); }
.tg-cover::after { content: ""; position: absolute; inset: 0; opacity: .14; background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1.5px); background-size: 14px 14px; }
.tg-cover-asset { position: relative; z-index: 1; max-width: 90%; color: #fff; font-weight: 850; letter-spacing: -.02em; text-align: center; line-height: 1.05; text-shadow: 0 6px 22px rgba(0, 0, 0, .25); overflow-wrap: anywhere; }
.tg-cover-asset--lg { font-size: clamp(22px, 5.2vw, 30px); }
.tg-cover-asset--md { font-size: clamp(18px, 4.4vw, 24px); }
.tg-cover-asset--sm { font-size: clamp(15px, 3.6vw, 19px); font-variant-numeric: tabular-nums; }
.tg-cover-kind { position: absolute; z-index: 1; left: 12px; bottom: 10px; font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.mk-detail-load .tg-cover, .mk-gallery-main .tg-cover { position: absolute; }
.mk-gallery-main .tg-cover-asset--lg { font-size: clamp(30px, 6vw, 46px); }
.mk-gallery-main .tg-cover-asset--md, .mk-gallery-main .tg-cover-asset--sm { font-size: clamp(24px, 5vw, 36px); }
.mk-badge--auc { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.mk-badge--tw { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.mk-price-pre { margin-right: 6px; font-size: 11px !important; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tg-card-auc { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--muted); }
.tg-timer { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-weight: 750; font-variant-numeric: tabular-nums; color: #7c3aed; background: color-mix(in srgb, #8b5cf6 12%, transparent); }
.tg-timer.is-hot { color: #dc2626; background: color-mix(in srgb, #ef4444 13%, transparent); animation: tgPulse 1.6s ease-in-out infinite; }
@keyframes tgPulse { 50% { opacity: .65; } }
.tg-lead { color: #16a34a; font-weight: 750; }

/* ---------- вкладка «Товары Twipe» ---------- */
.tg { display: flex; flex-direction: column; gap: 14px; }
.tg-hero { padding: 16px; border-radius: 24px; background: linear-gradient(140deg, color-mix(in srgb, #f59e0b 12%, var(--rd-surface, var(--bg))), color-mix(in srgb, #6366f1 14%, var(--rd-surface, var(--bg)))); border: 1px solid var(--mk-line); }
.tg-hero h3 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.01em; }
.tg-hero p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; max-width: 640px; }
.tg-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.tg-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; min-height: 96px; border: 0; border-radius: 18px; color: #fff; text-align: left; font: inherit; cursor: pointer; background: linear-gradient(140deg, var(--g1), var(--g2)); box-shadow: 0 14px 28px -20px var(--g1); transition: transform .18s, box-shadow .2s; }
.tg-tile:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -18px var(--g1); }
.tg-tile::after { content: ""; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.tg-tile-ico { font-size: 22px; font-weight: 850; margin-bottom: auto; }
.tg-tile b { font-size: 14.5px; }
.tg-tile small { font-size: 11.5px; opacity: .85; }
.tg-seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tg-seg::-webkit-scrollbar { display: none; }
.tg-seg .mk-chip.is-on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--mk-acc), var(--mk-acc2)); }
.tg-h { margin: 8px 2px 0; font-size: 15px; }
.tg-muted { margin: 0; color: var(--muted); font-size: 13px; }
.tg-empty-sm { padding: 20px; }
.tg-empty-sm p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* коллекция */
.tg-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tg-item { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 22px; background: var(--rd-surface, var(--bg)); border: 1px solid var(--mk-line); }
.tg-item::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 92px; background: linear-gradient(140deg, var(--g1), var(--g2)); opacity: .95; }
.tg-item > * { position: relative; }
.tg-item-top { display: flex; gap: 6px; align-items: center; }
.tg-item-kind { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: rgba(255, 255, 255, .9); margin-right: auto; }
.tg-item-value { min-height: 44px; font-size: 25px; font-weight: 850; color: #fff; letter-spacing: -.01em; font-variant-numeric: tabular-nums; text-shadow: 0 4px 16px rgba(0, 0, 0, .2); overflow-wrap: anywhere; }
.tg-item-show { margin-top: 6px; font-size: 13px; }
.tg-item-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-item-acts .mk-btn { height: 34px; padding: 0 12px; font-size: 13px; }
.tg-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; color: #fff; background: rgba(15, 23, 42, .35); backdrop-filter: blur(6px); }
.tg-pill--warn { background: rgba(245, 158, 11, .9); }
.tg-pill--ok { background: #16a34a; height: 18px; }
.tg-promo, .tg-admin { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; border: 1px solid var(--mk-line); background: var(--mk-soft); }
.tg-promo-ico { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 22px; font-weight: 850; color: #fff; background: linear-gradient(135deg, #14b8a6, #6366f1); }
.tg-promo b { display: block; font-size: 14.5px; }
.tg-promo p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.tg-promo .mk-btn { margin-left: auto; flex: none; }
.tg-admin { flex-wrap: wrap; background: color-mix(in srgb, #f59e0b 8%, transparent); border-color: color-mix(in srgb, #f59e0b 25%, transparent); }
.tg-admin > b { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #b45309; }
.tg-admin-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tg-chs { display: flex; flex-direction: column; gap: 8px; }
.tg-ch { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--rd-surface, var(--bg)); border: 1px solid var(--mk-line); }
.tg-ch > div { flex: 1; min-width: 0; }
.tg-ch b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-ch small { color: var(--muted); font-size: 12.5px; }
.tg-ch-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, #0ea5e9, #22c55e); }

/* розыгрыши */
.tg-gw-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.tg-gw-top p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.tg-gw-top .mk-btn { flex: none; }
.tg-gws { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tg-gw { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: linear-gradient(160deg, color-mix(in srgb, #22c55e 9%, var(--rd-surface, var(--bg))), var(--rd-surface, var(--bg)) 60%); border: 1px solid color-mix(in srgb, #22c55e 22%, var(--mk-line)); animation: mkIn .35s ease both; }
.tg-gw.is-done { background: var(--rd-surface, var(--bg)); border-color: var(--mk-line); }
.tg-gw-head { display: flex; gap: 12px; align-items: center; }
.tg-gw-head > div { flex: 1; min-width: 0; }
.tg-gw-head b { display: block; font-size: 15px; }
.tg-gw-head small { color: var(--muted); font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.tg-gw-ico { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, #22c55e, #eab308); }
.tg-gw-desc { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.tg-gw-prizes { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-prize { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 10px; font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; color: #fff; background: linear-gradient(135deg, #f59e0b, #ef4444); }
.tg-prize--username { background: linear-gradient(135deg, #14b8a6, #6366f1); }
.tg-prize--text { color: var(--text); background: var(--mk-soft); border: 1px solid var(--mk-line); }
.tg-gw-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-gw-acts .mk-btn { height: 34px; font-size: 13px; padding: 0 12px; }
.tg-gw-in { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 14px; font-weight: 800; color: #16a34a; background: color-mix(in srgb, #22c55e 12%, transparent); }
.tg-gw-won { padding: 10px 12px; border-radius: 14px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #22c55e, #16a34a); }
.tg-gw-winners { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.tg-gw-winners b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tg-gw-winners span { font-variant-numeric: tabular-nums; }

/* ---------- карточка лота ---------- */
.tg-instant { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, #f59e0b 10%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 28%, transparent); }
.tg-instant > span { font-size: 22px; }
.tg-instant b { font-size: 14px; }
.tg-instant p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.tg-auc { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: linear-gradient(150deg, color-mix(in srgb, #8b5cf6 10%, transparent), color-mix(in srgb, #ec4899 8%, transparent)); border: 1px solid color-mix(in srgb, #8b5cf6 24%, transparent); }
.tg-auc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tg-auc-row > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--rd-surface, var(--bg)); }
.tg-auc-row span { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tg-auc-row b { font-size: 22px; font-weight: 850; font-variant-numeric: tabular-nums; }
.tg-auc-row b.tg-timer { padding: 0; background: none; font-size: 22px; }
.tg-auc-sub { font-size: 13px; color: var(--muted); }
.tg-bid { display: flex; gap: 8px; }
.tg-bid input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--mk-line); background: var(--rd-surface, var(--bg)); color: var(--text); font: inherit; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; outline: none; }
.tg-bid input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 4px color-mix(in srgb, #8b5cf6 16%, transparent); }
.tg-bid .mk-btn { height: 48px; flex: none; }
.tg-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.tg-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 210px; overflow-y: auto; }
.tg-hist li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; font-size: 13px; }
.tg-hist li.is-top { background: var(--rd-surface, var(--bg)); font-weight: 750; }
.tg-hist b { font-variant-numeric: tabular-nums; }
.tg-hist small { color: var(--muted); font-variant-numeric: tabular-nums; }
.tg-fee-note { padding: 10px 12px; border-radius: 14px; font-size: 13px; color: var(--muted); background: var(--mk-soft); }
.tg-seller-r { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.tg-seller-r b { color: var(--text); }

/* ---------- редактор ---------- */
.tg-ed-auc { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
.tg-ed-goods small { font-weight: 500; color: var(--muted); }
.tg-form h3 { margin-top: 0; }
.tg-form .mk-f { margin-bottom: 10px; }
.tg-pick { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto; padding: 6px; border-radius: 14px; border: 1px solid var(--mk-line); }
.tg-pick-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; font-weight: 750; font-variant-numeric: tabular-nums; cursor: pointer; }
.tg-pick-row:hover { background: var(--mk-soft); }
.tg-pick-row input { width: 18px; height: 18px; accent-color: #6366f1; }
.tg-fees { display: flex; flex-direction: column; gap: 6px; }
.tg-fee { display: grid; grid-template-columns: 1fr 160px 48px; gap: 12px; align-items: center; padding: 6px 4px; font-size: 14px; }
.tg-fee input { accent-color: #6366f1; width: 100%; }
.tg-fee b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- отзывы ---------- */
.tg-overlay--small .mk-dialog { width: min(460px, 100%); }
.tg-rate { display: flex; gap: 6px; justify-content: center; margin: 8px 0 16px; }
.tg-rate button { width: 48px; height: 48px; border: 0; border-radius: 14px; font-size: 28px; line-height: 1; color: color-mix(in srgb, var(--text) 22%, transparent); background: var(--mk-soft); cursor: pointer; transition: transform .15s, color .15s; }
.tg-rate button:hover { transform: scale(1.08); }
.tg-rate button.is-on { color: #f59e0b; background: color-mix(in srgb, #f59e0b 14%, transparent); }
.tg-stars { display: inline-flex; gap: 1px; font-size: 16px; line-height: 1; }
.tg-stars i { font-style: normal; color: color-mix(in srgb, var(--text) 20%, transparent); }
.tg-stars i.on { color: #f59e0b; }
.tg-stars--sm { font-size: 12.5px; }
.tg-rsum { display: flex; gap: 18px; align-items: center; padding: 14px; border-radius: 18px; background: var(--mk-soft); margin-bottom: 12px; }
.tg-rsum-big { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px; }
.tg-rsum-big b { font-size: 36px; font-weight: 850; line-height: 1; }
.tg-rsum-big small { color: var(--muted); font-size: 12px; }
.tg-rbars { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.tg-rbars div { display: grid; grid-template-columns: 12px 1fr 24px; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.tg-rbars i { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--text) 8%, transparent); position: relative; overflow: hidden; }
.tg-rbars i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: #f59e0b; }
.tg-rlist { display: flex; flex-direction: column; gap: 8px; }
.tg-r { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--mk-line); }
.tg-r-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tg-r-head small { color: var(--muted); font-size: 12px; }
.tg-r-title { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.tg-r p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; }

/* ---------- профиль ---------- */
.peer-profile-market { width: 100%; margin: 6px 0 12px; }
.pp-market { display: flex; flex-direction: column; gap: 10px; }
.pp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pp-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 0; border-radius: 16px; background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); font: inherit; }
button.pp-stat { cursor: pointer; transition: background .15s, transform .15s; }
button.pp-stat:hover { background: color-mix(in srgb, var(--text) 9%, transparent); transform: translateY(-1px); }
.pp-stat b { font-size: 17px; font-weight: 850; font-variant-numeric: tabular-nums; }
.pp-stat small { font-size: 11.5px; color: var(--muted); }
.pp-coll { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 16px; background: color-mix(in srgb, var(--text) 4%, transparent); text-align: left; }
.pp-coll-t { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pp-coll > div { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 9px; font-weight: 800; font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, #f59e0b, #ef4444); }
.pp-chip--username { background: linear-gradient(135deg, #14b8a6, #6366f1); }

@media (max-width: 720px) {
  .tg-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tg-tile { min-height: 84px; padding: 10px; }
  .tg-gw-top { flex-direction: column; align-items: stretch; }
  .tg-promo { flex-wrap: wrap; }
  .tg-promo .mk-btn { width: 100%; }
  .tg-fee { grid-template-columns: 1fr 110px 40px; }
}
@media (max-width: 420px) {
  .tg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-auc-row b { font-size: 19px; }
}

/* правки по скриншотам */
.tg-bid .mk-btn { flex: none; width: auto; min-width: 0; padding: 0 18px; }
.tg-bid input { min-width: 110px; }
.mk-badge { white-space: nowrap; }
.tg-gw-head small { flex-wrap: wrap; }
.deal-reviewed { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: 10px; font-size: 12.5px; font-weight: 700; color: #16a34a; background: color-mix(in srgb, #22c55e 12%, transparent); white-space: nowrap; }
@media (max-width: 420px) {
  .tg-tile:last-child { grid-column: span 2; min-height: 64px; }
}
.deal-review-btn { white-space: nowrap; }

/* ---------- 1.8.1: выбор призов ---------- */
.tg-pp { display: flex; flex-direction: column; gap: 10px; }
.tg-pp-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tg-pp-q { flex: 1 1 200px; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--mk-line); border-radius: 12px; background: transparent; color: inherit; font: inherit; font-size: 14px; }
.tg-pp-kinds { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--mk-soft); }
.tg-pp-kinds button { height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.tg-pp-kinds button.is-on { background: var(--rd-surface, var(--bg)); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.tg-pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 2px; }
.tg-pp-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; min-height: 76px; border-radius: 16px; color: #fff; background: linear-gradient(140deg, var(--g1), var(--g2)); cursor: pointer; box-shadow: inset 0 0 0 2px transparent; transition: transform .15s, box-shadow .15s, opacity .15s; opacity: .78; }
.tg-pp-card[hidden] { display: none; }
.tg-pp-card:hover { opacity: .92; }
.tg-pp-card:has(input:checked) { opacity: 1; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9), 0 10px 22px -14px var(--g1); transform: translateY(-1px); }
.tg-pp-card input { position: absolute; opacity: 0; pointer-events: none; }
.tg-pp-ico { font-size: 15px; opacity: .9; }
.tg-pp-v { font-weight: 800; font-size: 15px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tg-pp-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.tg-pp-tick { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .28); font-size: 13px; font-weight: 800; opacity: 0; transition: opacity .15s; }
.tg-pp-card:has(input:checked) .tg-pp-tick { opacity: 1; background: #fff; color: #16a34a; }
.tg-pp-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.tg-pp-all { border: 0; background: transparent; color: #6366f1; font: inherit; font-weight: 650; cursor: pointer; }
