/* Дополняет forum.css — токены, шапка и футер берутся оттуда. */

.market-main{ padding:130px 0 40px; position:relative; z-index:1; }
.market-wrap{ max-width:1320px; margin:0 auto; padding:0 28px; }
.market-wrap.narrow{ max-width:960px; }

/* ================= ШАПКА КАТАЛОГА ================= */
.market-head{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:24px; flex-wrap:wrap; margin-bottom:26px;
}
.market-head h1{
  font-family:var(--font-display); font-weight:800; text-transform:uppercase;
  font-size:clamp(1.5rem, 3vw, 2.1rem); letter-spacing:-.01em; margin-bottom:10px;
}
.market-counts{ display:flex; gap:18px; margin-bottom:12px; font-size:.9rem; color:var(--grey); }
.market-counts b{ color:var(--white); font-weight:700; }
.market-lead{ color:var(--grey); font-size:.94rem; max-width:600px; }

.market-search{ position:relative; margin-bottom:16px; }
.market-search input{
  width:100%; background:var(--surface); border:1px solid var(--border);
  border-radius:999px; padding:.85rem 1.2rem .85rem 2.9rem;
  color:var(--white); font-family:var(--font-body); font-size:.95rem;
}
.market-search input:focus{ outline:none; border-color:var(--red); box-shadow:0 0 0 3px rgba(232,52,42,.15); }
.search-icon{ position:absolute; left:16px; top:50%; transform:translateY(-50%); width:17px; height:17px; color:var(--grey-dim); }

.market-filters{ display:flex; gap:8px; margin-bottom:26px; flex-wrap:wrap; }
.chip{
  padding:.45rem 1.05rem; border-radius:999px; border:1px solid var(--border);
  color:var(--grey); font-size:.84rem; background:transparent;
  transition:background-color .15s, border-color .15s, color .15s;
}
.chip:hover{ color:var(--white); border-color:var(--grey-dim); }
.chip.active{ background:var(--red); border-color:var(--red); color:#120503; }

/* ================= СЕТКА ОБЪЯВЛЕНИЙ (4 в ряд) ================= */
.market-grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:18px; }
@media (max-width: 1240px){ .market-grid{ grid-template-columns:repeat(3, 1fr); } }
@media (max-width: 940px){ .market-grid{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width: 600px){ .market-grid{ grid-template-columns:1fr; } }

.market-card{
  display:flex; flex-direction:column;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); overflow:hidden;
  transition:border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.market-card:hover{
  border-color:var(--red-dim); transform:translateY(-3px);
  box-shadow:0 18px 40px -22px rgba(0,0,0,.85);
}
.market-cover{
  aspect-ratio:16/10; position:relative; overflow:hidden;
  display:grid; place-items:center;
  background:
    radial-gradient(120% 120% at 30% 15%, rgba(232,52,42,.26), transparent 60%),
    linear-gradient(150deg, var(--surface-2), #101013);
  border-bottom:1px solid var(--border-soft);
}
.market-cover img{ width:100%; height:100%; object-fit:cover; display:block; }
.market-cover-icon{ width:34px; height:34px; color:var(--red); opacity:.5; }

.market-card-body{ padding:14px 16px 16px; display:flex; flex-direction:column; flex:1; }
.market-seller{ display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.seller-avatar{
  width:22px; height:22px; border-radius:6px; flex-shrink:0; overflow:hidden;
  background:var(--red); color:var(--black);
  display:grid; place-items:center;
  font-family:var(--font-display); font-weight:800; font-size:.66rem;
}
.seller-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.seller-name{
  font-size:.82rem; color:var(--white); font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.market-cat{
  margin-left:auto; font-size:.75rem; color:var(--grey-dim);
  white-space:nowrap; flex-shrink:0;
}
.market-title{
  font-size:.95rem; font-weight:700; color:var(--white); line-height:1.35; margin-bottom:8px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.market-excerpt{
  font-size:.84rem; color:var(--grey); line-height:1.5; margin-bottom:14px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.market-foot{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-top:auto; padding-top:12px; border-top:1px solid var(--border-soft);
}
.market-term{ font-size:.8rem; color:var(--grey-dim); }
.market-price{ font-family:var(--font-display); font-weight:800; font-size:1rem; color:var(--white); }

/* ================= SELL ================= */
.sell-head{ margin-bottom:30px; }
.sell-head.compact{ margin-bottom:24px; }
.sell-head h1{
  font-family:var(--font-display); font-weight:800; text-transform:uppercase;
  font-size:clamp(1.5rem, 3vw, 2.1rem); letter-spacing:-.01em; margin-bottom:12px;
}
.sell-head p{ color:var(--grey); font-size:.95rem; max-width:640px; }

.sell-choice{ display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:46px; }
@media (max-width: 760px){ .sell-choice{ grid-template-columns:1fr; } }
.sell-card{
  display:flex; flex-direction:column;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); padding:30px 28px;
  transition:border-color .18s ease, transform .18s ease;
}
.sell-card:hover{ border-color:var(--red); transform:translateY(-3px); }
.sell-icon{
  width:52px; height:52px; border-radius:14px; margin-bottom:18px;
  background:var(--surface-2); border:1px solid var(--border);
  display:grid; place-items:center; color:var(--red);
}
.sell-icon svg{ width:24px; height:24px; }
.sell-card h2{
  font-family:var(--font-display); font-weight:700; text-transform:uppercase;
  font-size:1.05rem; margin-bottom:10px; color:var(--white);
}
.sell-card p{ color:var(--grey); font-size:.9rem; line-height:1.6; margin-bottom:18px; flex:1; }
.sell-go{ font-family:var(--font-mono); font-size:.82rem; color:var(--red-hi); }

.how-block, .fee-block{ margin-bottom:40px; }
.how-title{
  font-family:var(--font-display); font-weight:700; text-transform:uppercase;
  font-size:1.05rem; margin-bottom:18px; color:var(--white);
}
.how-steps{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
.how-steps li{ display:flex; gap:14px; align-items:flex-start; }
.how-n{
  width:28px; height:28px; flex-shrink:0; border-radius:50%;
  border:1px solid var(--red); color:var(--red-hi);
  display:grid; place-items:center;
  font-family:var(--font-mono); font-size:.8rem; font-weight:600;
}
.how-steps div{ color:var(--grey); font-size:.92rem; line-height:1.65; padding-top:2px; }
.how-steps b{ color:var(--white); }

.fee-lead{ color:var(--grey); font-size:.92rem; margin-bottom:16px; }
.fee-grid{ display:flex; flex-direction:column; gap:1px; background:var(--border-soft);
  border:1px solid var(--border-soft); border-radius:var(--r-md); overflow:hidden; }
.fee-row{
  display:flex; align-items:center; justify-content:space-between;
  background:var(--surface); padding:14px 18px; font-size:.92rem; color:var(--grey);
}
.fee-row b{ font-family:var(--font-display); font-weight:800; color:var(--red-hi); }

/* ================= ФОРМЫ СОЗДАНИЯ ================= */
.compose-layout{ display:grid; grid-template-columns:1.7fr 1fr; gap:24px; align-items:start; }
@media (max-width: 940px){ .compose-layout{ grid-template-columns:1fr; } }

.compose-left{ min-width:0; display:flex; flex-direction:column; gap:20px; }
.compose-section{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); padding:26px 28px;
}
.section-label{
  font-family:var(--font-mono); font-size:.72rem; text-transform:uppercase;
  letter-spacing:.06em; color:var(--red-hi); margin-bottom:18px;
}
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width: 560px){ .field-row{ grid-template-columns:1fr; } }
.dim{ color:var(--grey-dim); font-weight:400; }

.market-main .field input[type=number]{ -moz-appearance:textfield; }
.market-main .field select{ cursor:pointer; }

.oblig-block{
  background:var(--surface); border:1px solid var(--border);
  border-left:2px solid var(--red);
  border-radius:var(--r-lg); padding:22px 26px;
}
.oblig-title{
  font-family:var(--font-display); font-weight:700; text-transform:uppercase;
  font-size:.88rem; margin-bottom:16px; color:var(--white);
}
.check{ display:flex; gap:12px; align-items:flex-start; margin-bottom:14px; cursor:pointer; }
.check:last-child{ margin-bottom:0; }
.check input{
  appearance:none; width:18px; height:18px; flex-shrink:0; margin-top:2px;
  border:1px solid var(--border); border-radius:5px; background:var(--black);
  cursor:pointer; position:relative; transition:background-color .15s, border-color .15s;
}
.check input:checked{ background:var(--red); border-color:var(--red); }
.check input:checked::after{
  content:""; position:absolute; left:5px; top:1px;
  width:5px; height:10px; border:solid #120503; border-width:0 2px 2px 0; transform:rotate(45deg);
}
.check span{ font-size:.86rem; color:var(--grey); line-height:1.55; }

/* правая колонка — выручка */
.compose-right{ position:sticky; top:110px; }
.payout-card{
  background:
    linear-gradient(150deg, rgba(232,52,42,.14), rgba(122,26,20,.03) 60%),
    var(--surface-2);
  border:1px solid var(--border); border-radius:var(--r-lg); padding:26px 24px;
}
.payout-title{
  font-family:var(--font-display); font-weight:700; text-transform:uppercase;
  font-size:.9rem; margin-bottom:18px; color:var(--white);
}
.payout-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; font-size:.9rem; color:var(--grey); }
.payout-row b{ color:var(--white); font-weight:600; white-space:nowrap; }
.payout-row.muted b{ color:var(--red-hi); }
.payout-row i{ font-style:normal; font-family:var(--font-mono); font-size:.78rem; color:var(--grey-dim); }
.payout-divider{ border:0; border-top:1px solid var(--border); margin:16px 0; }
.payout-row.total{ font-size:.95rem; color:var(--white); margin-bottom:0; }
.payout-row.total b{ font-family:var(--font-display); font-weight:800; font-size:1.25rem; }
.payout-submit{ width:100%; margin-top:20px; justify-content:center; }
.payout-note{ font-size:.78rem; color:var(--grey-dim); text-align:center; margin-top:10px; }

.market-main .form-status{ font-family:var(--font-mono); font-size:.8rem; color:var(--red-hi); text-align:center; margin-top:10px; min-height:16px; }
.market-main .form-status.ok{ color:#3FBF6A; }
.market-main .form-status a{ color:var(--red-hi); font-weight:600; }

.thumb-grid .thumb-video{
  display:grid; place-items:center; background:var(--surface-2); color:var(--grey);
  width:100%; height:100%; font-family:var(--font-mono); font-size:.66rem; text-align:center; padding:4px;
}

/* ================= СТРАНИЦА ОБЪЯВЛЕНИЯ ================= */
.listing-title{
  font-family:var(--font-display); font-weight:800;
  font-size:clamp(1.4rem, 2.8vw, 2rem); line-height:1.2; letter-spacing:-.01em;
  margin:6px 0 22px; color:var(--white);
}
.listing-banner{
  background:rgba(232,52,42,.1); border:1px solid var(--red-dim); border-radius:var(--r-md);
  padding:12px 16px; font-size:.87rem; color:var(--red-hi); margin-bottom:18px;
}
.listing-layout{ display:grid; grid-template-columns:1.55fr 1fr; gap:24px; align-items:start; }
@media (max-width: 960px){ .listing-layout{ grid-template-columns:1fr; } }
.listing-left{ min-width:0; display:flex; flex-direction:column; gap:20px; }
.listing-right{ display:flex; flex-direction:column; gap:18px; position:sticky; top:110px; }
@media (max-width: 960px){ .listing-right{ position:static; } }

.listing-gallery{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); overflow:hidden;
}
.gallery-main{ aspect-ratio:16/9; background:var(--surface-2); }
.gallery-main img, .gallery-main video{ width:100%; height:100%; object-fit:cover; display:block; }
.gallery-empty{ padding:60px 20px; text-align:center; color:var(--grey-dim); font-size:.9rem; }
.gallery-thumbs{ display:flex; gap:8px; padding:12px; overflow-x:auto; }
.gal-thumb{
  width:76px; height:52px; flex-shrink:0; border-radius:8px; overflow:hidden;
  border:1px solid var(--border); background:var(--surface-2); padding:0;
}
.gal-thumb.active{ border-color:var(--red); }
.gal-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

.seller-card{
  display:flex; align-items:center; gap:16px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); padding:18px 22px;
}
.seller-big{
  width:48px; height:48px; border-radius:13px; flex-shrink:0; overflow:hidden;
  background:var(--red); color:var(--black);
  display:grid; place-items:center;
  font-family:var(--font-display); font-weight:800; font-size:1.1rem;
}
.seller-big img{ width:100%; height:100%; object-fit:cover; display:block; }
.seller-top{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.seller-top b{ color:var(--white); font-size:.98rem; }
.seller-rating{ font-size:.85rem; color:var(--grey); }
.star{ color:var(--grey-dim); }
.star.on{ color:#E0B341; }
.seller-meta{ font-size:.82rem; color:var(--grey-dim); margin-top:4px; }

.listing-block{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); padding:24px 26px;
}
.block-title{
  font-family:var(--font-display); font-weight:700; text-transform:uppercase;
  font-size:.95rem; color:var(--white); margin-bottom:16px;
}
.block-title .muted{ font-family:var(--font-mono); font-size:.75rem; color:var(--grey-dim); text-transform:none; font-weight:400; }
.listing-desc{ color:#DAD7D2; font-size:.94rem; line-height:1.75; white-space:pre-wrap; }
.dim{ color:var(--grey-dim); }
.small{ font-size:.85rem; }

.review{ display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--border-soft); }
.review:last-child{ border-bottom:0; padding-bottom:0; }
.review-top{ display:flex; align-items:center; gap:12px; margin-bottom:6px; flex-wrap:wrap; }
.review-top b{ color:var(--white); font-size:.9rem; }
.review-stars{ font-size:.82rem; }
.review-body p{ color:var(--grey); font-size:.88rem; line-height:1.6; }

/* карточка заказа */
.order-card{
  background:
    linear-gradient(150deg, rgba(232,52,42,.14), rgba(122,26,20,.03) 60%),
    var(--surface-2);
  border:1px solid var(--border); border-radius:var(--r-lg); padding:24px;
}
.order-price{ font-family:var(--font-display); font-weight:800; font-size:1.7rem; color:var(--white); }
.order-term{ font-size:.87rem; color:var(--grey); margin:6px 0 18px; }
.order-btn{ width:100%; justify-content:center; padding:.85rem 1.5rem; font-size:.95rem; }
.order-notes{ list-style:none; margin:16px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }
.order-notes li{ font-size:.8rem; color:var(--grey-dim); line-height:1.5; padding-left:14px; position:relative; }
.order-notes li::before{ content:""; position:absolute; left:0; top:.55em; width:4px; height:4px; background:var(--red); border-radius:50%; }
.order-notes a{ color:var(--red-hi); }

/* ================= ЧАТ ================= */
.chat-card{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); display:flex; flex-direction:column; overflow:hidden;
}
.chat-head{
  display:flex; align-items:center; gap:10px;
  padding:14px 18px; border-bottom:1px solid var(--border-soft); flex-wrap:wrap;
}
.chat-head b{ color:var(--white); font-size:.9rem; }
.chat-head-actions{ margin-left:auto; display:flex; gap:8px; }
.chat-role{ margin-left:auto; font-family:var(--font-mono); font-size:.72rem; color:var(--grey-dim); }
.chat-avatar-sm{
  width:30px; height:30px; border-radius:9px; flex-shrink:0; overflow:hidden;
  background:var(--red); color:var(--black);
  display:grid; place-items:center;
  font-family:var(--font-display); font-weight:800; font-size:.8rem;
}
.chat-avatar-sm img{ width:100%; height:100%; object-fit:cover; display:block; }

.chat-body{ padding:18px; display:flex; flex-direction:column; gap:14px; max-height:340px; overflow-y:auto; }
.chat-card.big .chat-body{ max-height:520px; min-height:380px; }
.chat-msg{ display:flex; gap:10px; align-items:flex-start; }
.chat-msg.mine{ flex-direction:row-reverse; }
.chat-msg.system{ justify-content:center; }
.chat-bubble{
  background:var(--surface-2); border:1px solid var(--border); border-radius:14px;
  padding:10px 14px; max-width:78%; min-width:0;
}
.chat-msg.mine .chat-bubble{ background:rgba(232,52,42,.12); border-color:var(--red-dim); }
.chat-msg.admin .chat-bubble{ border-color:#8a6d1f; background:rgba(224,179,65,.08); }
.chat-bubble.sys{
  background:transparent; border:1px dashed var(--border); color:var(--grey-dim);
  font-size:.82rem; text-align:center; max-width:100%; line-height:1.55;
}
.chat-author{ font-family:var(--font-mono); font-size:.7rem; color:var(--grey-dim); margin-bottom:5px; }
.chat-author i{ font-style:normal; opacity:.7; }
.chat-text{ font-size:.88rem; color:var(--white); line-height:1.55; word-break:break-word; white-space:pre-wrap; }
.chat-img{ margin-top:8px; border-radius:10px; max-width:240px; display:block; }

.chat-input{ display:flex; gap:8px; align-items:center; padding:12px 14px; border-top:1px solid var(--border-soft); }
.chat-input input[type=text]{
  flex:1; background:var(--black); border:1px solid var(--border); border-radius:999px;
  padding:.65rem 1rem; color:var(--white); font-family:var(--font-body); font-size:.88rem;
}
.chat-input input[type=text]:focus{ outline:none; border-color:var(--red); }
.chat-attach{
  width:34px; height:34px; flex-shrink:0; border-radius:50%;
  border:1px solid var(--border); color:var(--grey);
  display:grid; place-items:center; background:transparent;
}
.chat-attach:hover{ border-color:var(--red); color:var(--red-hi); }
.chat-attach svg{ width:15px; height:15px; }
.chat-hint{ font-size:.76rem; color:var(--grey-dim); padding:0 16px 14px; }
.chat-attached{ font-family:var(--font-mono); font-size:.76rem; color:var(--grey); padding:0 16px 10px; }
.link-btn{ color:var(--red-hi); font-size:.76rem; background:none; border:0; text-decoration:underline; }

/* ================= СТРАНИЦА СДЕЛКИ ================= */
.deal-sub{ font-family:var(--font-mono); font-size:.82rem; color:var(--grey-dim); margin:-14px 0 22px; }
.deal-layout{ display:grid; grid-template-columns:1.6fr 1fr; gap:24px; align-items:start; }
@media (max-width: 960px){ .deal-layout{ grid-template-columns:1fr; } }
.deal-side{ position:sticky; top:110px; }
@media (max-width: 960px){ .deal-side{ position:static; } }

.deal-shield{
  display:flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:.76rem; color:var(--red-hi);
  border:1px solid var(--red-dim); border-radius:999px; padding:6px 12px;
  margin-bottom:16px; width:fit-content;
}
.deal-shield svg{ width:14px; height:14px; }
.deal-amount{ font-family:var(--font-display); font-weight:800; font-size:1.45rem; color:var(--white); line-height:1.3; }
.deal-fee{ font-size:.8rem; color:var(--grey-dim); margin-top:6px; }
.deal-actions{ display:flex; flex-direction:column; gap:10px; margin-top:18px; }
.deal-btn{ width:100%; justify-content:center; }
.invoice-form label{ display:block; font-family:var(--font-mono); font-size:.74rem; color:var(--grey-dim); margin-bottom:7px; }
.invoice-form input{
  width:100%; background:var(--black); border:1px solid var(--border); border-radius:var(--r-md);
  padding:.7rem .95rem; color:var(--white); font-size:.92rem;
}
.invoice-form input:focus{ outline:none; border-color:var(--red); }

.deal-delivery{
  margin-top:16px; padding:14px 16px;
  background:var(--surface); border:1px solid var(--red-dim); border-radius:var(--r-md);
}
.delivery-label{ font-family:var(--font-mono); font-size:.72rem; color:var(--red-hi); margin-bottom:6px; }
.delivery-link{ font-size:.84rem; color:var(--white); word-break:break-all; text-decoration:underline; }

.review-form textarea{
  width:100%; min-height:80px; margin-top:10px; resize:vertical;
  background:var(--black); border:1px solid var(--border); border-radius:var(--r-md);
  padding:.7rem .95rem; color:var(--white); font-family:var(--font-body); font-size:.88rem;
}
.review-form textarea:focus{ outline:none; border-color:var(--red); }
.rate-row{ display:flex; gap:4px; }
.star-btn{ font-size:1.5rem; color:var(--grey-dim); background:none; border:0; line-height:1; padding:0 2px; }
.star-btn.on{ color:#E0B341; }

.modal-back{
  position:fixed; inset:0; background:rgba(5,5,6,.8); backdrop-filter:blur(4px);
  display:grid; place-items:center; padding:24px; z-index:300;
}
.modal-box{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg);
  padding:28px; max-width:460px; width:100%;
}
.modal-box h2{ font-family:var(--font-display); font-weight:700; font-size:1.05rem; margin-bottom:12px; color:var(--white); }
.modal-box p{ color:var(--grey); font-size:.9rem; line-height:1.65; margin-bottom:20px; }
.modal-box .modal-actions{ display:flex; gap:10px; justify-content:flex-end; }

/* ================= СПИСОК ЗАКАЗОВ ================= */
.order-list{
  display:flex; flex-direction:column; gap:1px;
  background:var(--border-soft); border:1px solid var(--border-soft);
  border-radius:var(--r-lg); overflow:hidden;
}
.order-row{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  background:var(--black); padding:16px 20px; transition:background-color .15s ease;
}
.order-row:hover{ background:var(--surface); }
.order-main{ min-width:0; }
.order-title{ font-size:.94rem; font-weight:600; color:var(--white); margin-bottom:5px; }
.order-meta{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; font-size:.78rem; color:var(--grey-dim); font-family:var(--font-mono); }
.badge-role{
  font-size:.68rem; padding:2px 8px; border-radius:999px;
  border:1px solid var(--border); color:var(--grey);
}
.order-right{ display:flex; align-items:center; gap:14px; flex-shrink:0; }
.order-sum{ font-family:var(--font-display); font-weight:800; font-size:.95rem; color:var(--white); }
.order-status{
  font-family:var(--font-mono); font-size:.7rem; padding:4px 10px;
  border-radius:999px; border:1px solid var(--border); color:var(--grey); white-space:nowrap;
}
.st-invoiced{ border-color:#8a6d1f; color:#E0B341; }
.st-paid{ border-color:var(--red-dim); color:var(--red-hi); }
.st-done{ border-color:rgba(63,191,106,.4); color:#3FBF6A; }
.st-disputed{ background:rgba(232,52,42,.12); border-color:var(--red); color:var(--red-hi); }
.grid-state .link, .order-list .link{ color:var(--red-hi); }

@media (max-width: 560px){
  .order-row{ flex-direction:column; align-items:flex-start; }
  .order-right{ width:100%; justify-content:space-between; }
}

/* логотип: тот же знак, что и на вкладке браузера */
.logo-mark{ background:transparent !important; padding:0; overflow:hidden; }
.logo-mark svg{ width:100%; height:100%; display:block; }

/* поля в модалках и форме счёта — тот же вид, что и везде */
.modal-box input[type=text],
.modal-box input[type=number],
.modal-box input[type=email],
.invoice-form input,
.market-main input[type=number]{
  width:100%;
  background:var(--black);
  border:1px solid var(--border);
  border-radius:var(--r-md);
  padding:.8rem 1rem;
  color:var(--white);
  font-family:var(--font-body);
  font-size:.94rem;
}
.modal-box input:focus,
.invoice-form input:focus{
  outline:none; border-color:var(--red); box-shadow:0 0 0 3px rgba(232,52,42,.15);
}
.modal-box label{
  display:block; font-family:var(--font-mono); font-size:.74rem;
  color:var(--grey-dim); margin-bottom:7px;
}

/* Карточка — div, а внутри отдельные ссылки: вложенные <a> браузер разрывает,
   из-за чего обложка отрывалась от текста. */
a.market-cover{ display:grid; }
a.market-title, a.market-excerpt{ display:-webkit-box; color:inherit; }
a.market-title:hover{ color:var(--red-hi); }
a.seller-avatar{ display:grid; }

.chat-rules{ font-size:.75rem; color:var(--grey-dim); padding:0 16px 6px; line-height:1.5; }

/* аватар в чате кликабельный — ведёт в профиль собеседника */
.chat-avatar-sm a{ display:block; width:100%; height:100%; }
.chat-head b a{ color:inherit; }
.chat-head b a:hover{ color:var(--red-hi); }

/* ================= МОБИЛЬНАЯ АДАПТАЦИЯ ================= */
@media (max-width: 720px){
  .market-main{ padding:96px 0 30px; }
  .market-wrap{ padding:0 16px; }
  .market-head{ flex-direction:column; align-items:stretch; }
  .market-head-actions{ width:100%; }
  .market-head-actions .btn{ flex:1; justify-content:center; }
  .market-grid{ grid-template-columns:1fr; }
  .market-filters{ overflow-x:auto; flex-wrap:nowrap; padding-bottom:4px; }
  .chip{ flex-shrink:0; }

  .listing-layout, .deal-layout{ grid-template-columns:1fr; }
  .listing-right, .deal-side, .compose-right{ position:static; }
  .listing-title{ font-size:1.25rem; }
  .order-card{ padding:20px 18px; }
  .order-btn{ padding:.8rem 1.2rem; }

  .compose-layout{ grid-template-columns:1fr; }
  .compose-section{ padding:20px 16px; }
  .field-row{ grid-template-columns:1fr; }
  .boost-row{ grid-template-columns:1fr; }

  .chat-card.big .chat-body{ min-height:280px; max-height:340px; }
  .chat-bubble{ max-width:88%; }
  .chat-head-actions{ width:100%; margin-left:0; }
  .chat-head-actions .btn{ flex:1; justify-content:center; }
  .chat-input{ flex-wrap:wrap; }
  .chat-input input[type=text]{ order:-1; width:100%; flex:none; }

  .sell-choice{ grid-template-columns:1fr; }
  .order-row{ flex-direction:column; align-items:flex-start; }
  .order-right{ width:100%; justify-content:space-between; }
  .pub-layout{ grid-template-columns:1fr; }
  .pub-side{ position:static; }
  .srv-shots{ grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 480px){
  .modal-box{ padding:22px 18px; }
  .modal-actions{ flex-direction:column-reverse; }
  .modal-actions .btn, .modal-actions a{ width:100%; justify-content:center; }
  .deal-amount{ font-size:1.2rem; }
  .order-price{ font-size:1.4rem; }
}
