/* CUBEX Market — светлая тема в духе Playerok (v36) */
:root {
  --bg: #F4F6F8;
  --card: #FFFFFF;
  --card2: #F1F3F6;
  --line: #E5E9ED;
  --line2: #D6DCE3;
  --tx: #15181C;
  --tx2: #5A6572;
  --tx3: #8C959F;
  --ac: #0FA396;
  --ac2: #0B7E74;
  --ac-dark: #086B63;
  --ac-soft: rgba(15, 163, 150, .1);
  --gold: #B45309;
  --gold-bg: #FDF0D2;
  --red: #D8434C;
  --red-bg: #FCE7E8;
  --blue-bg: #E3ECFD;
  --blue: #3B6FD8;
  --green: #17966C;
  --green-bg: #DFF4EB;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 8px 28px rgba(23, 32, 42, .1);
  --shadow-sm: 0 2px 10px rgba(23, 32, 42, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 15px/1.55 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
body.no-scroll { overflow: hidden; }
a { color: var(--ac); text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; color: var(--tx); }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: .4em 0; }
.tiny { font-size: 12.5px; color: var(--tx2); }
.tiny a { color: var(--ac); }
.center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
main.wrap { min-height: calc(100vh - 300px); padding-top: 26px; padding-bottom: 60px; }

/* ---------------- иконки игр ---------------- */
.gicon {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; flex-shrink: 0; overflow: hidden;
  width: 40px; height: 40px;
}
.gicon svg { display: block; width: 100%; height: 100%; }
.gicon.gc-ic { width: 52px; height: 52px; border-radius: 14px; }
.gicon.sd-ic { width: 34px; height: 34px; }
.gicon.tr-ic { width: 44px; height: 44px; border-radius: 12px; }
.gicon.feed-ic { width: 32px; height: 32px; }
.gicon.cat-ic { width: 44px; height: 44px; border-radius: 12px; }
.gicon.ord-ic { width: 46px; height: 46px; border-radius: 12px; }
.gicon.gal-gi { width: 120px; height: 120px; border-radius: 26px; }
.lc-ph .gicon { width: 62px; height: 62px; border-radius: 16px; }
.ml-ph .gicon { width: 36px; height: 36px; border-radius: 10px; }

/* ---------------- кнопки, поля ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; cursor: pointer;
  padding: 10px 18px; font: 600 14.5px/1 'Inter', sans-serif; color: var(--tx);
  background: var(--card2); transition: filter .15s, background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap; user-select: none;
}
.btn:hover { filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-accent {
  background: linear-gradient(135deg, #17B5A7, #0B8A80); color: #fff;
  box-shadow: 0 4px 14px rgba(15, 163, 150, .3);
}
.btn-accent:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--card); border-color: var(--line2); color: var(--tx); }
.btn-ghost:hover { border-color: var(--tx3); filter: none; }
.btn-warn { background: var(--red-bg); border-color: rgba(216, 67, 76, .35); color: var(--red); }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-wide { width: 100%; }
.fld { display: block; margin: 0 0 14px; font-size: 13px; color: var(--tx2); font-weight: 600; }
.inp, .ta, .sel {
  display: block; width: 100%; margin-top: 6px;
  background: #F4F6F9; color: var(--tx);
  border: 1.5px solid var(--line2); border-radius: 12px;
  padding: 11px 14px; font: 500 14.5px/1.4 'Inter', sans-serif; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.inp::placeholder, .ta::placeholder { color: #A5AEB8; }
.inp:focus, .ta:focus, .sel:focus {
  background: #fff; border-color: var(--ac);
  box-shadow: 0 0 0 3.5px rgba(15, 163, 150, .16);
}
.ta { resize: vertical; min-height: 80px; }
.sel { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--tx2) 50%), linear-gradient(135deg, var(--tx2) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.chk { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 13.5px; color: var(--tx2); cursor: pointer; }
.chk input { margin-top: 2px; accent-color: var(--ac); width: 16px; height: 16px; }
.form-err { background: var(--red-bg); border: 1px solid rgba(216, 67, 76, .3); color: var(--red); border-radius: 10px; padding: 10px 13px; font-size: 13.5px; margin-bottom: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.prewrap { white-space: pre-wrap; word-break: break-word; font: inherit; color: var(--tx2); margin: 6px 0 0; }

/* ---------------- аватар ---------------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; font-weight: 800; flex-shrink: 0;
  line-height: 1; letter-spacing: 0; overflow: hidden; user-select: none;
}
.userbtn .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--line2); }
.userbtn:hover .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ac); }

/* ---------------- шапка ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-t { font-weight: 800; font-size: 19px; letter-spacing: .1em; color: var(--tx); line-height: 1; }
.logo-t em { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--ac); display: block; margin-top: 2px; }

.searchwrap { flex: 1; display: flex; justify-content: center; position: relative; min-width: 0; }
.search { position: relative; width: 100%; max-width: 640px; }
.search-ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--tx3); pointer-events: none; }
.search input {
  width: 100%; background: #F1F3F6; border: 1.5px solid transparent; border-radius: 100px;
  padding: 11px 20px 11px 42px; color: var(--tx); font: 500 14.5px 'Inter', sans-serif; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input:focus { background: #fff; border-color: var(--ac); box-shadow: 0 0 0 3.5px rgba(15, 163, 150, .14); }
.search input::placeholder { color: #9AA3AD; }
.searchdrop {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: min(680px, 94vw); background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); padding: 16px; z-index: 70;
  animation: pop .15s ease;
}
.sd-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--tx3); margin: 4px 0 10px; }
.sd-find {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 12px;
  background: var(--ac-soft); border-radius: 12px; color: var(--tx); cursor: pointer; font-size: 14.5px;
}
.sd-find:hover { background: rgba(15, 163, 150, .16); }
.sd-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sd-game {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px;
  color: var(--tx); transition: background .12s;
}
.sd-game:hover { background: var(--card2); }
.sd-name { font-weight: 600; font-size: 13.5px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-count { font-size: 11.5px; color: var(--tx3); }
.sd-empty { color: var(--tx3); font-size: 13.5px; padding: 10px 4px; }

.topnav { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.navchat {
  display: inline-flex; align-items: center; gap: 7px; position: relative;
  padding: 9px 14px; border-radius: 12px; color: var(--tx2); font-weight: 600; font-size: 14px;
  transition: background .15s, color .15s;
}
.navchat:hover { background: var(--card2); color: var(--tx); }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 100px;
  background: var(--ac); color: #fff; font-size: 11px; font-weight: 800; line-height: 1;
}
.balchip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ac-soft); border: 1px solid rgba(15, 163, 150, .25); color: var(--ac-dark);
  font-weight: 700; font-size: 13.5px; border-radius: 11px; padding: 8px 12px;
}
.userdrop { position: relative; }
.userbtn { background: 0; border: 0; padding: 0; cursor: pointer; display: block; border-radius: 50%; }
.usermenu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 215px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 6px; z-index: 60;
}
.usermenu a, .usermenu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px;
  color: var(--tx); font: 500 14px 'Inter', sans-serif; background: 0; border: 0; cursor: pointer;
}
.usermenu a:hover, .usermenu button:hover { background: var(--ac-soft); }
.um-name { padding: 9px 12px 7px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.um-name b { display: block; font-size: 14.5px; }
.um-name span { font-size: 12px; color: var(--tx3); word-break: break-all; }
.burger { display: none; background: 0; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 21px; height: 2px; background: var(--tx); margin: 4px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobmenu { display: none; border-top: 1px solid var(--line); padding: 8px 20px 14px; background: #fff; }
.mobmenu a { display: block; padding: 11px 4px; color: var(--tx); font-weight: 600; border-bottom: 1px solid var(--line); }

/* ---------------- герой ---------------- */
.hero {
  padding: 40px 34px; text-align: center;
  background: linear-gradient(160deg, #EAF7F5 0%, #FFFFFF 55%);
  border: 1px solid var(--line); border-radius: 20px;
}
.hero-badge {
  display: inline-block; background: var(--ac-soft); color: var(--ac-dark);
  border-radius: 100px; padding: 7px 16px; font-size: 13px; font-weight: 700; margin-bottom: 18px;
}
.hero h1 { font-size: 38px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 14px; }
.hero h1 em { font-style: normal; color: var(--ac); }
.hero-sub { max-width: 620px; margin: 0 auto 24px; color: var(--tx2); font-size: 16px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 38px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 25px; font-weight: 800; }
.hero-stats span { font-size: 12.5px; color: var(--tx3); }

/* ---------------- секции ---------------- */
.sec { margin-top: 42px; }
.sec h2 { margin-bottom: 18px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.sec-head a { font-size: 13.5px; font-weight: 600; }
.gamegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 12px; }
.gamecard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color .15s, transform .15s, box-shadow .15s; box-shadow: var(--shadow-sm);
}
.gamecard:hover { border-color: var(--ac); transform: translateY(-2px); box-shadow: var(--shadow); }
.gc-name { font-weight: 700; font-size: 13px; text-align: center; }
.gc-count { font-size: 11.5px; color: var(--tx3); }
.trustrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trust { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow-sm); }
.trust-ic { margin-bottom: 10px; }
.trust b { display: block; margin-bottom: 6px; }
.trust p { color: var(--tx2); font-size: 13.5px; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-sm); }
.step span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--ac-soft); color: var(--ac-dark);
  font-weight: 800; font-size: 13px; margin-bottom: 10px;
}
.step b { display: block; margin-bottom: 4px; }
.step p { color: var(--tx2); font-size: 13px; margin: 0; }
.feed { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.feedrow { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.feedrow:last-child { border-bottom: 0; }
.feed-t { flex: 1; color: var(--tx2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-p { font-weight: 700; }
.feed-d { color: var(--tx3); font-size: 12px; width: 90px; text-align: right; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 15px 18px; font-weight: 600; list-style: none; }
.faq summary::before { content: '＋'; color: var(--ac); margin-right: 10px; font-weight: 700; }
.faq details[open] summary::before { content: '－'; }
.faq details p { padding: 0 18px 15px 40px; color: var(--tx2); margin: 0; }

/* ---------------- карточки лотов ---------------- */
.lotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
.lotcard {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s; color: var(--tx);
  box-shadow: var(--shadow-sm);
}
.lotcard:hover { border-color: var(--ac); transform: translateY(-3px); box-shadow: var(--shadow); }
.lotcard.is-out { opacity: .55; }
.lc-top { position: relative; }
.lc-img { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--card2); }
.lc-ph { display: flex; align-items: center; justify-content: center; height: 150px; background: linear-gradient(150deg, #F7F9FA, #EDF0F3); }
.lc-game {
  position: absolute; left: 10px; bottom: 10px;
  font-size: 11.5px; font-weight: 700; color: var(--tx);
  background: rgba(255, 255, 255, .92); border-radius: 8px; padding: 4px 9px;
  box-shadow: var(--shadow-sm);
}
.lc-body { padding: 13px 15px 8px; flex: 1; }
.lc-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; min-height: 0; }
.lc-auto { font-size: 11.5px; color: var(--gold); background: var(--gold-bg); border-radius: 7px; padding: 3px 9px; font-weight: 700; }
.lc-title { font-weight: 600; font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-stock { display: inline-block; font-size: 12px; color: var(--green); margin-top: 8px; font-weight: 600; }
.lc-out { color: var(--tx3); font-weight: 500; }
.lc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 15px 14px; border-top: 1px solid var(--line); margin-top: 8px; }
.lc-price { font-weight: 800; font-size: 16.5px; }
.lc-seller { font-size: 12px; color: var(--tx3); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-rate { color: var(--gold); font-style: normal; font-weight: 700; }

/* ---------------- каталог ---------------- */
.crumbs { font-size: 13px; color: var(--tx3); margin-bottom: 16px; }
.crumbs a { color: var(--tx3); }
.crumbs a:hover { color: var(--ac); }
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-head h1 { margin: 0; }
.cat-title { display: flex; align-items: center; gap: 14px; }
.cat-title h1 { margin: 0; }
.cat-tools { display: flex; align-items: center; gap: 12px; }
.fcount { font-size: 13px; color: var(--tx3); white-space: nowrap; }
.frow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.fchip {
  background: var(--card); border: 1px solid var(--line2); border-radius: 100px;
  padding: 8px 15px; font-size: 13px; font-weight: 600; color: var(--tx2);
  transition: border-color .15s, color .15s, background .15s;
}
.fchip:hover { border-color: var(--tx3); color: var(--tx); }
.fchip.on { background: var(--ac-soft); border-color: rgba(15, 163, 150, .4); color: var(--ac-dark); }

/* ---------------- страница лота ---------------- */
.lotpage { display: grid; grid-template-columns: 1fr 330px; gap: 18px; align-items: start; }
.lot-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lot-head { margin-bottom: 2px; }
.lot-head h1 { font-size: 26px; margin: 0 0 10px; }
.lot-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lot-meta .lc-game { position: static; background: var(--card2); box-shadow: none; }
.lot-meta-s { font-size: 12.5px; color: var(--tx3); margin-left: auto; }
.gal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.gal-main { width: 100%; height: 380px; object-fit: cover; display: block; background: var(--card2); }
.gal-ph { display: flex; align-items: center; justify-content: center; height: 320px; background: linear-gradient(150deg, #F7F9FA, #EDF0F3); }
.gal-thumbs { display: flex; gap: 8px; padding: 10px; }
.gal-th { width: 74px; height: 56px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .75; }
.gal-th.on { border-color: var(--ac); opacity: 1; }
.lot-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 86px; }
.buy-price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.buy-meta { color: var(--tx2); font-size: 13.5px; margin: 8px 0 16px; }
.sellercard .sellrow { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--tx); }
.guarblurb { border-left: 3px solid var(--ac); }
.guarblurb p { color: var(--tx2); font-size: 13.5px; margin: 4px 0 0; }

/* ---------------- заказ ---------------- */
.ordpage { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.ord-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ord-side { display: flex; flex-direction: column; gap: 14px; }
.ord-title { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.ord-title h1 { font-size: 21px; margin: 0 0 4px; }
.ord-title .chip-st { margin-left: auto; flex-shrink: 0; }
.ord-ic { flex-shrink: 0; }
.ord-flat {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 46px; height: 46px; font-size: 20px; font-weight: 800; background: var(--ac-soft); color: var(--ac-dark); border-radius: 12px;
}
.tl { display: flex; gap: 0; }
.tl-step { flex: 1; text-align: center; font-size: 12.5px; color: var(--tx3); position: relative; padding-top: 34px; }
.tl-step span {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%; background: var(--card2); border: 1.5px solid var(--line2);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px;
}
.tl-step.done { color: var(--green); }
.tl-step.done span { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.tl-step.now { color: var(--ac-dark); font-weight: 700; }
.tl-step.now span { background: var(--ac-soft); border-color: var(--ac); color: var(--ac-dark); box-shadow: 0 0 0 4px rgba(15, 163, 150, .14); }
.statebox b { font-size: 16px; }
.statebox p { color: var(--tx2); font-size: 14px; }
.okbox { border-color: rgba(23, 150, 108, .35); }
.warnbox { border-color: rgba(180, 83, 9, .35); }
.secretbox h2 { display: flex; align-items: center; gap: 8px; }
.secret-pre {
  background: #10201E; color: #7FE3D9; border-radius: var(--r-sm);
  padding: 14px 16px; white-space: pre-wrap; word-break: break-word;
  font: 600 14px/1.6 ui-monospace, Consolas, monospace; margin: 0 0 12px;
}
.payrow { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; padding: 7px 0; color: var(--tx2); }
.payrow b { color: var(--tx); text-align: right; }
.payrow-sum { border-top: 1px dashed var(--line2); margin-top: 6px; padding-top: 12px; font-size: 15.5px; }
.payrow-sum b { color: var(--ac-dark); font-size: 19px; }

/* чат */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px 2px; margin-bottom: 12px; }
.chat-empty { color: var(--tx3); text-align: center; font-size: 13px; padding: 18px 0; }
.msg { max-width: 78%; display: flex; flex-direction: column; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; align-items: flex-start; }
.msg-b { background: var(--card2); border-radius: 14px; padding: 9px 13px; font-size: 14px; word-break: break-word; }
.msg.mine .msg-b { background: var(--ac); color: #fff; }
.msg-t { font-size: 10.5px; color: var(--tx3); margin-top: 3px; padding: 0 4px; }
.msg-sys { align-self: center; background: var(--gold-bg); color: var(--gold); font-size: 12.5px; border-radius: 100px; padding: 5px 14px; text-align: center; }
.chat-in { display: flex; gap: 8px; }
.chat-in .inp { margin: 0; background: #fff; }
.chat-in .btn { padding: 10px 16px; }

/* личные чаты */
.thlist { display: flex; flex-direction: column; gap: 10px; }
.thread { display: flex; align-items: center; gap: 14px; padding: 13px 16px; color: var(--tx); }
.thread.is-unread { border-color: rgba(15, 163, 150, .45); background: #F4FBFA; }
.th-b { flex: 1; min-width: 0; }
.th-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.th-top b { font-size: 14.5px; }
.th-last { font-size: 13px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.th-last i { font-style: normal; color: var(--tx3); }
.chatpage { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chathead {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.chathead-u { display: flex; align-items: center; gap: 12px; color: var(--tx); }
.chathead-u .tiny { display: block; }
.chathead-lot {
  display: flex; align-items: center; gap: 12px; background: var(--card2);
  border-radius: 12px; padding: 8px 14px; color: var(--tx); max-width: 320px;
}
.chl-t { font-size: 13px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.chathead-lot b { color: var(--ac-dark); white-space: nowrap; }
.bigchat { max-height: none; height: 46vh; padding: 16px; }

/* отзывы */
.revs { display: flex; flex-direction: column; gap: 12px; }
.rev { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.rev:last-child { border-bottom: 0; padding-bottom: 0; }
.rev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.rev-head b { font-size: 14px; }
.rev p { color: var(--tx2); font-size: 13.5px; margin: 0; }
.stars .st { color: var(--line2); font-size: 14px; }
.stars .st.on { color: #E8A713; }
.starsel { display: flex; gap: 4px; margin-bottom: 10px; }
.starsel .st { background: 0; border: 0; font-size: 28px; color: var(--line2); cursor: pointer; padding: 0 2px; transition: color .1s, transform .1s; }
.starsel .st:hover { transform: scale(1.15); }
.starsel .st.on { color: #E8A713; }

/* ---------------- заказы-список ---------------- */
.ords { display: flex; flex-direction: column; gap: 10px; }
.ord { display: flex; align-items: center; gap: 14px; padding: 13px 18px; color: var(--tx); }
.ord-b { flex: 1; min-width: 0; }
.ord-b b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-p { font-weight: 800; font-size: 15.5px; flex-shrink: 0; }
.chip-st {
  display: inline-flex; align-items: center; border-radius: 100px;
  font-size: 12px; font-weight: 700; padding: 5px 12px; flex-shrink: 0; white-space: nowrap;
}
.st-pending { background: #EEF1F4; color: var(--tx2); }
.st-paid { background: var(--blue-bg); color: var(--blue); }
.st-delivered { background: var(--gold-bg); color: var(--gold); }
.st-completed { background: var(--green-bg); color: var(--green); }
.st-disputed { background: var(--red-bg); color: var(--red); }
.st-cancelled { background: #EEF1F4; color: var(--tx3); }

/* ---------------- кабинет продавца ---------------- */
.sellhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.sellhead h1 { margin: 0; }
.secline { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.mylots { display: flex; flex-direction: column; gap: 10px; }
.mylot { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.ml-img { width: 86px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--card2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ml-ph { background: linear-gradient(150deg, #F7F9FA, #EDF0F3); }
.ml-body { flex: 1; min-width: 0; }
.ml-body b { display: block; margin-bottom: 3px; }
.ml-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.ml-price { font-weight: 800; font-size: 16px; }
.ml-acts { display: flex; gap: 6px; }
.lotform { max-width: 760px; }
.lf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.lf-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.imgup { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.imgadd {
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  width: 110px; height: 76px; border: 1.5px dashed var(--line2); border-radius: 10px;
  color: var(--tx3); font-size: 13px; font-weight: 600; transition: border-color .15s, color .15s;
}
.imgadd:hover { border-color: var(--ac); color: var(--ac); }
.imgprev { display: none; grid-template-columns: repeat(3, 110px); gap: 10px; }
.imgcell { position: relative; }
.imgcell img { width: 110px; height: 76px; object-fit: cover; border-radius: 10px; display: block; }
.imgdel {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--red); color: #fff; border: 0; cursor: pointer; font-size: 11px; line-height: 1;
}

/* ---------------- баланс ---------------- */
.balpage { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 26px; }
.balcard { border-color: rgba(15, 163, 150, .35); }
.bal-big { font-size: 40px; font-weight: 800; letter-spacing: -.02em; color: var(--ac-dark); margin: 4px 0 18px; }
.balcard .btn { width: 100%; }

/* ---------------- профиль продавца ---------------- */
.sellhead2 { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.sellhead2 h1 { margin: 0 0 4px; }
.sellhead2-b { flex: 1; min-width: 200px; }

/* ---------------- правила ---------------- */
.rules { max-width: 800px; margin: 0 auto; }
.rules .card { margin-bottom: 14px; }
.rules .card p { color: var(--tx2); }

/* ---------------- пусто/загрузка ---------------- */
.empty { text-align: center; padding: 56px 20px; color: var(--tx2); }
.empty b { display: block; font-size: 18px; color: var(--tx); margin-bottom: 6px; }
.empty p { max-width: 400px; margin: 0 auto 16px; }
.spin {
  width: 30px; height: 30px; margin: 30px auto; border-radius: 50%;
  border: 3px solid var(--line2); border-top-color: var(--ac);
  animation: spin .8s linear infinite;
}
.spin-page { margin-top: 80px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- модалки/тост ---------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(18, 26, 32, .55); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; width: 100%; max-width: 420px; max-height: 92vh; overflow-y: auto;
  background: var(--card); border-radius: 18px;
  padding: 26px 26px 22px; box-shadow: var(--shadow); animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } }
.modal-x {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px;
  background: var(--card2); border: 0; border-radius: 50%;
  color: var(--tx2); cursor: pointer; font-size: 12px;
}
.modal-x:hover { color: var(--tx); }
.modal-t { margin-bottom: 16px; }
.seg { display: flex; background: var(--card2); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.seg-btn {
  flex: 1; background: 0; border: 0; border-radius: 9px; padding: 9px;
  color: var(--tx2); font: 600 14px 'Inter', sans-serif; cursor: pointer;
}
.seg-btn.active { background: #fff; color: var(--tx); box-shadow: 0 1px 6px rgba(23, 32, 42, .12); }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #1B2127; color: #fff; border-radius: 12px; padding: 12px 20px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow); z-index: 200; max-width: 90vw;
  animation: toastin .2s ease;
}
.toast-bad { background: var(--red); }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------------- футер ---------------- */
.foot { border-top: 1px solid var(--line); background: var(--card); margin-top: 40px; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 20px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--tx3); font-size: 13px; }
.foot-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-nav a { color: var(--tx2); font-size: 13px; }
.foot-nav a:hover { color: var(--ac); }

/* ---------------- адаптив ---------------- */
@media (max-width: 1020px) {
  .lotpage, .ordpage { grid-template-columns: 1fr; }
  .lot-side { position: static; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .trustrow { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar-in { gap: 10px; flex-wrap: wrap; }
  .searchwrap { order: 3; flex-basis: 100%; }
  .searchdrop { left: 0; transform: none; width: 100%; }
  .sd-games { grid-template-columns: repeat(2, 1fr); }
  .topnav { gap: 6px; }
  .btn-sell { display: none; }
  .navchat span:not(.badge) { display: none; }
  .navchat { padding: 9px 11px; }
  .burger { display: block; margin-left: auto; }
  .topnav { margin-left: auto; }
  .mobmenu { display: block; }
  .mobmenu[hidden] { display: none; }
  .hero { padding: 26px 18px; }
  .hero h1 { font-size: 25px; }
  .hero-stats { gap: 22px; }
  h1 { font-size: 24px; }
  .lotgrid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .lc-img { height: 110px; }
  .lc-ph { height: 110px; }
  .lc-ph .gicon { width: 44px !important; height: 44px !important; }
  .steps { grid-template-columns: 1fr; }
  .gamegrid { grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); }
  .gamecard { padding: 12px 8px; }
  .gamecard .gicon { width: 40px !important; height: 40px !important; border-radius: 11px !important; }
  .lf-grid { grid-template-columns: 1fr; }
  .balpage { grid-template-columns: 1fr; }
  .mylot { flex-wrap: wrap; }
  .ml-side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; width: 100%; }
  .ord { flex-wrap: wrap; }
  .foot-in { flex-direction: column; align-items: flex-start; }
  .chathead-lot { max-width: 100%; }
  .bigchat { height: 52vh; }
}
