/* «Продать» page (#/sell, pages/sell.js): the Steam sign-in line → the account strip (balance, trade link) over the
   work area (inventory on the left, the offer panel on the right) → the store's offer (dialog) → the trade in
   Steam → the money on the balance. Flat CSS (no nesting); primitives come from components.css.
   Breakpoints: mobile < 768, tablet 768–1099, desktop >= 1100. */

.sell { padding-bottom: var(--space-8); }

/* --- head: display H1 + lead (side by side when there is room) -------------------------------------- */
.sell-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 48px;
  margin-top: 4px;
}
.sell-head__title {
  margin: 0;
  padding-left: 4px;                 /* the skew leans the first letter left */
  font-weight: 900;
  font-size: clamp(3rem, 1rem + 5.6vw, 6.5rem);
  line-height: .86;
}
.sell-head__title .oblique { transform-origin: 0 100%; }
.sell-head__lead { flex: 1 1 360px; max-width: 58ch; margin: 0; padding-bottom: 6px; line-height: 1.55; }

/* --- 1. not signed in: one compact line with the Steam sign-in entry ----------------------------------- */
.sell-signin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 24px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
}
.sell-signin__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--rail-bg, #191B20);
  color: #FFFFFF;
}
.sell-signin__logo { width: 19px; height: 20px; }
.sell-signin__text { flex: 1 1 240px; min-width: 0; margin: 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-2); }
.sell-signin__btn { flex: none; }

/* --- 2. the account strip: who is signed in, the balance, the Steam trade link ------------------------- */
.sell-me {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 12px 20px;
  margin-top: 22px;
  padding: 14px 18px 15px;
  border-radius: var(--radius-lg);
}
.sell-me__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sell-me__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--rail-bg, #191B20);
  color: #FFFFFF;
}
.sell-me__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sell-me__logo { width: 20px; height: 21px; }
.sell-me__ident { display: grid; gap: 1px; min-width: 0; }
.sell-me__name { overflow: hidden; font-size: var(--fs-md); font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.sell-me__id { font-size: var(--fs-xs); line-height: 1.35; color: var(--ink-3); }
.sell-me__out { flex: none; margin-left: auto; }
.sell-me__wallet { grid-row: 1; grid-column: 2; justify-self: end; min-width: 0; }
.sell-me__wallet:empty { display: none; }
.sell-me__balance {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink-2);
  text-align: right;
  text-decoration: none;
  transition: box-shadow var(--dur-fast) var(--ease-out);
}
.sell-me__balance:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.sell-me__balance:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sell-me__balance-label { font-size: var(--fs-xs); color: var(--ink-3); }
.sell-me__balance-value { font-size: var(--fs-lg); font-weight: 700; line-height: 1.2; color: var(--ink); }
.sell-me__parts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 10px; font-size: var(--fs-xs); color: var(--ink-3); }
.sell-me__part { white-space: nowrap; }
.sell-me__linkbox { grid-column: 1 / -1; min-width: 0; padding-top: 11px; border-top: 1px solid var(--line); }
.sell-me__link { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.sell-me__link svg { flex: none; color: var(--success); }
.sell-me__link-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sell-me__link-value { font-weight: 600; color: var(--ink); }
.sell-me__link-edit { padding-inline: 0; font-size: var(--fs-sm); }
.sell-me__link-form { display: grid; gap: 10px; max-width: 560px; }
.sell-me__field .input { width: 100%; min-height: 44px; border-radius: 12px; }
.sell-me__field .field__hint a { color: var(--accent-ink); }
.sell-me__link-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sell-note { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-md); font-size: var(--fs-sm); line-height: 1.5; }
.sell-note__extra { color: var(--ink-2); }
/* «Повторить» inside the catalogue note (the Steam inventory did not load) */
.sell-note__retry { padding: 0; font: inherit; font-weight: 600; color: inherit; text-decoration: underline; }
/* a list row of an item without a picture keeps its slot */
.sell-thumb-empty { display: block; border-radius: 6px; background: var(--surface-sunken); }

/* sales on their way to the store (created / sent): «Открыть» brings the trade screen back */
.sell-active { margin-top: 14px; padding: 14px 18px 16px; border-radius: var(--radius-lg); }
.sell-active__title { margin: 0 0 10px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.sell-active__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sell-active__row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.sell-active__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.sell-active__text { display: grid; gap: 2px; min-width: 0; font-size: var(--fs-sm); color: var(--ink); }
.sell-active__text b { font-weight: 600; }
.sell-active__text > span { font-size: var(--fs-xs); color: var(--ink-3); }

.sell-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 18px;
  align-items: start;
}
.sell-inv2 { min-width: 0; padding: 18px 20px 22px; border-radius: var(--radius-xl); }

.sell-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.sell-tools__search { flex: 1 1 240px; min-width: 0; }
.sell-tools__search .input { min-height: 46px; border-radius: 13px; }
.sell-tools__sort { flex: 0 1 220px; min-width: 180px; }
.sell-tools__sort .select { width: 100%; min-height: 46px; border-radius: 13px; }
.sell-tools__games { height: 46px; }
.sell-tools__switch { flex: none; gap: 10px; font-size: var(--fs-sm); }

/* inventory tiles: picture, name, what you get; ticked = accent frame */
.sell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.sell-tile-sk { display: block; height: 218px; border-radius: 16px; }
/* «Выбрать все доступные» / «Снять выделение» + «Выбрано N из M» above the tiles */
.sell-pickbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 14px;
}
.sell-pickbar:empty { display: none; }
.sell-pickbar__count { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.sell-pickbar__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sell-tile {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 2px;
  height: 100%;
  padding: 10px 12px 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.sell-tile:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px -10px rgba(25, 27, 32, .25); }
.sell-tile.is-selected { border-color: var(--accent); background: var(--accent-tint); }
.sell-tile.is-locked { cursor: not-allowed; }
.sell-tile.is-locked .sell-tile__media img { filter: grayscale(.85); opacity: .6; }
.sell-tile__check { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sell-tile__box {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line-control);
  border-radius: 7px;
  background: rgba(255, 255, 255, .9);
  color: transparent;
}
.sell-tile__check:checked + .sell-tile__box { border-color: var(--accent-strong); background: var(--accent-strong); color: #FFFFFF; }
.sell-tile__check:focus-visible + .sell-tile__box { box-shadow: var(--focus-ring); }
.sell-tile__check:disabled + .sell-tile__box { opacity: .4; }
/* flex, not grid: in a grid cell the picture's % height does not resolve and tall renders overflow the name */
.sell-tile__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 104px;
  margin: 0 -4px 6px;
  overflow: hidden;
  border-radius: 12px;
  background: radial-gradient(60% 70% at 50% 45%, rgba(214, 228, 255, .7), rgba(255, 255, 255, 0) 75%);
}
.sell-tile__media img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
/* The item's rarity, the way the catalogue cards show it (pages/catalog.css .pcard__media::after): its colour as a
   hairline under the picture and nothing written out (owner 2026-10-05: «снизу не надо писать тайное, потому что
   это и так понятно по подсветке»). The name rides in the picture's title and in the tile's accessible name. */
.sell-tile__media::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 3px;
  background: var(--rarity, transparent);
}
.sell-tile__glyph { width: 56px; height: auto; opacity: .35; color: #C98A00; }
/* two lines: Steam names run long («Inscribed Crimson Edge of the Lost Order») */
.sell-tile__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
}
.sell-tile__sub { font-size: var(--fs-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sell-tile__price { display: grid; align-self: end; margin-top: 8px; font-size: var(--fs-xs); color: var(--ink-3); }
.sell-tile__price b { font-size: var(--fs-md); font-weight: 700; color: var(--ink); }
.sell-tile__lock { display: flex; align-items: center; align-self: end; gap: 6px; margin-top: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--warning); }
/* Doppler-type items: the lowest phase's price («по самой недорогой фазе») */
.sell-tile__hint { display: block; font-size: 11px; font-weight: 400; line-height: 1.3; color: var(--ink-3); }
.sell-empty { padding: 48px 16px; }
/* when the refresh pace holds «Проверить снова» back: the time it comes back */
.sell-state__wait { font-size: var(--fs-xs); color: var(--ink-3); }
/* «Показать ещё» under the first tiles of a large inventory */
.sell-more { display: flex; justify-content: center; margin-top: 16px; }
/* the list takes focus after «Повторить» (its button is gone with the error state) */
.sell-inv2__grid { border-radius: 16px; }
.sell-inv2__grid:focus-visible { outline-offset: 4px; }

/* summary («Вы получите») */
.sell-sum { display: grid; gap: 8px; padding: 20px 22px 22px; border-radius: var(--radius-xl); }
.sell-sum__title { font-size: var(--fs-md); font-weight: 600; color: var(--ink-2); }
.sell-sum__total { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1; letter-spacing: .01em; }
/* the display face's tabular figures widen the English thousands comma to a digit cell («22 , 107»): one big
   standalone amount needs no column alignment */
.sell-sum__total.t-num { font-variant-numeric: proportional-nums; }
.sell-sum__count { font-size: var(--fs-sm); color: var(--ink-3); }
.sell-sum__list { display: grid; gap: 6px; margin: 6px 0 4px; padding: 10px 0; border-block: 1px solid var(--line); list-style: none; }
.sell-sum__row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 32px; align-items: center; gap: 8px; }
.sell-sum__row img { width: 44px; height: 33px; object-fit: contain; }
.sell-sum__name { display: grid; min-width: 0; font-size: var(--fs-xs); font-weight: 600; line-height: 1.25; overflow: hidden; }
.sell-sum__name > span { font-weight: 400; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sell-sum__price { font-size: var(--fs-sm); font-weight: 600; }
.sell-sum__more { font-size: var(--fs-xs); color: var(--ink-3); }
/* the minimum sale (SELL_CONFIG.minSaleRub); in warning colour while the selection is under it */
.sell-sum__min { margin: 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--ink-3); }
.sell-sum__min.is-short { font-weight: 600; color: var(--warning); }

/* the breakdown: Маркет prices → the store's fee → a promo bonus → what lands on the balance */
.sell-calc { display: grid; gap: 5px; margin: 2px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
.sell-calc__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sell-calc__row dt { min-width: 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--ink-2); }
.sell-calc__row dd { flex: none; margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }
.sell-calc__row[data-calc='fee'] dd { color: var(--ink-3); }
.sell-calc__row[data-calc='bonus'] dd { color: var(--success); }
.sell-calc__row.is-total { margin-top: 3px; padding-top: 8px; border-top: 1px solid var(--line); }
.sell-calc__row.is-total dt { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.sell-calc__row.is-total dd { font-size: var(--fs-md); font-weight: 700; }

/* the promo code: applied, or the field with its error state */
.sell-promo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 0; }
.sell-promo__field { flex: 1 1 130px; min-width: 0; }
.sell-promo__input { width: 100%; min-height: 44px; border-radius: 12px; text-transform: uppercase; }
.sell-promo__input::placeholder { text-transform: none; }
.sell-promo__btn { flex: none; min-height: 44px; }
.sell-promo__error { flex: 1 1 100%; }
.sell-promo__error[hidden] { display: none; }
.sell-promo--on {
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--success-tint, #E4F5EC);
  font-size: var(--fs-sm);
  color: var(--ink);
}
.sell-promo--on svg { flex: none; color: var(--success); }
.sell-promo--on > span { flex: 1 1 auto; min-width: 0; }
.sell-promo__off { padding-inline: 0; font-size: var(--fs-sm); }

/* where the money leaves the balance afterwards (core/balance.js payout methods) + the KYC note */
.sell-payout { display: grid; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.sell-payout__title { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.sell-payout__country .select { width: 100%; min-height: 44px; border-radius: 12px; }
.sell-payout__list { display: grid; gap: 6px; }
.sell-payout__method {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  padding: 9px 11px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.sell-payout__method:hover { border-color: var(--line-strong); }
.sell-payout__method.is-checked { border-color: var(--accent); background: var(--accent-tint); }
.sell-payout__method input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sell-payout__method:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.sell-payout__icon { display: grid; place-items: center; color: var(--ink-2); }
.sell-payout__method.is-checked .sell-payout__icon { color: var(--accent-ink); }
.sell-payout__text { display: grid; gap: 1px; min-width: 0; }
.sell-payout__text b { font-size: var(--fs-sm); font-weight: 600; line-height: 1.25; }
.sell-payout__text > span { font-size: 11px; line-height: 1.3; color: var(--ink-3); }
.sell-payout__terms { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 11px; color: var(--ink-3); }
.sell-payout__kyc { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--ink-2); }
.sell-payout__kyc svg { flex: none; margin-top: 1px; color: var(--accent-ink); }
.sell-payout__note { margin: -4px 0 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--ink-3); }

/* --- 3. the store's offer (dialog): items, terms, Steam trade link, «Продать за N ₽ на баланс» ------------- */
.sell-offer { display: grid; gap: 14px; }
.sell-offer__sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--accent-tint);
}
.sell-offer__sum-text { display: grid; gap: 2px; min-width: 0; }
.sell-offer__sum-label { font-size: var(--fs-sm); font-weight: 600; color: var(--accent-ink); }
.sell-offer__sum-count { font-size: var(--fs-xs); color: var(--ink-3); }
.sell-offer__sum-value { flex: none; font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--ink); }
.sell-offer__sum-value .t-num { font-variant-numeric: proportional-nums; }
.sell-offer__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sell-offer__row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.sell-offer__row img { width: 44px; height: 33px; object-fit: contain; }
.sell-offer__name { display: grid; min-width: 0; font-size: var(--fs-xs); font-weight: 600; line-height: 1.25; color: var(--ink); }
.sell-offer__name > span { font-weight: 400; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sell-offer__price { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.sell-offer__more { padding-left: 54px; font-size: var(--fs-xs); color: var(--ink-3); }
.sell-offer__terms { display: grid; margin: 0; border-block: 1px solid var(--line); }
.sell-offer__terms > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.sell-offer__terms > div + div { border-top: 1px solid var(--line); }
.sell-offer__terms dt { font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; color: var(--ink); }
.sell-offer__terms dd { margin: 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--ink-2); }
.sell-offer__field .input { width: 100%; min-height: 46px; border-radius: 12px; }
.sell-offer__field .field__hint a { color: var(--accent-ink); }
.sell-link {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  border-radius: 14px;
  background: var(--surface-sunken);
}
.sell-link__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--rail-bg, #191B20); color: #FFFFFF; }
.sell-link__steam { width: 18px; height: 19px; }
.sell-link__text { display: grid; gap: 1px; min-width: 0; }
.sell-link__label { font-size: var(--fs-xs); color: var(--ink-3); }
.sell-link__value { overflow: hidden; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.sell-link__edit { padding-inline: 8px; font-size: var(--fs-sm); }
.sell-offer__error { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--danger-tint); color: var(--danger); font-size: var(--fs-sm); line-height: 1.45; }
.sell-offer__submit [hidden] { display: none; }
.sell-offer__consent { margin: -4px 0 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--ink-3); text-align: center; }
.sell-offer__consent a { color: var(--accent-ink); }
.sell-offer__state { padding: 12px 4px 4px; }
.sell-offer-dialog .dialog__footer:empty { display: none; }

/* --- 4. the trade in Steam: steps, the items, what to check ---------------------------------------------- */
.sell-trade {
  display: grid;
  gap: 18px;
  max-width: 720px;
  margin: 32px auto 0;
  padding: 30px 32px 28px;
  border-radius: var(--radius-xl);
}
.sell-trade__top { display: flex; align-items: center; gap: 16px; }
.sell-trade__steam { display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 20px; background: var(--rail-bg, #191B20); color: #FFFFFF; }
.sell-trade__logo { width: 30px; height: 31px; }
.sell-trade__heading { display: grid; gap: 4px; min-width: 0; }
.sell-trade__title { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.15; letter-spacing: -.015em; outline: none; }
.sell-trade__status { font-size: var(--fs-base); line-height: 1.45; color: var(--ink-2); }
.sell-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sell-steps__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-sunken);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-3);
}
.sell-steps__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.sell-steps__item.is-done { background: var(--success-tint); color: var(--success); }
.sell-steps__item.is-done .sell-steps__mark { background: var(--success); box-shadow: none; color: #FFFFFF; }
.sell-steps__item.is-current { background: var(--accent-tint); color: var(--accent-ink); }
.sell-steps__item.is-current .sell-steps__mark { background: var(--accent-strong); box-shadow: none; color: #FFFFFF; }
.sell-trade__sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: var(--fs-sm); color: var(--ink-3); }
.sell-trade__sum b { font-size: var(--fs-xl); font-weight: 700; color: var(--ink); }
.sell-trade__items { display: grid; gap: 8px; margin: 0; padding: 12px 0; border-block: 1px solid var(--line); list-style: none; }
.sell-trade__item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.sell-trade__item img, .sell-trade__noimg { display: block; width: 64px; height: 48px; object-fit: contain; }
.sell-trade__name { display: grid; min-width: 0; font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; color: var(--ink); }
.sell-trade__name > span { overflow: hidden; font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); text-overflow: ellipsis; white-space: nowrap; }
.sell-trade__price { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.sell-trade__more { padding-left: 76px; font-size: var(--fs-xs); color: var(--ink-3); }
.sell-trade__note { margin: 0; border-radius: 14px; line-height: 1.5; }
.sell-trade__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- 5. the sale's ending: credited (held for CS2) · reversed · declined / expired / failed ---------------- */
.sell-done {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 640px;
  margin: 40px auto 0;
  padding: 40px 36px 36px;
  border-radius: var(--radius-xl);
  text-align: center;
}
.sell-done__icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; background: var(--success-tint, #E4F5EC); color: var(--success); }
.sell-done.is-held .sell-done__icon { background: var(--accent-tint); color: var(--accent-ink); }
.sell-done.is-reversed .sell-done__icon { background: var(--danger-tint); color: var(--danger); }
.sell-done--off .sell-done__icon { background: var(--surface-sunken); color: var(--ink-2); }
.sell-done__title { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.2; outline: none; }
.sell-done__meta { font-size: var(--fs-sm); color: var(--ink-3); }
.sell-done__id { white-space: nowrap; }
.sell-done__text { max-width: 54ch; font-size: var(--fs-base); line-height: 1.55; color: var(--ink-2); }
.sell-done .sell-trade__items { justify-self: stretch; margin-top: 4px; text-align: left; }
.sell-done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

/* --- responsive ------------------------------------------------------------------------------------------ */
@media (min-width: 1100px) {
  .sell-work { grid-template-columns: minmax(0, 1fr) 360px; }
  /* the panel holds the breakdown, the promo code and the payout methods: it scrolls inside itself on a short
     screen instead of pushing «Продолжить» out of reach */
  .sell-sum { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; overscroll-behavior: contain; }
}
@media (max-width: 767.98px) {
  .sell-head { gap: 12px; }
  .sell-head__lead { flex-basis: 100%; padding-bottom: 0; font-size: var(--fs-base); }
  .sell-done { margin-top: 24px; padding: 28px 18px 24px; }
  .sell-signin__btn { flex: 1 1 100%; }
  /* avatar · who · «Выйти» on one row, the balance and the trade link under them */
  .sell-me { grid-template-columns: minmax(0, 1fr); padding: 12px 14px 13px; }
  .sell-me__wallet { grid-row: auto; grid-column: 1; justify-self: stretch; }
  .sell-me__balance { text-align: left; }
  .sell-me__parts { justify-content: flex-start; }
  .sell-active { padding: 12px 12px 14px; }
  .sell-active__row { grid-template-columns: 34px minmax(0, 1fr); }
  .sell-active__icon { width: 34px; height: 34px; }
  .sell-active__row .btn { grid-column: 2; justify-self: start; }
  .sell-offer__sum-value { font-size: 1.6rem; }
  .sell-offer__terms > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sell-trade { margin-top: 24px; padding: 22px 16px 20px; gap: 16px; border-radius: var(--radius-lg); }
  .sell-trade__top { align-items: flex-start; gap: 12px; }
  .sell-trade__steam { width: 48px; height: 48px; border-radius: 16px; }
  .sell-trade__logo { width: 24px; height: 25px; }
  .sell-trade__title, .sell-done__title { font-size: var(--fs-xl); }
  .sell-steps { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sell-steps__item { min-height: 44px; }
  .sell-trade__item { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; }
  .sell-trade__item img, .sell-trade__noimg { width: 52px; height: 39px; }
  .sell-trade__more { padding-left: 62px; }
  .sell-done__actions { justify-self: stretch; }
  .sell-done__actions .btn, .sell-trade__actions .btn { flex: 1 1 100%; }
  .sell-inv2 { padding: 14px 12px 16px; border-radius: var(--radius-lg); }
  /* its own full-width row under the search: squeezed beside it, the select (44 + 40px of padding around the
     value) overflowed its slot and the page, hiding the chosen order (review #16) */
  .sell-tools__sort { flex: 1 1 100%; min-width: 0; }
  .sell-pickbar { margin-top: 12px; }
  .sell-pickbar__actions { flex: 1 1 100%; }
  .sell-pickbar__actions .btn { flex: 1 1 100%; }
  .sell-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sell-tile__media { height: 88px; }
  .sell-sum__total { font-size: 2.2rem; }
}
