:root {
    --bg: #ffffff;
    --card: #ffffff;
    --text: #0f1419;
    --muted: #536471;
    --line: #e6ecf0;
    --accent: #1d9bf0;
    --like: #f91880;
  }
  * { box-sizing: border-box; }
  button, input, textarea, select { font-family: inherit; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  header {
    position: sticky; top: 0; z-index: 5;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }
  header .wrap {
    min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  }
  .gate .row { display: flex; gap: 8px; margin-top: 8px; }
  .gate .row button { flex: 1; }
  header h1 { font-size: 16px; margin: 0; }
  header h1.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .brand-logo { width: 28px; height: 28px; flex-shrink: 0; display: block; }
  header h1 .brand-name, header h1 .brand-sub { color: inherit; font-size: inherit; }
  /* Шапка администратора: компактные иконки в один ряд */
  body.is-admin header h1 { white-space: nowrap; }
  body.is-admin .head-actions { gap: 4px; flex-shrink: 0; }
  body.is-admin .head-actions .cart-btn { width: 30px; height: 30px; }
  body.is-admin .head-actions .cart-btn svg { width: 16px; height: 16px; }
  body.is-admin .head-actions .badge { min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; top: -5px; right: -5px; }
  @media (max-width: 560px) {
    body.is-admin header h1 .brand-sub { display: none; }
  }
  header span { color: var(--muted); font-size: 14px; }
  .composer, .post {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-top: 16px;
    padding: 16px;
  }
  /* Посты без фона/рамки — прямо на белом фоне страницы, между постами тонкий разделитель */
  .post {
    background: transparent;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    margin-top: 0;
    padding: 16px 0;
  }
  /* Текст поста — сразу под именем */
  /* Текст поста — под именем, в колонке справа от аватара */
  .post .body .text { margin: 2px 0 0; }
  .post .post-top { align-items: flex-start; margin-bottom: 12px; }
  .post .body:empty { display: none; }
  /* Аватар в посте — квадрат со скруглёнными углами */
  .post-top .ava { border-radius: 12px; }
  /* Хэштеги */
  .text a.tag { color: var(--accent); text-decoration: none; }
  .text a.tag:hover { text-decoration: underline; }
  .tag-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .tag-bar b { color: var(--accent); }
  .tag-bar button { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; height: 32px; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; flex: none; }
  textarea {
    width: 100%; min-height: 84px; resize: vertical;
    border: 0; outline: none; font: inherit; font-size: 18px; background: transparent;
  }
  textarea::placeholder { color: #8b98a5; }
  .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .photo-btn {
    border: 0; background: #e8f5fd; color: var(--accent);
    border-radius: 999px; height: 34px; padding: 0 12px; cursor: pointer; font-weight: 700;
  }
  .preview { margin: 8px 0 12px; display: none; }
  .preview.on { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tile { position: relative; background: none; border-radius: 14px; overflow: hidden; }
  .tile img, .photo {
    width: 100%; height: auto; border-radius: 14px; display: block; background: none;
  }
  .post .tile video, .post .clip, .preview video {
    background: #111; background-color: #111;
    object-fit: cover; display: block;
  }
  .preview .tile:has(video) { width: auto; }
  .preview video { width: 100%; height: 140px; max-width: none; object-fit: cover; }
  .post .clip, .post .photo, .post .tile img {
    width: 100%; height: 180px; max-width: none; object-fit: cover; border-radius: 14px;
  }
  .gallery {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px;
  }
  .gallery .tile { min-width: 0; width: auto; }
  .gallery.one { grid-template-columns: 1fr; }
  .gallery.one .clip, .gallery.one .photo, .gallery.one .tile img { height: 280px; }
  .offer {
    margin-top: 8px; display: flex; flex-direction: column; align-items: stretch; gap: 6px;
    width: 100%; position: relative; z-index: 1;
  }
  .offer b, .offer .price { line-height: 1.25; }
  .offer .sizes { margin: 0; }
  .offer .buy, .shop-row .buy, .actions .buy {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; height: 34px; padding: 0 12px; line-height: 1;
    white-space: nowrap; background: #0f1419; color: #fff; font-weight: 700;
    position: static; border-radius: 999px;
  }
  .shop-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 0 12px; }
  .shop-row .buy { width: auto; min-width: 132px; padding: 0 16px; }
  .offer input, .draft-data input { width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font: inherit; font-size: 13px; }
  .draft-data { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; width: 100%; }
  .draft-data input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; font: inherit; font-size: 14px; background: #fff; }
  .preview .tile { overflow: visible; }
  .offer .buy { height: 34px; font-size: 13px; }
  .hint { color: #f4212e; font-size: 13px; min-height: 18px; margin: 0 0 4px; }
  .tile > .fav, .preview .x, .fav-grid .fav {
    position: absolute; top: 8px; right: 8px;
    width: 32px; height: 32px; border: 0; border-radius: 50%;
    background: rgba(15,20,25,.7); color: #fff; cursor: pointer; font-size: 16px;
  }
  .tile > .fav, .fav-grid .fav { left: 8px; right: auto; }
  .count { color: var(--muted); font-size: 13px; }
  button.send {
    background: var(--accent); color: #fff; border: 0; border-radius: 999px;
    height: 36px; padding: 0 16px; font-weight: 700; cursor: pointer; opacity: .45;
  }
  button.send.on { opacity: 1; }
  .post-top { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
  .post-top .who { flex: 1; min-width: 0; }
  .edit-btn, .del-btn {
    border: 0; background: #f7f9f9; color: var(--muted); width: 34px; height: 34px;
    border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none;
  }
  .actions button.share { background: #e8f5fd; color: var(--accent); }
  .edit-box textarea {
    width: 100%; min-height: 84px; border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; font: inherit; font-size: 16px; resize: vertical;
  }
  .edit-box { margin-bottom: 16px; }
  .edit-box .bar { margin-top: 8px; }
  .edit-box input, #descSheet input {
    width: 100%; height: 40px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px;
    padding: 0 12px; font: inherit; font-size: 15px; background: #fff;
  }
  .field-label { display: block; margin: 10px 0 0; font-size: 13px; font-weight: 800; color: var(--muted); }
  .edit-offer { margin-top: 4px; }
  .desc-meta { margin: 0 0 8px; font-weight: 800; }
  .ava {
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; color: #fff; font-weight: 700; flex: none;
  }
  .name { font-weight: 700; }
  /* Имя и сразу за ним логин, в одну строку */
  .post-top .name-row { display: flex; align-items: baseline; justify-content: flex-start; gap: 6px; min-width: 0; }
  .post-top .name-row .name { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .post-top .name-row .handle { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 16px; line-height: 20px; }
  .post-top .name-row .time { flex: none; white-space: nowrap; color: var(--muted); font-size: 16px; line-height: 20px; }
  /* Имя, логин и дата — одного размера, на одной линии */
  .post-top .name-row { align-items: baseline; font-size: 16px; line-height: 20px; }
  .post-top .name-row > * { font-size: 16px; line-height: 20px; }
  .meta { color: var(--muted); font-size: 14px; }
  .text { margin: 10px 0 12px; white-space: pre-wrap; line-height: 1.4; font-size: 16px; }
  .actions { display: flex; gap: 8px; align-items: center; }
  .actions button {
    border: 0; background: #f7f9f9; color: var(--muted);
    border-radius: 999px; height: 34px; padding: 0 12px; cursor: pointer; font-weight: 600;
  }
  .actions .del-btn {
    width: 34px; height: 34px; padding: 0; margin-left: auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: #ffe8ea; color: #f4212e;
  }
  .actions .del-btn svg { display: block; }
  .actions button.on { background: #ffe8f2; color: var(--like); }
  .actions button.comment { display: inline-flex; align-items: center; gap: 6px; }
  .actions button.comment svg { display: block; }
  .empty { text-align: center; color: var(--muted); padding: 40px 0; }
  .login-btn {
    border: 1px solid var(--line); background: #fff; border-radius: 999px;
    height: 34px; padding: 0 12px; cursor: pointer; font-weight: 700;
  }
  .gate { display: none; margin-top: 16px; }
  .gate.on { display: block; }
  .composer { display: none; }
  .composer.on { display: block; }
  footer { color: var(--muted); font-size: 13px; padding: 20px 0 32px; }
  /* Иконки платёжных систем внизу сайта */
  .pay-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .pay-label { margin-right: 4px; color: var(--text); font-weight: 600; }
  .pay-card {
    display: inline-flex; align-items: center; justify-content: center;
    height: 38px; min-width: 64px; padding: 0 12px;
    background: #fff; border: 1px solid #c9d3db; border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15,20,25,.12);
  }
  .pay-card img { display: block; height: 24px; width: auto; }
  @media (max-width: 420px) { .pay-label { flex-basis: 100%; } }
  .pay-card.no-img::before { content: attr(data-name); color: #0f1419; font-weight: 800; font-size: 14px; letter-spacing: .2px; }

  .actions button.share { background: #e8f5fd; color: var(--accent); }
  .comments { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
  .comment { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .comment:last-of-type { border-bottom: 0; }
  .c-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
  .c-name { font-weight: 700; font-size: 14px; }
  /* Имя и @логин в комментарии — в одну строку */
  .c-who { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
  .c-who .c-name { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .c-login { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 14px; }
  .c-top .c-meta { flex: none; }
  /* Дата сразу после логина: «Анна @anna · 1 ч» */
  .comment .c-top { justify-content: flex-start; gap: 6px; }
  .comment .c-top .c-meta { font-size: 14px; white-space: nowrap; }
  .comment .c-top .c-meta::before { content: "· "; }
  .c-text { font-size: 15px; line-height: 1.35; white-space: pre-wrap; margin: 2px 0; }
  .c-meta { color: var(--muted); font-size: 12px; }
  .c-del { border: 0; background: transparent; color: #f4212e; cursor: pointer; font-size: 12px; font-weight: 700; }
  .c-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
  .c-form input, .c-form textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
    font: inherit; background: #fff; outline: none;
  }
  .c-form textarea { min-height: 64px; resize: vertical; }
  .c-reply { border: 0; background: transparent; color: var(--accent); cursor: pointer; font-weight: 700; font-size: 13px; padding: 0; }
  /* Лайк под текстом комментария */
  .c-acts { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
  .c-like { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 0; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 24px; }
  .c-like:hover { color: var(--like); }
  /* «Ответить» — иконкой */
  .c-reply { display: inline-flex; align-items: center; color: var(--muted); min-height: 24px; padding: 2px 0; }
  .c-reply:hover { color: var(--accent); }
  /* Окно ответа на комментарий */
  #replySheet .sheet-box { border-radius: 18px; width: min(480px, calc(100% - 32px)); padding-bottom: 16px; }
  #replySheet .reply-quote { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
  #replySheet .reply-quote .c-top { justify-content: flex-start; gap: 6px; }
  #replySheet .reply-quote .c-meta { font-size: 14px; white-space: nowrap; }
  #replySheet .reply-quote .c-meta:not(:empty)::before { content: "· "; }
  #replySheet .reply-to { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
  #replySheet .reply-to b { color: var(--accent); font-weight: 600; }
  #replySheet textarea { min-height: 96px; font-size: 16px; }
  #replySheet .send { align-self: flex-end; }
  .c-reply svg { display: block; }
  .c-like svg { display: block; }
  .c-like.on { color: var(--like); --heart-fill: currentColor; }
  .replies { margin: 6px 0 2px 14px; padding-left: 10px; border-left: 2px solid var(--line); }
  .replies .comment { border-bottom: 0; padding: 6px 0; }
  .share-sheet {
    position: fixed; inset: 0; background: rgba(15,20,25,.45); z-index: 20;
    display: flex; align-items: flex-end; justify-content: center;
  }
  .share-box {
    background: #fff; width: min(680px, 100%); border-radius: 18px 18px 0 0; padding: 16px 16px 24px;
  }
  .share-box h2 { margin: 0 0 8px; font-size: 16px; }
  .share-box a, .share-box button.linkish {
    display: block; width: 100%; margin-top: 8px; text-align: center; text-decoration: none;
    border: 1px solid var(--line); background: #fff; color: var(--text);
    border-radius: 999px; height: 40px; line-height: 40px; font-weight: 700; cursor: pointer;
  }
  .toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
    background: #0f1419; color: #fff; border-radius: 999px; padding: 10px 14px; font-size: 14px; z-index: 30;
  }
  .frame { position: relative; }
  .on-photo {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 6px;
    padding: 28px 8px 8px;
    background: linear-gradient(to top, rgba(15,20,25,.55), rgba(15,20,25,0));
    pointer-events: none;
  }
  .on-photo .sizes { margin: 0; flex: 1; min-width: 0; pointer-events: auto; }
  .on-photo .sizes button {
    height: 26px; min-width: 26px; padding: 0 8px; font-size: 12px;
    background: rgba(255,255,255,.94); border-color: transparent;
    box-shadow: 0 1px 4px rgba(15,20,25,.28);
  }
  .on-photo .sizes button.on { background: #0f1419; color: #fff; border-color: #0f1419; }
  .on-photo-end { pointer-events: auto; flex: none; }
  .buy.cart-ico, .shop-row .buy.cart-ico, .on-photo .buy {
    width: 34px; min-width: 34px; height: 34px; padding: 0; border-radius: 50%;
    background: #fff; color: #0f1419;
    box-shadow: 0 1px 6px rgba(15,20,25,.28);
  }
  .buy.cart-ico svg { display: block; }
  .viewer-frame { display: inline-block; max-width: 100%; }
  .viewer-frame .on-photo { border-radius: 0 0 12px 12px; }
  .badge[hidden] { display: none; }
  .tile .play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(15,20,25,.62); color: #fff;
    display: grid; place-items: center; font-size: 16px; pointer-events: none;
  }
  .fav {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    width: 32px; height: 32px; border: 0; border-radius: 50%;
    background: rgba(15,20,25,.7); color: #fff; cursor: pointer; font-size: 16px;
  }
  .fav.on { background: #fff; color: #f5a623; }
  .viewer {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(0,0,0,.72);
    display: flex; align-items: center; justify-content: center;
  }
  .viewer[hidden] { display: none; }
  .viewer-stage { max-width: min(100%, 980px); max-height: 100%; padding: 48px 56px; }
  .viewer-stage img, .viewer-stage video {
    display: block; max-width: 100%; max-height: calc(100vh - 96px);
    width: auto; height: auto; object-fit: contain; background: transparent;
  }
  .viewer.compact { background: rgba(15,20,25,.45); align-items: center; }
  .viewer.compact .viewer-stage {
    background: #111; border-radius: 16px; padding: 12px;
    width: min(360px, calc(100% - 32px)); max-height: none;
  }
  .viewer.compact .viewer-stage video {
    width: 100%; max-width: 336px; max-height: 420px; height: auto; object-fit: contain;
  }
  /* Без серого затемнения вокруг окна фото: страница видна как есть, окно выделено тенью */
  .viewer.popup { background: transparent; align-items: flex-start; justify-content: flex-start; }
  .viewer.popup .viewer-stage {
    background: #fff; border-radius: 16px; padding: 12px; overflow: auto;
    width: min(640px, calc(100% - 32px)); max-height: calc(100vh - 32px); margin: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.45);
  }
  .viewer.popup .viewer-nav { display: none; }
  .viewer.popup .viewer-shot .photo-desc { color: #0f1419; }
  .viewer.popup .viewer-shot .clip-ico { background: #0f1419; color: #fff; }
  .viewer.popup .viewer-shot .rate .star { color: rgba(15,20,25,.3); }
  .viewer.popup .viewer-shot .rate .star.on { color: #e0a106; }
  .viewer.popup .viewer-shot { align-items: flex-start; }
  .viewer.popup .viewer-row { display: flex; gap: 16px; align-items: flex-start; width: 100%; }
  .viewer.popup .viewer-row .viewer-frame { flex: none; max-width: 300px; }
  .viewer.popup .viewer-desc { flex: 1; min-width: 0; color: #0f1419; font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; text-align: left; }
  .viewer.popup .viewer-desc.empty { color: #8b98a5; }
  .viewer.popup .viewer-reviews { width: 100%; margin-top: 14px; padding-top: 12px; padding-bottom: 24px; border-top: 1px solid #e6ecf0; color: #0f1419; text-align: left; }
  .viewer.popup .viewer-reviews h3 { margin: 0 0 4px; font-size: 15px; }
  .viewer.popup .viewer-reviews .c-form .rv-bar .send { margin-left: auto; }
  .viewer.popup .viewer-reviews > .comment:last-of-type { border-bottom: 1px solid var(--line); }
  .viewer.popup .rv { padding: 10px 12px; margin-bottom: 8px; border: 1px solid #d5dde3; border-radius: 12px; background: #fff; }
  .viewer.popup .rv-top { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
  .viewer.popup .rv-name { font-weight: 600; }
  .viewer.popup .rv-time { color: #8b98a5; }
  .viewer.popup .rv-del { margin-left: auto; border: 0; background: none; color: #c0392b; font: inherit; font-size: 12px; cursor: pointer; }
  .viewer.popup .rv-text { margin-top: 2px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
  .viewer.popup .rv-empty { color: #8b98a5; font-size: 14px; padding: 4px 0; }
  .viewer.popup .rv-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
  .viewer.popup .rv-form textarea { width: 100%; box-sizing: border-box; border: 1px solid #d5dde3; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; resize: none; background: #fff; color: #0f1419; }
  .viewer.popup .rv-form .send { height: 38px; margin: 0 0 0 auto; }
  .viewer.popup .rv-bar { display: flex; align-items: center; gap: 8px; }
  .viewer.popup .rv-photo { width: 38px; height: 38px; flex: none; border: 1px solid #d5dde3; border-radius: 50%; background: #fff; color: #0f1419; display: grid; place-items: center; cursor: pointer; padding: 0; }
  .viewer.popup .rv-hint { color: #8b98a5; font-size: 12px; }
  .viewer.popup .rv-prev { display: flex; gap: 8px; flex-wrap: wrap; }
  .viewer.popup .rv-prev:empty { display: none; }
  .viewer.popup .rv-thumb { position: relative; display: inline-block; }
  .viewer.popup .rv-thumb img { display: block; width: 40px; height: 40px; object-fit: cover; border-radius: 8px; max-height: none; max-width: none; }
  .viewer.popup .rv-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: #0f1419; color: #fff; font-size: 11px; line-height: 1; cursor: pointer; padding: 0; }
  .viewer.popup .rv-imgs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
  .viewer.popup .rv-imgs img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; max-height: none; max-width: none; margin: 0; }
  @media (max-width: 560px) { .viewer.popup .viewer-row { flex-direction: column; } .viewer.popup .viewer-row .viewer-frame { max-width: 100%; } }
  .viewer.popup .viewer-stage img { max-width: min(300px, 100%); max-height: min(360px, calc(100vh - 150px)); border-radius: 10px; margin: 0; }
  /* Окно узкое, фото на всю его ширину, описание под фото */
  .viewer.popup { justify-content: center; align-items: flex-start; }
  .viewer.popup .viewer-stage { width: 80%; margin: calc(64px + env(safe-area-inset-top, 0px)) 8px 8px; padding: 8px; max-height: calc(100vh - 140px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  /* Низ окна поднят: снизу остаётся ~70px. dvh — видимая высота экрана без панели браузера (iPhone, Android) */
  @supports (height: 100dvh) {
    .viewer.popup .viewer-stage { max-height: calc(100dvh - 140px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  }
  .viewer.popup .viewer-x { top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; width: 42px; height: 42px; z-index: 3; background: rgba(15,20,25,.7); color: #fff; font-size: 18px; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
  .viewer.popup .viewer-row { flex-direction: column; }
  .viewer.popup .viewer-row .viewer-frame, .viewer.popup .viewer-photo-col { display: block; width: 100%; max-width: 100%; }
  .viewer-title { margin-top: 8px; font-size: 16px; font-weight: 700; line-height: 1.3; color: #0f1419; text-align: left; word-break: break-word; }
  .viewer.compact .viewer-title { color: #fff; }
  /* Видео в открытом фото — на всю ширину окна, без чёрных полей по бокам */
  .viewer.popup .viewer-frame video { display: block; width: 100%; max-width: 100%; height: auto; max-height: none; object-fit: cover; background: #000; border-radius: 10px; }
  .viewer.popup .viewer-frame img { width: 100%; max-width: 100%; height: auto; max-height: 45vh; object-fit: cover; object-position: center; }
  .viewer-x, .viewer-nav {
    position: absolute; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.16); color: #fff; cursor: pointer;
  }
  .viewer-x { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 18px; }
  .viewer-nav {
    top: 50%; margin: 0; padding: 0;
    width: 44px; height: 44px;
    transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    line-height: 0; z-index: 2;
  }
  .viewer-nav svg { display: block; width: 22px; height: 22px; }
  .viewer-nav.prev { left: 12px; }
  .viewer-nav.next { right: 12px; }
  .viewer-nav[hidden] { display: none; }
  .viewer-fav {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.16); color: #fff; cursor: pointer; font-size: 18px;
  }
  .viewer-fav.on { background: #fff; color: #f5a623; }
  .tabs { display: flex; gap: 8px; margin-top: 12px; }
  #tabFav { display: none; }
  #favBtn.on { color: #e0a106; background: #fff8e6; border-color: #f3d48a; }
  #favBtn.on svg path { fill: currentColor; }
  .tabs button {
    border: 1px solid var(--line); background: #fff; color: var(--text);
    border-radius: 999px; height: 34px; padding: 0 14px; cursor: pointer; font-weight: 700;
  }
  .tabs button.on { background: #0f1419; color: #fff; border-color: #0f1419; }
  .tabs { align-items: center; }
  .tabs button { flex-shrink: 0; }
  /* Бегущая строка справа от «Лента» */
  .ticker {
    flex: 1; min-width: 0; height: 34px; overflow: hidden;
    display: flex; align-items: center;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: 0 6px;
  }
  .ticker-view {
    flex: 1; min-width: 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  }
  .ticker-track { display: flex; width: max-content; animation: ticker 28s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }
  .ticker-group { display: flex; flex-shrink: 0; }
  .ticker-group span {
    font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; padding: 0 14px;
  }
  .ticker-group span::after { content: "•"; color: var(--accent); margin-left: 28px; }
  .ticker.is-empty { display: none; }
  /* Карандаш у бегущей строки — только администратору */
  .tabs .ticker-edit { display: none; flex-shrink: 0; width: 34px; padding: 0; }
  body.is-admin .tabs .ticker-edit { display: inline-grid; }
  body.is-admin .ticker.is-empty { display: flex; }
  body.is-admin .ticker.is-empty .ticker-view::before { content: "Бегущая строка скрыта — нажмите ✎"; color: var(--muted); font-size: 13px; padding: 0 8px; white-space: nowrap; }
  #tickerSheet .sheet-box { border-radius: 18px; width: min(440px, calc(100% - 32px)); padding-bottom: 16px; }
  .ticker-form { display: flex; flex-direction: column; gap: 8px; }
  .ticker-help { color: var(--muted); font-size: 13px; line-height: 1.4; }
  #tickerText {
    min-height: 140px; font-size: 15px; line-height: 1.5;
    border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff;
  }
  @keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  @media (prefers-reduced-motion: reduce) { .ticker-track { animation-duration: 80s; } }
  #favView { display: none; }
  #favView.on { display: block; }
  #feed.off { display: none; }
  .fav-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 16px; }
  .fav-grid .tile { background: #fff; border: 1px solid var(--line); }
  .fav-grid .tile img, .fav-grid .tile video {
    width: 100%; height: 160px; object-fit: cover; border-radius: 14px;
  }
  .fav-cap { color: var(--muted); font-size: 12px; padding: 6px 8px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .head-actions { display: flex; align-items: center; gap: 8px; }
  .cart-btn {
    position: relative; width: 34px; height: 34px; padding: 0;
    display: inline-grid; place-items: center;
  }
  .cart-btn svg { display: block; }
  .badge {
    position: absolute; top: -4px; right: -4px;
    display: inline-grid; place-items: center; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 999px; background: #0f1419; color: #fff; font-size: 11px;
  }
  .cart-btn .badge { background: var(--accent); margin: 0; }
  .price-row { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
  .price { font-weight: 800; font-size: 16px; margin: 0; }
  .price.muted { color: var(--muted); font-weight: 600; }
  .price-edit {
    border: 0; background: #e8f5fd; color: var(--accent);
    border-radius: 999px; height: 30px; padding: 0 10px; cursor: pointer; font-weight: 700; font-size: 13px;
  }
  .price-form { display: flex; gap: 8px; align-items: center; }
  .sizes { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
  .sizes button {
    border: 1px solid var(--line); background: #fff; border-radius: 999px;
    height: 32px; min-width: 36px; padding: 0 10px; cursor: pointer; font-weight: 700;
  }
  .sizes button.on { background: #0f1419; color: #fff; border-color: #0f1419; }
  .post .sizes { gap: 4px; margin: 0 0 8px; }
  .post .sizes button, .post .size-edit {
    height: 24px; min-width: 24px; padding: 0 7px; font-size: 11px; font-weight: 600;
  }
  .size-edit {
    border: 0; background: #e8f5fd; color: var(--accent);
    border-radius: 999px; height: 32px; padding: 0 10px; cursor: pointer; font-weight: 700; font-size: 13px;
  }
  .size-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
  .size-in {
    flex: 1; min-width: 160px; height: 34px; border: 1px solid var(--line); border-radius: 999px;
    padding: 0 12px; font: inherit;
  }
  .size-box {
    margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: #f7f9f9;
  }
  .size-box[hidden] { display: none; }
  .size-box-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; margin-bottom: 8px; }
  .size-add { display: flex; gap: 8px; margin-top: 10px; }
  .size-add input {
    flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; font: inherit;
  }
  #sizeLabel { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .buy {
    border: 0; background: #0f1419; color: #fff; border-radius: 999px;
    height: 34px; padding: 0 14px; cursor: pointer; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    white-space: nowrap; line-height: 1; position: static;
  }
  .price-in {
    width: 120px; height: 34px; border: 1px solid var(--line); border-radius: 999px;
    padding: 0 12px; font: inherit; font-weight: 700;
  }
  .sheet {
    position: fixed; inset: 0; background: rgba(15,20,25,.45); z-index: 25;
    display: flex; align-items: flex-end; justify-content: center;
  }
  .sheet[hidden] { display: none; }
  .sheet-box {
    background: #fff; width: min(680px, 100%); max-height: min(86vh, 720px);
    border-radius: 18px 18px 0 0; padding: 16px 16px 24px; overflow: auto;
  }
  .sheet-box h2 { margin: 0; font-size: 18px; }
  .sheet-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .cart-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .cart-item img, .cart-item .ph {
    width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: #f4f6f8; flex: none;
  }
  .cart-item .ph { display: grid; place-items: center; color: var(--muted); font-weight: 800; }
  .cart-item .grow { flex: 1; min-width: 0; }
  .cart-item .title {
    font-weight: 700; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
  .qty button {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
    background: #fff; cursor: pointer; font-weight: 800;
  }
  .sum { display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; margin: 8px 0 12px; }
  .order-ok { text-align: center; padding: 12px 4px 4px; }
  .order-ok h3 { margin: 8px 0 6px; font-size: 20px; }
  .order-ok p { margin: 0 0 10px; color: var(--muted); line-height: 1.4; }
  .order-list { text-align: left; border-top: 1px solid var(--line); margin-top: 12px; }
  .order-list div { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .checkout { display: flex; flex-direction: column; gap: 8px; }
  .checkout input {
    width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit;
  }
  .xbtn { border: 0; background: #f7f9f9; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-weight: 700; }
  #adminBtn { display: none; }
  #adminBtn.on { display: inline-grid; }
  .admin-note {
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-top: 16px;
  }
  .admin-note b { display: block; margin-bottom: 4px; }
  .post .on-photo .sizes { margin: 0; gap: 4px; }
  .post .on-photo .sizes button { height: 26px; min-width: 26px; padding: 0 8px; font-size: 12px; }
  .viewer-frame:has(video) .on-photo { bottom: 46px; padding-top: 0; background: none; }
  .photo-price {
    position: absolute; top: 8px; right: 8px; z-index: 3;
    max-width: calc(100% - 52px); height: 32px; padding: 0 10px;
    display: inline-flex; align-items: center;
    border-radius: 999px; background: rgba(15,20,25,.72); color: #fff;
    font-weight: 800; font-size: 13px; line-height: 1; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  }
  .frame > .cart-ico {
    position: absolute; top: 48px; left: 8px; z-index: 4;
  }
  .rate { display: flex; align-items: center; gap: 2px; margin: 0; }
  .under-photo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 2px 0; }
  .photo-notes { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 2px 0; }
  .photo-desc {
    display: block; margin: 0; padding: 0; border: 0; background: none;
    font: inherit; font-size: 13px; font-weight: 700; line-height: 1.35;
    color: var(--muted); text-align: left; cursor: pointer;
  }
  .photo-edit {
    border: 0; background: none; padding: 0; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 700; color: var(--accent);
  }
  #regSheet { align-items: center; }
  #regSheet .sheet-box { border-radius: 18px; width: min(400px, calc(100% - 32px)); padding-bottom: 16px; }
  #descSheet { z-index: 50; align-items: center; }
  #descSheet .sheet-box { border-radius: 18px; width: min(440px, calc(100% - 32px)); }
  #descSheet textarea {
    width: 100%; min-height: 140px; border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; font: inherit; font-size: 15px; background: #fff;
  }
  #descSheet .send { margin-top: 0; }
  .desc-actions { display: flex; gap: 8px; margin-top: 12px; }
  .desc-actions .login-btn, .desc-actions .send { height: 36px; }
  .desc-text { margin: 0; white-space: pre-wrap; line-height: 1.45; font-size: 15px; }
  .desc-text.empty { color: var(--muted); }
  .viewer-shot .photo-desc { color: #fff; text-align: center; }
  .clip-ico {
    width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; flex: none;
    background: #0f1419; color: #fff; display: grid; place-items: center; cursor: pointer;
  }
  .clip-ico svg { display: block; }
  .clip-ico.empty { background: #fff; color: #0f1419; border: 1px solid var(--line); }
  .rate .star {
    border: 0; background: none; padding: 0; margin: 0;
    color: #d5dbe3; font-size: 18px; line-height: 1; font-style: normal;
  }
  .rate button.star { cursor: pointer; }
  .rate .star.on { color: #e0a106; }
  .viewer-shot { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
  .viewer-shot img { max-height: calc(100vh - 96px); }
  .viewer-shot .under-photo { width: 100%; margin-top: 10px; }
  .viewer-shot .rate { margin-top: 0; }
  .viewer-shot .clip-ico { background: #fff; color: #0f1419; }
  .viewer-shot .rate .star { color: rgba(255,255,255,.4); font-size: 22px; }
  .viewer-shot .rate .star.on { color: #f5c451; }
  .sizes button,
  .on-photo .sizes button,
  .post .sizes button,
  .post .on-photo .sizes button {
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #ddd !important;
  }
  .sizes button.on,
  .on-photo .sizes button.on,
  .post .sizes button.on,
  .post .on-photo .sizes button.on {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
  }
  .post .gallery .frame {
    overflow: hidden;
    border-radius: 14px;
  }
  .post .gallery .clip,
  .post .gallery .photo,
  .post .gallery .tile img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center;
    border-radius: 14px;
  }
  .fav-grid .tile img, .fav-grid .tile video {
    width: 100%; height: auto; aspect-ratio: 2 / 3;
    object-fit: cover; object-position: center; border-radius: 14px 14px 0 0;
  }

  /* Иконка видео — на фото, в правом нижнем углу напротив размеров */
  .on-photo-end { margin-left: auto; display: flex; align-items: flex-end; }
  .on-photo .clip-ico, .on-photo .clip-ico.empty {
    width: 30px; height: 30px; border: 0;
    background: rgba(255,255,255,.94); color: #0f1419;
    box-shadow: 0 1px 4px rgba(15,20,25,.28);
  }

  .viewer.popup .viewer-photo-col { flex: none; width: min(300px, 100%); max-width: 300px; }
  .viewer.popup .viewer-photo-col .viewer-frame { max-width: 100%; }
  /* Когда в открытом фото играет видео — колонка и ролик на всю ширину окна */
  .viewer.popup .viewer-photo-col:has(video) { width: 100%; max-width: 100%; }
  /* На компьютере открытое фото выглядит как на телефоне: узкое окно, всё в одну колонку */
  @media (min-width: 561px) {
    .viewer.popup .viewer-stage { width: min(420px, calc(100% - 32px)); }
    .viewer.popup .viewer-photo-col { width: 100%; max-width: 100%; }
  }
  .viewer-dock {
    display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px;
  }
  .viewer-dock .sizes { margin: 0; flex: 1; min-width: 0; }
  .viewer-dock .sizes button { height: 28px; min-width: 28px; padding: 0 8px; font-size: 12px; }
  .viewer-dock-end { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
  .viewer-dock .buy.cart-ico, .viewer-dock .clip-ico {
    width: 32px; height: 32px; border-radius: 50%; padding: 0;
    display: grid; place-items: center; cursor: pointer;
    background: #0f1419; color: #fff; border: 0;
  }
  .viewer-dock .clip-ico.empty { background: #fff; color: #0f1419; border: 1px solid #d5dde3; }
  @media (max-width: 560px) {
    .viewer.popup .viewer-photo-col { max-width: 100%; width: 100%; }
  }

  /* Топ 5 моделей по избранному */
  #top5:empty { display: none; }
  .top5 { margin-top: 16px; }
  .top5 h2 { font-size: 17px; margin: 0 0 8px; }
  .top5-row { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
  .top5-row::-webkit-scrollbar { display: none; }
  .top5-card { flex: 0 0 132px; scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; }
  .top5-card .frame { position: relative; }
  .top5-card img, .top5-card video { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
  .top5-card .rank { position: absolute; top: 6px; left: 6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: #0f1419; color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; }
  .top5-card .fav-n { position: absolute; bottom: 6px; left: 6px; padding: 2px 8px; border-radius: 10px; background: rgba(15,20,25,.7); color: #f5a623; font-size: 12px; }
  .top5-card .play { position: absolute; right: 6px; bottom: 6px; color: #fff; font-size: 14px; }
  .top5-cap { padding: 6px 8px 8px; font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
  .top5-cap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top5-cap span { color: var(--muted); }

  /* ===== Накопительные бонусы ===== */
  #bonusBtn { display: none; }
  #bonusBtn.on { display: inline-grid; }
  .bonus-box { border: 1px solid var(--line); background: #f7f9f9; border-radius: 16px; padding: 12px; margin: 4px 0 12px; }
  .bonus-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .bonus-head span { color: var(--accent); font-weight: 800; font-size: 13px; }
  .bonus-line { margin: 6px 0; }
  .bonus-use { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; font-weight: 700; cursor: pointer; }
  .bonus-use input { width: 18px; height: 18px; flex: none; }
  .bonus-use small { color: var(--muted); font-weight: 500; }
  .bonus-hint { color: var(--muted); font-size: 13px; line-height: 1.4; }
  .bonus-hint:empty { display: none; }
  .bonus-note { color: var(--accent); font-weight: 700; }
  .bonus-minus span:last-child { color: #00ba7c; }
  .bonus-big { font-size: 32px; font-weight: 800; margin: 4px 0; }
  .bonus-progress { height: 8px; border-radius: 999px; background: var(--line); margin: 12px 0 6px; overflow: hidden; }
  .bonus-progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
  .bonus-tiers { margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .bonus-tiers > div { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 14px; }
  .bonus-tiers > div:first-child { border-top: 0; }
  .bonus-tiers > div span:first-child { font-weight: 800; min-width: 72px; }
  .bonus-tiers > div span:nth-child(2) { color: var(--muted); flex: 1; }
  .bonus-tiers > div.on { background: #e8f5fd; }
  .bonus-sub { margin: 16px 0 4px; font-size: 16px; }
  .bonus-row { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
  .bonus-row small { color: var(--muted); }
  .bonus-row .plus { color: #00ba7c; }
  .bonus-row .minus { color: var(--like); }
  .order-status { margin-top: 10px; font-weight: 800; font-size: 14px; }
  .order-status.done { color: #00ba7c; }
  .order-status.cancel { color: var(--muted); }
  .admin-actions { display: flex; gap: 8px; margin-top: 10px; }

  /* ===== Склад ===== */
  #stockBtn { display: none; }
  #stockBtn.on { display: inline-grid; }
  .stock-total { display: flex; gap: 8px; margin-bottom: 8px; }
  .stock-total > div { flex: 1; background: #f7f9f9; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
  .stock-total span { display: block; color: var(--muted); font-size: 12px; }
  .stock-total b { font-size: 18px; }
  .stock-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
  .stock-row:first-of-type { margin-top: 8px; }
  .stock-row img, .stock-row .ph { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #f4f6f8; flex: none; display: grid; place-items: center; color: var(--muted); font-weight: 800; font-size: 12px; }
  .stock-row .grow { flex: 1; min-width: 0; }
  .stock-row .title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stock-row input { width: 76px; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font: inherit; text-align: center; }
  .stock-row input.zero { border-color: var(--like); color: var(--like); }

/* Крупный просмотр фото из отзывов */
.rv-zoom { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 56px 12px; box-sizing: border-box; }
.rv-zoom[hidden] { display: none; }
.rv-zoom img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.rv-zoom-x { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 18px; cursor: pointer; }
.rv-zoom-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.rv-zoom-nav[hidden] { display: none; }
.rv-zoom-nav.prev { left: 10px; }
.rv-zoom-nav.next { right: 10px; }
.viewer.popup .rv-imgs img, .viewer.popup .rv-thumb img { cursor: zoom-in; }

  /* ===== Прибыль ===== */
  #profitBtn { display: none; }
  #profitBtn.on { display: inline-grid; }
  .profit-tabs, .profit-period { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
  .profit-tabs button, .profit-period button {
    border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px;
    padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  }
  .profit-tabs button.on { background: var(--text); border-color: var(--text); color: #fff; }
  .profit-period button { padding: 4px 10px; font-size: 12px; color: var(--muted); }
  .profit-period button.on { background: #e8f5fd; border-color: #e8f5fd; color: var(--accent); }
  .profit-range { display: flex; gap: 6px; align-items: center; margin: -4px 0 10px; }
  .profit-range input { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font: inherit; font-size: 13px; }
  .profit-hero { background: #eafaf1; border-radius: 16px; padding: 14px 16px; margin-bottom: 8px; }
  .profit-hero span, .profit-hero small { display: block; color: #3d6b52; font-size: 12px; }
  .profit-hero b { display: block; font-size: 28px; color: #0b7a3e; margin: 2px 0; }
  .profit-hero.minus { background: #fdecef; }
  .profit-hero.minus b { color: #c4113b; }
  .profit-hero.minus span, .profit-hero.minus small { color: #8a3b4d; }
  .profit-grid { flex-wrap: wrap; }
  .profit-grid > div { flex: 1 1 calc(50% - 4px); }
  .profit-grid b { font-size: 16px; }
  .profit-warn { background: #fff7e0; color: #7a5a00; border-radius: 12px; padding: 8px 12px; font-size: 13px; margin-top: 8px; }
  .profit-h { font-size: 15px; margin: 16px 0 4px; }
  .profit-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
  .profit-row .grow { flex: 1; min-width: 0; }
  .profit-row .title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .profit-row b { white-space: nowrap; }
  .minus { color: #c4113b; }
  .plus { color: #0b7a3e; }
  .profit-add { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
  .profit-add input { height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; font: inherit; min-width: 0; }
  .profit-add .row2 { display: flex; gap: 6px; }
  .profit-add .row2 input { flex: 1; }
  .profit-add .send { flex: none; }
  #profitBody .stock-row input { width: 96px; }

  /* Название товара в посте: сразу под фото, ровно по левому краю, до 2 строк */
  .gallery .offer { margin: 8px 0 0; padding: 0 2px; }
  .gallery .offer b {
    font-size: 15px; line-height: 1.3; font-weight: 700;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 0;
  }
  /* «Описание» — сразу под названием товара */
  .gallery .photo-notes { margin-top: 2px; }
  .gallery.one .offer b { min-height: 0; }
  .desc-clip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
  .desc-clip .meta { flex: 1 1 100%; font-size: 13px; }
  .desc-clip .login-btn { height: 34px; padding: 0 14px; font-size: 13px; }
  /* Отзывы в открытом фото — уже, чем фото, по центру окна */
  .viewer.popup .viewer-reviews { width: 86%; max-width: 86%; margin-left: auto; margin-right: auto; box-sizing: border-box; }
  /* Количество постов в шапке скрыто */
  #total { display: none !important; }
  .seo-about { margin: 0 0 8px; line-height: 1.45; max-width: 640px; }
