/* Доска объявлений «Дневник Диабетика» — дизайн-система приложения ДД */
:root {
  --blue: #ef5636;
  --blue-tint: #fce3db;
  --good: #2f9e5f;
  --good-tint: #e4f3e9;
  --bad: #d23b3b;
  --bad-tint: #fbe4e2;
  --warn: #d98a1f;
  --warn-tint: #fdf0dc;
  --page-bg: #f1f0ee;
  --card: #ffffff;
  --card-border: #eae7e2;
  --ink: #1c1512;
  --muted: #7a6b62;
  --faint: #a99a90;
  --line: #e9e7e3;
  --card-shadow: 0 3px 12px rgba(120,55,30,.08), 0 1px 3px rgba(120,55,30,.06);
  --btn-shadow: 0 10px 22px -8px rgba(239,86,54,.5);
  --f-display: "Coolvetica","Helvetica Neue","Arial Rounded MT Bold",system-ui,-apple-system,sans-serif;
  --f-body: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,"Helvetica Neue",sans-serif;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #f26b4e; --blue-tint: #33201a;
    --good: #3bb56f; --good-tint: #123322;
    --bad: #e85555; --bad-tint: #331615;
    --warn: #e3a04a; --warn-tint: #33270f;
    --page-bg: #140f0c; --card: #241b16; --card-border: #322620;
    --ink: #f3ece7; --muted: #b3a396; --faint: #7d6f64;
    --line: #322620;
    --card-shadow: 0 3px 12px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  --blue: #f26b4e; --blue-tint: #33201a;
  --good: #3bb56f; --good-tint: #123322;
  --bad: #e85555; --bad-tint: #331615;
  --warn: #e3a04a; --warn-tint: #33270f;
  --page-bg: #140f0c; --card: #241b16; --card-border: #322620;
  --ink: #f3ece7; --muted: #b3a396; --faint: #7d6f64;
  --line: #322620;
  --card-shadow: 0 3px 12px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.3);
}
:root[data-theme="light"] {
  --blue: #ef5636; --blue-tint: #fce3db;
  --good: #2f9e5f; --good-tint: #e4f3e9;
  --bad: #d23b3b; --bad-tint: #fbe4e2;
  --warn: #d98a1f; --warn-tint: #fdf0dc;
  --page-bg: #f1f0ee; --card: #ffffff; --card-border: #eae7e2;
  --ink: #1c1512; --muted: #7a6b62; --faint: #a99a90;
  --line: #e9e7e3;
  --card-shadow: 0 3px 12px rgba(120,55,30,.08), 0 1px 3px rgba(120,55,30,.06);
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font: 16px/1.45 var(--f-body);
  background: var(--page-bg); color: var(--ink);
  padding-bottom: calc(66px + env(safe-area-inset-bottom));
}
button { font: inherit; cursor: pointer; }
svg.ic { width: 22px; height: 22px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* шапка */
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--page-bg); border-bottom: 1px solid var(--line);
  padding: 14px 16px 10px;
}
.topbar-in { max-width: 480px; margin: 0 auto; }
.brand-title {
  font-family: var(--f-display); font-size: 22px; letter-spacing: .2px;
  color: var(--ink); line-height: 1.1;
}
.brand-title .accent { color: var(--blue); }
.brand-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

main { padding: 12px 12px 20px; max-width: 480px; margin: 0 auto; }

/* фильтры */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--card-border); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 8px 15px; font-size: 14.5px; box-shadow: var(--card-shadow);
}
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.filter-row { display: flex; gap: 8px; margin-bottom: 10px; }
.filter-row select, .filter-row input {
  flex: 1; min-width: 0; padding: 11px 12px; border: 1px solid var(--card-border);
  border-radius: 12px; background: var(--card); color: var(--ink); font-size: 15px;
  appearance: none; -webkit-appearance: none;
}

/* карточки ленты */
.card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 12px; margin-bottom: 10px; display: flex; gap: 12px; align-items: stretch;
}
.card:active { transform: scale(.99); }
.card-img {
  width: 86px; height: 86px; border-radius: 12px; object-fit: cover; flex: none;
}
.card-img.ph {
  background: var(--blue-tint); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.card-img.ph svg.ic { width: 30px; height: 30px; stroke-width: 1.5; }
.card-body { min-width: 0; flex: 1; }
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 7px;
  padding: 3px 8px; margin-bottom: 5px; letter-spacing: .3px; text-transform: uppercase;
}
.badge.sell { background: var(--blue-tint); color: var(--blue); }
.badge.buy  { background: var(--warn-tint); color: var(--warn); }
.badge.free { background: var(--good-tint); color: var(--good); }
.badge.swap { background: var(--line); color: var(--muted); }
.card-title { font-weight: 650; font-size: 15.5px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-price { font-weight: 750; margin-top: 3px; font-size: 15.5px; }
.card-meta { font-size: 13px; color: var(--muted); margin-top: 3px; }

.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty .empty-ic { color: var(--faint); margin-bottom: 12px; }
.empty .empty-ic svg.ic { width: 44px; height: 44px; stroke-width: 1.3; }
.empty b { color: var(--ink); }

/* форма */
.form label { display: block; font-size: 13.5px; font-weight: 650; margin: 15px 0 6px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--card-border); border-radius: 12px;
  background: var(--card); color: var(--ink); font-size: 16px;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--blue);
}
.form textarea { min-height: 110px; resize: vertical; }
.hint { font-size: 12.5px; color: var(--faint); margin-top: 5px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg .chip { text-align: center; box-shadow: none; }
.photos-row { display: flex; gap: 8px; margin-top: 6px; }
.photo-slot {
  width: 78px; height: 78px; border-radius: 12px; border: 1.5px dashed var(--card-border);
  background: var(--card); display: flex; align-items: center; justify-content: center;
  color: var(--faint); overflow: hidden; position: relative;
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-del {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(20,15,12,.6); color: #fff; font-size: 12px; line-height: 1;
}
.btn {
  width: 100%; border: none; border-radius: 14px; padding: 15px; font-size: 16.5px;
  font-weight: 700; background: var(--blue); color: #fff; margin-top: 18px;
  box-shadow: var(--btn-shadow);
}
.btn[disabled] { opacity: .55; }
.btn.ghost { background: var(--card); color: var(--ink);
  border: 1px solid var(--card-border); box-shadow: var(--card-shadow); }

/* мои объявления */
.status { font-size: 13px; font-weight: 650; margin-top: 4px;
  display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.pending { color: var(--warn); } .status.active { color: var(--good); }
.status.rejected { color: var(--bad); } .status.closed, .status.expired { color: var(--faint); }
.mini-btn {
  display: block; border: 1px solid var(--card-border); background: var(--card); color: var(--ink);
  border-radius: 10px; padding: 8px 14px; font-size: 13.5px; margin-top: 10px;
}

/* правила */
.rules { background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 18px; }
.rules h3 { margin: 16px 0 7px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.rules h3:first-child { margin-top: 0; }
.rules h3 svg.ic { width: 19px; height: 19px; }
.rules h3.ok { color: var(--good); } .rules h3.no { color: var(--bad); }
.rules h3.warn { color: var(--warn); }
.rules p, .rules li { font-size: 14.5px; color: var(--ink); }
.rules ul { padding-left: 20px; margin: 4px 0; }
.rules .sign { color: var(--muted); margin-top: 12px; font-size: 13.5px; }
.banner {
  background: var(--warn-tint); color: var(--warn); border-radius: 12px;
  padding: 10px 13px; font-size: 13.5px; margin-bottom: 12px; font-weight: 650;
}

/* таббар */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 5;
  display: flex; background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; border: none; background: none; color: var(--faint);
  padding: 9px 0 8px; font-size: 11px; font-weight: 650;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  position: relative;
}
.tab.active { color: var(--blue); }
.tab-badge {
  position: absolute; top: 3px; left: 50%; transform: translateX(6px);
  min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  background: var(--blue); color: #fff; border-radius: 8px;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
}

/* панель модерации (только для админов) */
.mod-head { font-weight: 750; margin: 4px 4px 12px; color: var(--ink); }
.mod-card .desc, .fb-card .desc { white-space: pre-wrap; margin: 8px 0 4px; font-size: 14.5px; color: var(--ink); }
.mod-actions { display: flex; gap: 10px; margin-top: 12px; }
.mod-actions .btn { margin-top: 0; flex: 1; }
.btn.mod-ok { background: #1f9d55; }
.fb-card .btn { margin-top: 12px; }
.mod-seg { display: flex; gap: 8px; margin: 2px 0 14px; }
.mod-seg-btn {
  flex: 1; padding: 10px 8px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--muted); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.mod-seg-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.seg-n {
  min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 9px; background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
.mod-seg-btn.active .seg-n { background: rgba(255,255,255,.28); }
.rp-reason {
  display: flex; align-items: center; gap: 7px; font-weight: 750;
  color: #c23b22; font-size: 14px; margin-bottom: 6px;
}
.rp-reason svg.ic { color: #c23b22; }
.rp-stale { color: var(--muted); font-weight: 600; }

/* «отдам даром» в форме «Продам» */
.free-check {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 0 2px; padding: 10px 12px; border-radius: 12px;
  background: var(--blue-tint); cursor: pointer;
  font-size: 14.5px; font-weight: 650; color: var(--ink);
}
.free-check input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
input.locked { color: var(--blue); font-weight: 700; background: var(--blue-tint); }

/* статистика (дашборд для B2B) */
.stat-h { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); margin: 18px 2px 10px; }
.stat-h:first-child { margin-top: 2px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 10px; text-align: center; }
.stat-tile.accent { background: var(--blue-tint); border-color: transparent; }
.stat-num { font-size: 24px; font-weight: 850; color: var(--ink); line-height: 1.1; }
.stat-tile.accent .stat-num { color: var(--blue); }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.25; }
.stat-list { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 4px 14px; }
.stat-row { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink); }
.stat-row:last-child { border-bottom: none; }
.stat-row b { font-weight: 800; }
.stat-row.hot { color: var(--blue); font-weight: 700; }
.stat-row.hot b { color: var(--blue); }
.wk-chart { display: flex; align-items: flex-end; justify-content: flex-start;
  gap: 10px; height: 140px; overflow-x: auto;
  padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.wk-bar { flex: 1 1 0; min-width: 28px; max-width: 44px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; gap: 4px; }
.wk-n { font-size: 11px; font-weight: 700; color: var(--muted); }
.wk-fill { width: 70%; min-height: 4px; background: var(--blue); border-radius: 5px 5px 0 0; }
.wk-lbl { font-size: 9px; color: var(--faint); }
.stat-note { color: var(--faint); font-size: 12px; margin: 16px 2px 4px; line-height: 1.5; }

/* розыгрыши: компактная строчка-уведомление в ленте */
.gv-strip {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin-bottom: 12px; padding: 12px 14px; border: none; cursor: pointer;
  background: var(--blue-tint); color: var(--blue);
  border-radius: 14px; font-weight: 700; font-size: 14.5px; text-align: left;
}
.gv-strip .gv-strip-txt {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gv-strip svg.ic { color: var(--blue); flex: none; }
.gv-strip.joined { background: #e8f6ee; color: #1f8a4c; }
.gv-strip.joined svg.ic { color: #1f8a4c; }
.gv-strip.done { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.gv-strip.done svg.ic { color: var(--faint); }
@media (prefers-color-scheme: dark) { .gv-strip.joined { background: #16321f; color: #57c77f; } }

.gv-card {
  background: var(--card); border-radius: 18px; overflow: hidden;
  border: 2px solid var(--blue); margin-bottom: 14px;
  box-shadow: 0 6px 22px rgba(239,86,54,.16);
}
.gv-card.done { border-color: var(--line); box-shadow: none; }
.gv-card.in-modal { border: none; box-shadow: none; margin: 0; }
.gv-img { width: 100%; height: 150px; object-fit: cover; display: block; }
.gv-img.ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-tint); color: var(--blue); height: 110px;
}
.gv-img.ph svg.ic { color: var(--blue); }
.gv-body { padding: 14px 16px 16px; }
.gv-badge {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--blue); font-weight: 800; font-size: 12px;
  text-transform: uppercase; letter-spacing: .3px; margin-bottom: 6px;
}
.gv-badge svg.ic { color: var(--blue); width: 15px; height: 15px; }
.gv-title { font-size: 18px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.gv-prize {
  display: flex; align-items: center; gap: 7px; margin-top: 8px;
  font-weight: 700; color: var(--ink); font-size: 15px;
}
.gv-prize svg.ic { color: #1f9d55; }
.gv-desc { color: var(--muted); font-size: 14px; margin-top: 8px; white-space: pre-wrap; }
.gv-join { width: 100%; margin-top: 14px; }
.gv-joined {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 14px; padding: 12px; border-radius: 12px;
  background: #e8f6ee; color: #1f8a4c; font-weight: 750;
}
.gv-winner {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  font-weight: 750; color: var(--ink);
}
.gv-winner svg.ic { color: var(--blue); }
.gv-count { color: var(--faint); font-size: 13px; margin-top: 8px; text-align: center; }
.ga-live {
  font-size: 11px; font-weight: 800; color: #1f8a4c;
  background: #e8f6ee; padding: 2px 8px; border-radius: 8px; vertical-align: middle;
}
.ga-photo-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; }
/* кнопка/экран участников */
.ent-open {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 6px 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); font-weight: 650; font-size: 14px;
}
.ent-open svg.ic { color: var(--blue); }
.ent-list { max-height: 60vh; overflow-y: auto; margin-top: 6px; }
.ent-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px;
  border-bottom: 1px solid var(--line); font-size: 15px; }
.ent-row:last-child { border-bottom: none; }
.ent-num { width: 26px; color: var(--faint); font-size: 13px; font-weight: 700; flex: none; }
.ent-name { flex: 1; color: var(--ink); font-weight: 600; }
.ent-plat { color: var(--muted); font-size: 12px; font-weight: 700; }
/* барабан-раскрытие победителя */
.draw-anim { text-align: center; padding-bottom: 34px; }
.draw-name {
  font-size: 30px; font-weight: 850; color: var(--ink);
  margin: 26px 0 10px; min-height: 40px; line-height: 1.15;
  transition: transform .15s;
}
.draw-name.win {
  color: var(--blue); transform: scale(1.12);
  animation: winpop .5s ease;
}
@keyframes winpop {
  0% { transform: scale(.7); opacity: .3; }
  60% { transform: scale(1.22); }
  100% { transform: scale(1.12); }
}
.draw-sub { color: var(--muted); font-size: 14px; font-weight: 600; }
.gv-ends {
  display: flex; align-items: center; gap: 7px; margin-top: 10px;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.gv-ends svg.ic { color: var(--faint); }
.gv-org {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 11.5px; line-height: 1.45;
}
/* окно условий участия */
.gv-cond .gv-badge { margin-bottom: 2px; }
.gv-cond-note { color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
.gv-step {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--line);
}
.gv-step-ic {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue-tint); color: var(--blue);
  font-weight: 800; font-size: 13px; display: flex;
  align-items: center; justify-content: center;
}
.gv-step-ic.done { background: #1f9d55; color: #fff; }
.gv-step-body { flex: 1; font-size: 14px; }
.gv-step-body b { font-size: 14.5px; display: block; }
.gv-step-body span { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.btn.small {
  flex: none; width: auto; margin: 0; padding: 8px 14px;
  font-size: 13px; border-radius: 10px;
}
#gc-join { margin-top: 16px; }
#gc-join[disabled] { opacity: .5; }
@media (prefers-color-scheme: dark) {
  .gv-joined { background: #16321f; color: #57c77f; }
  .ga-live { background: #16321f; color: #57c77f; }
}

/* шторка объявления */
.overlay {
  position: fixed; inset: 0; z-index: 10; background: rgba(20,15,12,.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.overlay.hidden { display: none; }
.sheet {
  background: var(--page-bg); width: 100%; max-width: 480px; max-height: 92vh;
  border-radius: 20px 20px 0 0; overflow-y: auto; padding: 16px 16px 30px;
}
.sheet-close { float: right; border: 1px solid var(--card-border); background: var(--card);
  color: var(--muted); width: 34px; height: 34px; border-radius: 50%; font-size: 15px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0 12px; }
.gallery img { height: 230px; border-radius: 14px; }
.sheet h2 { font-family: var(--f-display); font-size: 21px; margin: 8px 0 4px; letter-spacing: .2px; }
.sheet .price { font-size: 19px; font-weight: 800; color: var(--blue); }
.sheet .desc { white-space: pre-wrap; margin: 12px 0; font-size: 15px; }
.kv { color: var(--muted); font-size: 14px; margin: 4px 0; display: flex; gap: 8px; align-items: center; }
.kv svg.ic { width: 17px; height: 17px; color: var(--faint); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 20;
  background: var(--ink); color: var(--page-bg); padding: 11px 18px;
  border-radius: 999px; font-size: 14.5px; max-width: 86vw; text-align: center;
  box-shadow: var(--card-shadow);
}
.toast.hidden { display: none; }
.loader { text-align: center; color: var(--faint); padding: 30px; }

/* правила — карточки-строки в стиле приветствия */
.rules-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 6px 16px;
}
.frow { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line-soft, var(--line)); }
.frow:last-child { border-bottom: none; }
.frow-ic {
  flex: none; width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}
.frow-ic svg.ic { width: 22px; height: 22px; stroke-width: 1.7; }
.frow-ic.ok { background: var(--good-tint); color: var(--good); }
.frow-ic.no { background: var(--bad-tint); color: var(--bad); }
.frow-ic.warn { background: var(--warn-tint); color: var(--warn); }
.frow-ic.info { background: var(--blue-tint); color: var(--blue); }
.frow-body b { display: block; font-size: 15.5px; color: var(--ink); margin-bottom: 3px; }
.frow-body p { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* карточка автора */
.author-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--card-shadow);
  padding: 16px; margin-top: 12px;
}
.author-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.author-ava {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-tint); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.author-ava svg.ic { width: 26px; height: 26px; }
.author-head b { display: block; font-family: var(--f-display); font-size: 18px; color: var(--ink); }
.author-head span { font-size: 13px; color: var(--muted); }
.author-note { font-size: 14.5px; line-height: 1.5; color: var(--muted); margin-bottom: 4px; text-align: center; }
.author-card .btn { margin-top: 14px; }
.author-link {
  display: block; text-align: center; margin-top: 12px; padding: 4px;
  color: var(--blue); font-size: 14.5px; font-weight: 600; text-decoration: none;
}

/* закреплённая «официальная» карточка (промо ДКП) — визуально отбита */
.pinned {
  background: var(--card); border: 2px solid var(--blue); border-radius: 16px;
  overflow: hidden; margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(239,86,54,.14);
}
.pinned-badge {
  background: var(--blue); color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: .4px; padding: 6px 14px; display: flex; align-items: center; gap: 6px;
}
.pinned-badge svg.ic { width: 15px; height: 15px; stroke: #fff; }
.pinned-body { display: flex; gap: 12px; padding: 13px 14px 4px; }
.pinned-img { width: 78px; height: 78px; border-radius: 11px; object-fit: cover; flex: none; }
.pinned-img.ph { background: var(--blue-tint); color: var(--blue);
  display: flex; align-items: center; justify-content: center; }
.pinned-img.ph svg.ic { width: 34px; height: 34px; }
.pinned-main { min-width: 0; }
.pinned-title { font-size: 15.5px; font-weight: 650; color: var(--ink); }
.pinned-price { font-size: 16.5px; font-weight: 750; color: var(--blue); margin-top: 4px; }
.pinned-price span { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.pinned-seller { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.pinned-cta {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: calc(100% - 28px); margin: 8px 14px 0; padding: 12px; border: none;
  border-radius: 12px; background: var(--blue); color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: var(--btn-shadow);
}
.pinned-disc { font-size: 11.5px; line-height: 1.4; color: var(--faint); padding: 10px 14px 13px; }

/* истории (личный блог автора) */
.stories-bar { display: flex; gap: 14px; padding: 2px 2px 14px; overflow-x: auto;
  scrollbar-width: none; }
.stories-bar::-webkit-scrollbar { display: none; }
.story-circle { flex: none; border: none; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 5px; }
.story-ring { width: 66px; height: 66px; border-radius: 50%; padding: 3px;
  background: var(--blue); display: flex; align-items: center; justify-content: center; }
.story-circle.seen .story-ring { background: var(--card-border); }
.story-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--page-bg); }
.story-ring svg.ic { width: 30px; height: 30px; color: #fff; stroke-width: 1.7; }
.story-name { font-size: 12px; color: var(--ink); max-width: 70px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.story-viewer { position: fixed; inset: 0; z-index: 40; background: #000;
  display: flex; flex-direction: column; }
.sv-bars { display: flex; gap: 4px; padding: calc(10px + env(safe-area-inset-top)) 12px 8px; }
.sv-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.32); overflow: hidden; }
.sv-bar i { display: block; height: 100%; width: 0; background: #fff; }
.sv-bar.done i { width: 100%; }
.sv-close { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 14px;
  z-index: 3; background: rgba(0,0,0,.4); border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 50%; font-size: 16px; }
.sv-media { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sv-media img, .sv-media video { max-width: 100%; max-height: 100%; }
.sv-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 26px 20px calc(28px + env(safe-area-inset-bottom)); color: #fff;
  font-size: 15.5px; line-height: 1.45; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.sv-nav { position: absolute; top: 40px; bottom: 0; z-index: 1; }
.sv-prev { left: 0; width: 33%; }
.sv-next { right: 0; width: 67%; }

/* форма обратной связи */
.fb-note { font-size: 14.5px; line-height: 1.5; color: var(--muted); margin-bottom: 12px; }
.fb-text {
  width: 100%; min-height: 130px; resize: vertical; padding: 13px;
  border: 1px solid var(--card-border); border-radius: 12px;
  background: var(--card); color: var(--ink); font-size: 16px; font-family: inherit;
}
.fb-text:focus { outline: none; border-color: var(--blue); }

/* жалоба на объявление */
.report-link {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; margin-top: 12px; padding: 10px; background: none; border: none;
  color: var(--faint); font-size: 13.5px;
}
.report-link svg.ic { width: 15px; height: 15px; }
.report-sheet {
  margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px;
}
.report-sheet h3 { font-size: 15px; margin-bottom: 10px; color: var(--ink); }
.report-opt {
  display: block; width: 100%; text-align: left; padding: 13px 14px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 12px;
  color: var(--ink); font-size: 15px;
}
.report-opt.cancel { color: var(--muted); text-align: center; border: none; background: none; }

/* онбординг (приветствие при первом запуске) */
.onb {
  position: fixed; inset: 0; z-index: 30; background: var(--page-bg);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
}
.onb-skip {
  align-self: flex-end; margin: 14px 16px 0; padding: 6px 4px;
  background: none; border: none; color: var(--faint); font-size: 14.5px;
}
.onb-body {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 0 32px;
}
.onb-badge {
  width: 92px; height: 92px; border-radius: 26px; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px; box-shadow: var(--btn-shadow);
}
.onb-badge svg.ic { width: 46px; height: 46px; stroke: #fff; stroke-width: 1.6; }
.onb-body h2 {
  font-family: var(--f-display); font-size: 26px; color: var(--ink);
  margin-bottom: 12px; letter-spacing: .2px;
}
.onb-body p { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 340px; }
.onb-dots { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.onb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--card-border); transition: width .2s; }
.onb-dot.on { background: var(--blue); width: 22px; border-radius: 4px; }
.onb-foot { padding: 0 24px calc(26px + env(safe-area-inset-bottom)); max-width: 480px; width: 100%; margin: 0 auto; }
.onb-foot .btn { margin-top: 0; }
