/* YuMarket — unslop redesign: quiet chrome, one accent, ink ramp */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #F5F7FA;
    --card: #FFFFFF;
    --raised: #EEF1F5;
    --border: #E3E6EB;
    --border-strong: #C9CFD8;
    --text: #14181F;
    --text2: #4B5563;
    --muted: #6B7280;
    --accent: #1453FF;
    --accent-hover: #0F43D6;
    --accent-soft: rgba(20, 83, 255, .08);
    --pos: #16A34A;
    --pos-soft: rgba(22, 163, 74, .1);
    --neg: #DC2626;
    --neg-soft: rgba(220, 38, 38, .08);
    --warn: #B45309;
    --warn-soft: rgba(180, 83, 9, .1);
    --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --shadow: 0 1px 2px rgba(17, 24, 39, .05);
    --shadow-float: 0 8px 24px rgba(17, 24, 39, .08);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

.ic {
    display: inline-block;
    vertical-align: -3px;
    flex-shrink: 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

h1 {
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.01em;
}

h2 {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -.01em;
}

h3 {
    font-size: 14px;
    font-weight: 500;
}

.muted {
    color: var(--muted);
}

/* ---------- кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--raised);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease);
}

.btn:hover {
    background: #E3E7EE;
}

.btn:active {
    transform: scale(.99);
}

.btn:disabled {
    opacity: .5;
    cursor: default;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--card);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-strong);
    background: var(--raised);
}

.btn-success {
    background: var(--pos-soft);
    color: var(--pos);
}

.btn-success:hover {
    background: rgba(22, 163, 74, .16);
}

.btn-warn {
    background: var(--warn-soft);
    color: var(--warn);
}

.btn-warn:hover {
    background: rgba(180, 83, 9, .16);
}

.btn-danger-outline {
    background: var(--card);
    border-color: var(--neg-soft);
    color: var(--neg);
}

.btn-danger-outline:hover {
    background: var(--neg-soft);
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 20px;
    width: 100%;
}

/* ---------- шапка ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 60px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--text);
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.5px;
}

.game-search {
    width: 200px;
    flex-shrink: 0;
}

.game-search input,
.header-search input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s var(--ease), background-color .15s var(--ease);
}

.game-search input:focus,
.header-search input:focus {
    border-color: var(--accent);
}

.header-search {
    flex: 1;
    max-width: 420px;
}

.header-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
    transition: border-color .15s var(--ease), color .15s var(--ease);
}

.balance-chip:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.user-chip {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
    transition: border-color .15s var(--ease), color .15s var(--ease);
}

.user-chip:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    transition: color .15s var(--ease), border-color .15s var(--ease);
}

.icon-btn:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

/* ---------- hero ---------- */
.hero {
    padding: 56px 0 48px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
}

.hero h1 {
    max-width: 640px;
    margin-bottom: 8px;
}

.hero p {
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 24px;
}

.search-bar {
    display: flex;
    gap: 8px;
    max-width: 560px;
}

.search-bar input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    outline: none;
    transition: border-color .15s var(--ease);
}

.search-bar input:focus {
    border-color: var(--accent);
}

/* ---------- чипы категорий ---------- */
.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease);
}

.chip:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.chip.active {
    background: var(--accent-soft);
    border-color: transparent;
    color: var(--accent);
}

/* ---------- сетка лотов ---------- */
.lots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding-bottom: 48px;
}

.lot-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.lot-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-float);
}

.lot-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.lot-game {
    font-size: 12px;
    color: var(--muted);
}

.lot-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.lot-bottom {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}

.lot-price {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.lot-seller {
    font-size: 12px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- медиа-заглушки ---------- */
.lot-media {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 140px;
    background: var(--raised);
    border-bottom: 1px solid var(--border);
}

.lot-media.is-ph .ph-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text2);
    transition: color .15s var(--ease), border-color .15s var(--ease);
}

.lot-card:hover .lot-media.is-ph .ph-ic {
    color: var(--accent);
    border-color: var(--accent);
}

.lot-media.is-ph .ph-text {
    font-size: 12px;
    color: var(--muted);
    padding: 0 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.img-over {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- карточки ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.card-inner {
    background: var(--raised);
    border-radius: 10px;
    padding: 12px 16px;
}

.loading {
    padding: 32px;
    text-align: center;
    color: var(--muted);
    grid-column: 1 / -1;
}

.empty {
    padding: 32px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--card);
    grid-column: 1 / -1;
}

.empty.small {
    border: none;
    background: none;
    padding: 16px;
}

.empty a {
    color: var(--accent);
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    margin: 20px 0 16px;
    transition: color .15s var(--ease);
}

.back:hover {
    color: var(--text);
}

/* ---------- страница лота ---------- */
.lot-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    padding-bottom: 48px;
    align-items: start;
}

.lot-main {
    padding: 0;
    overflow: hidden;
}

.lot-media-lg .lot-media {
    height: 300px;
    border-bottom: 1px solid var(--border);
}

.lot-media-lg .lot-media.is-ph .ph-ic {
    width: 72px;
    height: 72px;
    border-radius: 16px;
}

.lot-main-body {
    padding: 24px;
}

.lot-main-body h1 {
    margin: 4px 0 8px;
}

.lot-meta {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.lot-desc {
    color: var(--text2);
    line-height: 1.65;
    white-space: pre-line;
    margin-bottom: 16px;
}

.safety {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--accent-soft);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
}

.safety b {
    color: var(--accent);
    font-weight: 500;
}

.safety span {
    color: var(--text2);
    line-height: 1.55;
}

.lot-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 84px;
}

.buy-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.buy-price {
    font-family: var(--mono);
    font-size: 26px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.buy-note {
    color: var(--muted);
    font-size: 13px;
}

.buy-note b {
    color: var(--text);
    font-weight: 500;
}

.stock-warn {
    text-align: center;
    color: var(--neg);
    background: var(--neg-soft);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
}

.seller-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--raised);
    color: var(--text2);
    font-weight: 500;
    font-size: 15px;
    flex-shrink: 0;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 22px;
}

.seller-name {
    font-weight: 500;
    transition: color .15s var(--ease);
}

.seller-name:hover {
    color: var(--accent);
}

.seller-sub {
    font-size: 12px;
    color: var(--muted);
}

/* ---------- авторизация ---------- */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 48px 0 64px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-card h1 {
    margin-bottom: 4px;
}

.auth-alt {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.auth-alt a {
    color: var(--accent);
}

.auth-hint {
    background: var(--raised);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

.role-pick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.role-opt input {
    position: absolute;
    opacity: 0;
}

.role-opt span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 14px;
    font-weight: 500;
    color: var(--text2);
    cursor: pointer;
    transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease);
}

.role-opt input:checked+span {
    background: var(--accent-soft);
    border-color: transparent;
    color: var(--accent);
}

/* ---------- формы ---------- */
label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
}

input,
select,
textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s var(--ease);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
}

textarea {
    resize: vertical;
}

.form-wrap {
    max-width: 640px;
    padding: 40px 24px 64px;
    margin: 0 auto;
}

.form-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ---------- капча ---------- */
.captcha-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.captcha-img {
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
}

.captcha-row input {
    flex: 1;
    min-width: 0;
}

/* ---------- кабинет ---------- */
.cabinet {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    padding: 24px 24px 48px;
    align-items: start;
}

.cabinet-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    position: sticky;
    top: 84px;
}

.cabinet-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.cabinet-nick {
    font-weight: 500;
    font-size: 14px;
}

.cabinet-role {
    font-size: 12px;
    color: var(--muted);
}

.cnav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text2);
    transition: color .15s var(--ease), background-color .15s var(--ease);
}

.cnav-item:hover {
    background: var(--raised);
    color: var(--text);
}

.cnav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.cnav-item.accent {
    color: var(--accent);
}

.cnav-item.logout {
    color: var(--neg);
    margin-top: 4px;
}

.cab-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.mylots {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mylot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
}

.mylot.dim {
    opacity: .55;
}

.mylot-media {
    flex-shrink: 0;
}

.mylot-media .lot-media {
    width: 96px;
    height: 72px;
    border-radius: 10px;
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.mylot-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.mylot-title {
    font-weight: 500;
    transition: color .15s var(--ease);
}

.mylot-title:hover {
    color: var(--accent);
}

.mylot-sub {
    font-size: 12px;
    color: var(--muted);
}

.mylot-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ---------- заказы ---------- */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    transition: border-color .15s var(--ease);
}

.order-row:hover {
    border-color: var(--border-strong);
}

.order-lot-mini .lot-media {
    width: 72px;
    height: 56px;
    border-radius: 10px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.order-row-info {
    flex: 1;
    min-width: 0;
}

.order-row-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-row-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.order-row-price {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.row-act {
    position: absolute;
    right: 16px;
    bottom: 12px;
}

/* ---------- статусы сделок (сигнатура: точка статуса) ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text2);
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.st-paid {
    color: var(--accent);
}

.st-delivered {
    color: var(--accent);
}

.st-done {
    color: var(--pos);
}

.st-dispute {
    color: var(--warn);
}

.st-cancel {
    color: var(--neg);
}

/* ---------- баланс ---------- */
.balance-card {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.balance-big {
    font-family: var(--mono);
    font-size: 32px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.balance-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.balance-note b {
    color: var(--text);
    font-weight: 500;
}

.topup-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.topup-form {
    display: flex;
    gap: 8px;
}

.topup-form input {
    flex: 1;
}

.topup-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    resize: vertical;
}

/* ---------- страница заказа ---------- */
.order-head {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.order-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.order-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.timeline {
    display: flex;
}

.tl-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.tl-step::before {
    content: '';
    position: absolute;
    top: 14px;
    left: calc(-50% + 20px);
    right: calc(50% + 20px);
    height: 1px;
    background: var(--border-strong);
}

.tl-step:first-child::before {
    display: none;
}

.tl-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--raised);
    border: 1px solid var(--border-strong);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    z-index: 1;
}

.tl-step.done .tl-dot {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.tl-step.current .tl-dot {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.tl-label {
    font-size: 12px;
    color: var(--muted);
}

.tl-step.done .tl-label,
.tl-step.current .tl-label {
    color: var(--text2);
}

.timeline.terminal .tl-step {
    flex: none;
}

.timeline.terminal .tl-dot {
    background: var(--neg-soft);
    border-color: transparent;
    color: var(--neg);
}

.delivery-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--raised);
    border-radius: 10px;
    padding: 16px;
}

.delivery-info p {
    color: var(--text2);
    margin-top: 4px;
    word-break: break-word;
}

.order-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    padding-bottom: 48px;
    align-items: start;
}

.order-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.order-lot {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ---------- чат ---------- */
.chat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.msg {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 78%;
}

.msg.mine {
    align-self: flex-end;
}

.msg.sys {
    align-self: center;
}

.msg-author {
    font-size: 11px;
    color: var(--muted);
    padding: 0 4px;
}

.msg-bubble {
    background: var(--raised);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text);
    word-break: break-word;
}

.msg.mine .msg-bubble {
    background: var(--accent-soft);
    color: var(--text);
}

.msg.sys .msg-bubble {
    background: none;
    color: var(--muted);
    font-size: 12px;
    padding: 4px;
}

.msg-time {
    font-size: 11px;
    color: var(--muted);
    padding: 0 4px;
}

.chat-form {
    display: flex;
    gap: 8px;
}

.chat-form input {
    flex: 1;
}

/* ---------- профиль продавца ---------- */
.profile-head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-head h1 {
    margin-bottom: 2px;
}

.section-title {
    margin-bottom: 16px;
}

/* ---------- футер ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--card);
    padding: 40px 0 32px;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.footer-brand p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    margin-top: 12px;
    max-width: 320px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--muted);
    font-size: 13px;
    transition: color .15s var(--ease);
}

.footer-col a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 32px;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 12px;
    flex-wrap: wrap;
}

/* ---------- хлебные крошки ---------- */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 0 16px;
    font-size: 13px;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--muted);
    transition: color .15s var(--ease);
}

.breadcrumbs a:hover {
    color: var(--text);
}

.crumb-sep {
    color: var(--border-strong);
}

.crumb-current {
    color: var(--text2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- разделы игр ---------- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 48px;
}

.game-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.game-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-float);
}

.game-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--raised);
    border: 1px solid var(--border);
    color: var(--text);
    transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}

.game-card:hover .game-ic {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.game-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.game-count {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
}

.game-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 20px 0 24px;
}

.game-hero-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    flex-shrink: 0;
}

.game-hero h1 {
    margin-bottom: 2px;
}

.game-hero-sub {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
}

/* ---------- SEO-текст ---------- */
.seo-text {
    padding-bottom: 48px;
}

.seo-text h2 {
    margin-bottom: 12px;
}

.seo-text p {
    color: var(--muted);
    max-width: 720px;
    line-height: 1.65;
    margin-bottom: 12px;
}

/* ---------- тосты ---------- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 340px;
}

.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text);
    box-shadow: var(--shadow-float);
    animation: slideIn .25s var(--ease);
}

.toast.success {
    border-left-color: var(--pos);
}

.toast.error {
    border-left-color: var(--neg);
}

.toast.hide {
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
}

/* ---------- отслеживание цены, уведомления ---------- */
.tr-list {
    display: flex;
    flex-direction: column;
}

.tr-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.tr-row:first-child {
    border-top: none;
}

.tr-main {
    flex: 1;
    min-width: 0;
}

.tr-lot {
    font-weight: 500;
    transition: color .15s var(--ease);
}

.tr-lot:hover {
    color: var(--accent);
}

.tr-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.tr-sub a {
    color: var(--accent);
}

.tr-drop {
    color: var(--pos);
    font-weight: 500;
}

.tr-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.tr-row.unread {
    background: var(--accent-soft);
    border-radius: 8px;
    padding: 10px 12px;
}

.track-count {
    font-size: 13px;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---------- «Товар дня» ---------- */
.deal-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--warn-soft);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

.deal-badge {
    color: var(--warn);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.deal-badge a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.deal-timer {
    font-family: var(--mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--warn);
}

.deal-note {
    font-size: 13px;
    color: var(--text2);
}

.deal-note b {
    color: var(--warn);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.deal-note s {
    color: var(--muted);
}

.deal-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.deal-lots {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deal-lot-opt {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    font-weight: normal;
    color: var(--text2);
}

.deal-lot-opt input {
    width: auto;
    margin-top: 2px;
}

.lot-price-old {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
}

/* ---------- статистика админа ---------- */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    padding: 16px;
}

.stat-num {
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* ---------- списки операций и выводов ---------- */
.wd-list,
.ledger-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wd-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
}

.wd-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ledger-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    font-size: 13px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.ledger-list .ledger-row:first-child {
    border-top: none;
    padding-top: 0;
}

.ledger-dir {
    font-family: var(--mono);
    font-weight: 500;
    min-width: 96px;
    font-variant-numeric: tabular-nums;
}

.ledger-dir.in {
    color: var(--pos);
}

.ledger-dir.out {
    color: var(--neg);
}

.ledger-type {
    flex: 1;
    min-width: 160px;
    color: var(--text2);
}

.ledger-bal,
.ledger-date {
    font-family: var(--mono);
    color: var(--muted);
    font-size: 12px;
}

.ledger-date {
    margin-left: auto;
}

/* ---------- адаптив: ноутбук / планшет / телефон ---------- */
@media (max-width: 1280px) {
    .container {
        max-width: 1080px;
    }

    .lots-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 1024px) {
    .header-search {
        display: none;
    }

    .game-search {
        width: 160px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .lot-layout,
    .order-layout {
        grid-template-columns: 1fr;
    }

    .lot-side {
        position: static;
    }

    .cabinet {
        grid-template-columns: 1fr;
        padding: 16px 24px 48px;
    }

    .cabinet-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cabinet-user {
        border-bottom: none;
        width: 100%;
        padding: 4px 12px 12px;
    }

    .mylot {
        flex-wrap: wrap;
    }

    .profile-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .lots-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 720px) {
    .container {
        padding: 0 16px;
    }

    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
        row-gap: 8px;
    }

    .game-search {
        display: none;
    }

    .header-search {
        display: block;
        order: 5;
        flex-basis: 100%;
        max-width: none;
    }

    .header-nav {
        gap: 8px;
    }

    .balance-chip,
    .user-chip {
        padding: 6px 10px;
        font-size: 12px;
    }

    .hero {
        padding: 32px 0 28px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .chip {
        flex-shrink: 0;
    }

    .search-bar {
        flex-direction: column;
    }

    .lots-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .lot-media {
        height: 110px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .order-actions {
        flex-direction: column;
    }

    .order-actions .btn {
        width: 100%;
    }

    .topup-form,
    .chat-form {
        flex-direction: column;
    }

    .order-row {
        flex-wrap: wrap;
    }

    .order-row-price {
        font-size: 14px;
    }

    .row-act {
        position: static;
        margin-left: auto;
    }

    .mylot-media .lot-media {
        width: 72px;
        height: 56px;
    }

    .mylot-actions {
        width: 100%;
    }

    .mylot-actions .btn {
        flex: 1;
    }

    .tl-label {
        font-size: 10px;
    }

    .msg {
        max-width: 94%;
    }

    .chat {
        max-height: 280px;
    }

    .cabinet {
        padding: 12px 16px 32px;
    }

    .balance-big {
        font-size: 26px;
    }

    .buy-price {
        font-size: 22px;
    }

    .legal-card {
        padding: 20px;
    }

    #toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .tr-row {
        flex-direction: column;
        align-items: stretch;
    }

    .tr-actions {
        justify-content: flex-start;
    }

    .verify-banner {
        flex-wrap: wrap;
    }

    .order-row-price {
        font-size: 14px;
    }
}

@media (max-width: 420px) {
    .lots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .lot-media {
        height: 96px;
    }

    .lot-body {
        padding: 10px 12px 12px;
    }

    .lot-price {
        font-size: 13px;
    }

    .lot-seller {
        font-size: 11px;
    }

    .games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .header-nav {
        gap: 6px;
    }
}

/* ---------- Верификация e-mail: баннер в кабинете ---------- */
.verify-banner {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    font-size: 14px;
}

/* ---------- Согласие с документами при регистрации ---------- */
.auth-card label.consent {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.5;
}

.auth-card label.consent input {
    width: auto;
    margin-top: 2px;
}

/* ---------- Юридические страницы ---------- */
.legal-wrap {
    max-width: 820px;
    margin: 24px auto 48px;
}

.legal-card {
    padding: 28px 32px;
    line-height: 1.65;
}

.legal-card h1 {
    margin-bottom: 4px;
}

.legal-card h2 {
    margin-top: 24px;
    font-size: 17px;
}

.legal-card p {
    margin: 8px 0;
    color: var(--muted);
    font-size: 14px;
}

.legal-updated {
    font-size: 12px;
    opacity: 0.75;
}

/* ---------- онлайн-статус, автовыдача, отзывы, санкции ---------- */
.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 5px;
    vertical-align: middle;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.lot-card {
    position: relative;
}

.lot-flag {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #1453FF;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    box-shadow: var(--shadow-float);
}

.lot-seller .online-dot {
    margin-right: 4px;
}

.auto-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0;
    padding: 9px 12px;
    border-radius: var(--radius);
    background: rgba(20, 83, 255, 0.08);
    border: 1px solid rgba(20, 83, 255, 0.25);
    font-size: 13px;
}

.review-card {
    margin-bottom: 12px;
}

.review-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.review-stars {
    color: #f59e0b;
    font-size: 15px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.review-deal {
    font-weight: 700;
    font-size: 13px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--bg, #f1f3f7);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.review-text {
    margin: 8px 0 4px;
    color: var(--muted);
    font-size: 14px;
}

.review-author {
    font-size: 12px;
}

.review-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.review-form .star-row {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.star-opt {
    cursor: pointer;
}

.star-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.star-opt span {
    display: inline-block;
    font-size: 26px;
    color: #d3d8e2;
    transition: color .12s var(--ease);
}

/* выбранная оценка и все звёзды до неё (метки идут 1→5) */
.star-opt:hover span,
.star-row:has(input[value="1"]:checked) .star-opt:nth-child(1) span,
.star-row:has(input[value="2"]:checked) .star-opt:nth-child(-n+2) span,
.star-row:has(input[value="3"]:checked) .star-opt:nth-child(-n+3) span,
.star-row:has(input[value="4"]:checked) .star-opt:nth-child(-n+4) span,
.star-row:has(input[value="5"]:checked) .star-opt:nth-child(-n+5) span {
    color: #f59e0b;
}

.recovery-card .balance-note {
    margin-bottom: 10px;
}

/* ---------- капча ALTCHA (Proof-of-Work) ---------- */
altcha-widget {
    --altcha-color-base: var(--card, #fff);
    --altcha-color-border: var(--border, #e3e7ee);
    --altcha-color-text: var(--text, #1c2333);
    --altcha-color-link: #1453FF;
    --altcha-radius: var(--radius, 10px);
    display: block;
    margin: 4px 0 10px;
    font-size: 13px;
}

.totp-secret {
    font-family: monospace;
    font-size: 15px;
    letter-spacing: 2px;
    padding: 8px 10px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    margin: 8px 0;
    user-select: all;
}

.totp-uri {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 13px;
}