:root {
  --bg: #f4f8f5;
  --surface: #ffffff;
  --surface-2: #f0f6f2;
  --text: #11231a;
  --muted: #5c6f64;
  --border: #dfe9e3;
  --green: #12a150;
  --green-hover: #0d8a43;
  --green-soft: #e3f6ea;
  --green-text: #0b7d3c;
  --on-green: #ffffff;
  --danger: #c93a3a;
  --shadow: 0 1px 2px rgba(16, 40, 26, .05), 0 8px 24px rgba(16, 40, 26, .06);
  --radius: 16px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b130f;
  --surface: #131d18;
  --surface-2: #19261f;
  --text: #e7f2ea;
  --muted: #93a79b;
  --border: #24342b;
  --green: #2ecf77;
  --green-hover: #4ddc8d;
  --green-soft: #153322;
  --green-text: #4ddc8d;
  --on-green: #05210f;
  --danger: #ff7a7a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Manrope, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main.container { flex: 1; padding-top: 24px; padding-bottom: 56px; }

.icon { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.link { color: var(--green-text); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; }
.stack { display: grid; gap: 12px; }

/* Смужка демо-режиму */
.demo-banner { padding: 6px 16px; background: var(--green); color: var(--on-green); font-size: 13px; font-weight: 600; text-align: center; }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.logo b { color: var(--green-text); font-weight: 800; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--green); color: var(--on-green); display: grid; place-items: center; }
.logo-mark svg { width: 34px; height: 34px; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.lang { display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.lang button.on { background: var(--green); color: var(--on-green); }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--green); color: var(--green-text); }

.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 14px; }
.user-chip:hover { border-color: var(--green); }
.user-chip span:last-child { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--green-soft); color: var(--green-text); display: grid; place-items: center; font-weight: 800; font-size: 14px; object-fit: cover; flex: none; }
.avatar-lg { width: 52px; height: 52px; font-size: 22px; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { background: var(--green-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-text); }
.btn-danger { background: none; border-color: var(--border); color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-block { width: 100%; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* Головна */
.hero {
  padding: 44px 28px; margin-bottom: 36px; border-radius: 24px; text-align: center;
  background: radial-gradient(120% 140% at 0% 0%, var(--green-soft), var(--surface) 70%);
  border: 1px solid var(--border);
}
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.hero p { max-width: 620px; margin: 14px auto 26px; color: var(--muted); font-size: 17px; text-wrap: pretty; }

.search {
  display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto;
  padding: 6px 6px 6px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.search:focus-within { border-color: var(--green); }
.search .icon { color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 42px; border: 0; background: none; color: var(--text); font: inherit; outline: none; }
.search-compact { max-width: none; margin-bottom: 18px; }

.section-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#app > section + section, .grid + .section-title, p + .section-title { margin-top: 40px; }

.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.how li { display: grid; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.how-num { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: var(--on-green); display: grid; place-items: center; font-weight: 800; }
.how p { font-size: 14px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.cat-card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.cat-card:hover { border-color: var(--green); }
.cat-head { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.cat-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); color: var(--green-text); display: grid; place-items: center; }
.cat-icon .icon { width: 24px; height: 24px; }
.cat-subs { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.cat-subs a:hover { color: var(--green-text); }
.more-btn { margin-top: 10px; padding: 0; border: 0; background: none; color: var(--green-text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.more-btn:hover { text-decoration: underline; }
.chip-more { border-style: dashed; color: var(--green-text); background: none; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

/* Картки */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--green); }
.card.is-closed { opacity: .7; }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--green); background: linear-gradient(135deg, var(--green-soft), var(--surface-2)); }
.card-placeholder .icon { width: 56px; height: 56px; stroke-width: 1.2; opacity: .75; }
.badge { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--green-text); font-size: 12px; font-weight: 700; }
.badge-closed { left: auto; right: 10px; background: var(--text); color: var(--surface); }
.badge.static { position: static; display: inline-block; margin-bottom: 8px; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px; flex: 1; }
.card-body h3 { font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-size: 17px; font-weight: 800; color: var(--green-text); }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: auto; color: var(--muted); font-size: 13px; }
.card-meta .icon { width: 15px; height: 15px; }
.card-extra { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Список */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab, .chip { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 14px; }
.tab:hover, .chip:hover { border-color: var(--green); }
.tab.on { background: var(--green); border-color: var(--green); color: var(--on-green); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { padding: 5px 12px; font-size: 13px; }
.chip.on { background: var(--green-soft); border-color: var(--green); color: var(--green-text); }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px; margin-bottom: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.filters .field { flex: 1 1 160px; }
.filters .field-narrow { flex: 1 1 100px; }
.results-count { margin-bottom: 12px; font-size: 14px; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 28px; }
.pager > :last-child { justify-self: end; }
.pager > :first-child { justify-self: start; }

/* Поля */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.field small, .contact-box small { font-size: 12px; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
input, select { height: 42px; }
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.input-prefix:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.input-prefix i { padding-left: 12px; color: var(--muted); font-style: normal; font-weight: 700; }
.input-prefix input { border: 0; box-shadow: none !important; background: none; padding-left: 4px; }

/* Панелі, сторінка запиту */
.panel { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.panel h2 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px; color: var(--muted); font-weight: 600; font-size: 14px; }
.back:hover { color: var(--green-text); }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 16px; min-width: 0; }
.detail-side { position: sticky; top: 84px; }
.detail-side h1 { font-size: 22px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.detail-price { margin: 10px 0; font-size: 26px; font-weight: 800; color: var(--green-text); }
.detail-side .panel { display: grid; gap: 10px; }
.detail-side .detail-price { margin: 0; }
.author { display: flex; align-items: center; gap: 12px; }
.contact-nick { text-align: center; font-weight: 700; color: var(--green-text); }

.gallery { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.gallery > img { width: 100%; max-height: 520px; object-fit: contain; background: var(--surface-2); }
.gallery-placeholder { aspect-ratio: 16 / 7; }
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.thumbs button { flex: none; width: 76px; height: 58px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: none; cursor: pointer; }
.thumbs button.on { border-color: var(--green); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.response { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.response:first-of-type { margin-top: 12px; }
.response > div { display: grid; gap: 6px; min-width: 0; }
.response-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.quote { padding: 12px 14px; border-radius: 12px; background: var(--green-soft); }
.panel .stack { margin-top: 12px; }
.panel .stack .btn { justify-self: start; }

/* Форма запиту */
.form { max-width: 760px; margin: 0 auto; display: grid; gap: 18px; }
.form h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.photo-list { display: flex; flex-wrap: wrap; gap: 10px; }
.photo { position: relative; width: 104px; height: 80px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.photo button .icon { width: 14px; height: 14px; }
.photo-add { display: grid; place-items: center; align-content: center; gap: 2px; border-style: dashed; background: var(--surface-2); color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.photo-add:hover { border-color: var(--green); color: var(--green-text); }
.contact-box { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: var(--green-soft); }
.contact-box > div:last-child { display: grid; gap: 2px; }
.contact-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: var(--on-green); display: grid; place-items: center; flex: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

.me-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 32px; }
.me-head h1 { font-size: 22px; font-weight: 800; }

/* Порожні стани, завантаження */
.empty { padding: 56px 20px; text-align: center; border-radius: var(--radius); border: 1px dashed var(--border); background: var(--surface); display: grid; gap: 8px; justify-items: center; }
.empty-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--green-soft); color: var(--green-text); display: grid; place-items: center; }
.loading { display: flex; justify-content: center; gap: 6px; padding: 48px 0; }
.loading span { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; }
.loading span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

/* Вікно входу */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5, 15, 10, .55); backdrop-filter: blur(3px); }
.modal { position: relative; width: 100%; max-width: 420px; padding: 32px 26px 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; gap: 14px; text-align: center; }
.modal h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.modal .field { text-align: left; }
.modal-close { position: absolute; top: 12px; right: 12px; border: 0; }
.modal-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: var(--green-soft); color: var(--green-text); display: grid; place-items: center; }
.modal-icon .icon { width: 28px; height: 28px; }
.tg-widget { min-height: 48px; display: grid; place-items: center; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border); font-size: 13px; text-align: left; color: var(--muted); }
.notice b { color: var(--text); }

#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: rise .2s ease-out; }
.toast-error { background: var(--danger); color: #fff; }
:root[data-theme="dark"] .toast-error { color: #2a0808; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 20px; padding-bottom: 20px; color: var(--muted); font-size: 13px; }

/* Підвал із посиланнями */
.footer-row { flex-direction: column; gap: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; font-weight: 600; color: var(--text); }
.footer-links a:hover { color: var(--green-text); }
.footer-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Інформаційні сторінки */
.prose { max-width: 820px; margin: 0 auto; }
.prose h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.prose h2 { font-size: 18px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--text); line-height: 1.65; }
.prose ul { margin: 8px 0; padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose a { color: var(--green-text); font-weight: 600; }
.prose a:hover { text-decoration: underline; }
.sitemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 28px; }
.sitemap ul { list-style: none; padding: 0; }
.sitemap h2 a { color: var(--text); }

/* Тарифи */
.pricing-head { max-width: 640px; margin: 8px auto 28px; text-align: center; }
.pricing-head h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 26px; }
.plan h2 { font-size: 20px; margin: 0; }
.plan-popular { border: 2px solid var(--green); box-shadow: var(--shadow); }
.plan-tag { position: absolute; top: -12px; left: 24px; padding: 3px 12px; border-radius: 999px; background: var(--green); color: var(--on-green); font-size: 12px; font-weight: 700; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 6px; }
.plan-price b { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.plan ul { list-style: none; padding: 0; margin: 8px 0 20px; display: grid; gap: 10px; flex: 1; align-content: start; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan li .icon { color: var(--green-text); margin-top: 2px; }
.pricing-note { text-align: center; margin-top: 20px; }

/* Підтвердження номера */
.code-input { text-align: center; font-size: 24px; font-weight: 800; letter-spacing: .35em; height: 54px; }
.dev-code { font-size: 18px; letter-spacing: .12em; color: var(--green-text) !important; }
.verify-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.link-btn { border: 0; padding: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--green-text); cursor: pointer; }
.link-btn:disabled { color: var(--muted); cursor: default; }
.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; margin: -16px 0 32px; border-radius: var(--radius); background: var(--green-soft); border: 1px solid var(--green); font-weight: 600; }
.verified-line { display: flex; align-items: center; gap: 8px; margin: -16px 0 32px; color: var(--green-text); font-weight: 600; font-size: 14px; }

/* Формати каталогу */
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.results-bar .results-count { margin: 0; }
.view-switch { display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.view-switch button { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.view-switch button .icon { width: 18px; height: 18px; }
.view-switch button.on { background: var(--green-soft); color: var(--green-text); }

.rows { display: grid; gap: 12px; }
.row-card { display: flex; gap: 16px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .15s, box-shadow .15s; }
.row-card:hover { border-color: var(--green); box-shadow: var(--shadow); }
.row-media { flex: 0 0 200px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.row-media img { width: 100%; height: 100%; object-fit: cover; }
.row-media .card-placeholder .icon { width: 44px; height: 44px; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.row-sub { font-size: 12px; font-weight: 700; color: var(--green-text); }
.row-body h3 { font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.row-excerpt { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.row-foot .card-meta { margin-top: 0; }

.lines { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.line { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.line + .line { border-top: 1px solid var(--border); }
.line:hover { background: var(--surface-2); }
.line-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--green-soft); color: var(--green-text); }
.line-icon img { width: 100%; height: 100%; object-fit: cover; }
.line-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.line-main b, .line-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-main b { font-size: 15px; font-weight: 600; }
.line-main small { font-size: 12px; color: var(--muted); }
.line-price { font-size: 14px; font-weight: 800; color: var(--green-text); white-space: nowrap; }
.row-card.is-closed, .line.is-closed { opacity: .7; }

/* Стрічка запитів на телефоні */
body.feed-open { overflow: hidden; }
.feed { position: fixed; inset: 0; z-index: 40; background: var(--bg); }
.feed-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(rgba(0, 0, 0, .5), transparent); color: #fff; pointer-events: none; }
.feed-top > * { pointer-events: auto; }
.feed-top .icon-btn { background: rgba(0, 0, 0, .35); border-color: transparent; color: #fff; }
.feed-counter { font-size: 13px; font-weight: 700; }
.feed-logo { margin-left: auto; font-weight: 800; }
.feed-logo b { color: #7ef0ad; }
.feed-scroll { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.feed-scroll::-webkit-scrollbar { display: none; }
.slide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }
.slide-media { position: relative; flex: 0 0 46%; background: var(--surface-2); }
.slide-media .badge { top: 62px; left: 14px; }
.slide-photos { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slide-photos::-webkit-scrollbar { display: none; }
.slide-photos img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.slide-placeholder { height: 100%; }
.slide-placeholder .icon { width: 84px; height: 84px; }
.slide-count { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700; }
.slide-count .icon { width: 14px; height: 14px; }
.slide-info { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.slide-price { font-size: 24px; font-weight: 800; color: var(--green-text); letter-spacing: -.01em; }
.slide-info h2 { font-size: 19px; line-height: 1.3; font-weight: 800; overflow-wrap: anywhere; }
.slide-info .card-meta { margin-top: 0; }
.slide-text { min-height: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; color: var(--muted); font-size: 15px; white-space: pre-line; }
.slide-more { font-size: 14px; }
.slide-author { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.slide-actions { display: flex; gap: 10px; margin-top: auto; }
.slide-actions .btn { height: 48px; }
.slide-actions > :first-child { flex: 1; }
.slide-icon-btn { width: 48px; padding: 0; flex: none; }
.feed-hint { position: absolute; left: 50%; bottom: 120px; z-index: 3; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 999px; background: rgba(0, 0, 0, .75); color: #fff; font-size: 14px; font-weight: 600; pointer-events: none; animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -6px); } }

.feed.list-mode .feed-top { flex-wrap: wrap; row-gap: 8px; padding-bottom: 18px; background: linear-gradient(rgba(0, 0, 0, .6), transparent); }
.feed.list-mode .feed-logo { margin-left: auto; }
.feed-cats { flex: 0 0 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.feed-cats::-webkit-scrollbar { display: none; }
.feed-cats a { flex: none; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .35); color: #fff; font-size: 13px; font-weight: 700; }
.feed-cats a.on { background: #fff; color: #0b7d3c; }
.feed.list-mode .slide-media .badge { top: 112px; }
.slide-empty { display: grid; place-items: center; padding: 120px 16px 16px; }
.slide-empty .empty { width: 100%; }

/* Лайки та коментарі */
.social-counts { display: flex; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.social-counts > span { display: inline-flex; align-items: center; gap: 4px; }
.social-counts .icon { width: 15px; height: 15px; }
.social-counts .liked { color: #e0245e; }
.liked .icon { fill: currentColor; }
.reactions { display: flex; gap: 8px; margin-top: 4px; }
.react { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.react:hover { border-color: var(--green); }
.react.liked { color: #e0245e; border-color: #f3b4c7; background: color-mix(in srgb, #e0245e 8%, var(--surface)); }
.comments { display: grid; gap: 12px; margin-top: 12px; }
.comment-list { display: grid; }
.comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.comment:first-child { border-top: 0; padding-top: 4px; }
.comment-body { display: grid; gap: 4px; min-width: 0; flex: 1; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.comment-head b { font-size: 14px; }
.comment-tag { padding: 1px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green-text); font-size: 11px; font-weight: 700; }
.comment-body p { font-size: 15px; }
.comment-del { margin-left: auto; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.comment-del:hover { background: var(--surface-2); color: var(--danger); }
.comment-del .icon { width: 14px; height: 14px; }
.comment-empty { padding: 4px 0; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; }
.comment-form textarea { min-height: 44px; flex: 1; }
.comment-form .btn { flex: none; }
.comments-sheet { max-height: 86vh; display: flex; flex-direction: column; }
.comments-sheet .comments { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.comments-sheet .comment-list { overflow-y: auto; max-height: 52vh; overscroll-behavior: contain; }
.slide-rail { position: absolute; right: 12px; bottom: 12px; z-index: 1; display: grid; gap: 10px; }
.rail-btn { width: 52px; display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; border: 0; border-radius: 16px; background: rgba(0, 0, 0, .45); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.rail-btn .icon { width: 26px; height: 26px; }
.rail-btn.liked { color: #ff4d7d; }
.slide-media .slide-count { right: auto; left: 12px; }

/* Нижня панель для пропозиції */
.sheet-backdrop { place-items: end center; padding: 0; }
.sheet { max-width: 640px; border-radius: 22px 22px 0 0; text-align: left; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
.sheet h2 { padding-right: 36px; }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .detail-side { position: static; order: -1; }
}

@media (max-width: 640px) {
  .header-row { height: 58px; gap: 8px; }
  .logo { font-size: 18px; }
  .logo-mark, .logo-mark svg { width: 30px; height: 30px; }
  .header-actions { gap: 6px; }
  #create-btn { width: 40px; height: 40px; padding: 0; border-radius: 999px; }
  #create-btn span, .user-chip span:last-child { display: none; }
  .user-chip { padding: 3px; }
  #login-btn { padding: 0 12px; height: 38px; font-size: 14px; }
  .hero { padding: 30px 18px; }
  .search .btn { padding: 0 14px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px; }
  .card-price { font-size: 15px; }
  .row { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .form-actions .btn { flex: 1; }
  .view-switch button span { display: none; }
  .row-card { gap: 12px; padding: 10px; }
  .row-media { flex-basis: 110px; }
  .row-body h3 { font-size: 15px; }
  .row-excerpt { -webkit-line-clamp: 2; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* На середній ширині кнопка створення стискається до «+», щоб шапка не обрізалась */
@media (max-width: 820px) {
  #create-btn { width: 40px; height: 40px; padding: 0; border-radius: 999px; }
  #create-btn span { display: none; }
}
