/* =========================================================
   bato web app — стили
   Палитра и шрифт: bre.one/bato (navy / orange / cream / ink)
   Композиция и паттерны: e-commerce UI kit (карточки, чипы,
   плитки категорий, фильтры-сайдбар, сетка объявлений)
   ========================================================= */

:root {
  color-scheme: light;

  /* brand */
  --navy: #20256f;
  --navy-deep: #171b59;
  --navy-ink: #1f246f;
  --navy-muted: #3e4382;
  --orange: #f4513b;
  --orange-dark: #d93f2b;
  --orange-soft: #fff0ed;
  --orange-peach: #ffe2dc;
  --orange-light: #ff9a88;
  --cream: #faf9f5;
  --white: #ffffff;
  --ink: #171827;
  --muted: #6b6d79;
  --line: #e5e4df;
  --soft: #f1f1f6;
  --green: #e8f5ec;
  --green-ink: #1f7a45;
  --focus: #ff9a88;

  /* type */
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* radii */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --pill: 999px;

  /* elevation */
  --shadow-sm: 0 1px 2px rgba(23, 24, 39, 0.05), 0 1px 3px rgba(23, 24, 39, 0.06);
  --shadow: 0 10px 30px rgba(23, 24, 39, 0.08);
  --shadow-lg: 0 24px 60px rgba(23, 27, 89, 0.18);

  --container: 1280px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- buttons ---------- */
.primary-button,
.secondary-button,
.ghost-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-button {
  padding: 13px 22px;
  border-radius: var(--pill);
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(244, 81, 59, 0.24);
}

.primary-button:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

.secondary-button {
  padding: 12px 20px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.secondary-button.is-saved {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
}

.ghost-button {
  padding: 13px 22px;
  border-radius: var(--pill);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: var(--white);
}

.ghost-button--light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.link-button {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.link-button:hover {
  color: var(--orange);
}

/* ---------- chips & tags ---------- */
.chip {
  padding: 8px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

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

.chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

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

.chip-wrap--stack {
  flex-direction: column;
  flex-wrap: nowrap;
}

.chip--stack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
}

.chip-main {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-count {
  flex: 0 0 auto;
  padding: 1px 8px;
  border-radius: var(--pill);
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.chip.is-active .chip-count {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.filter-hint {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--pill);
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tag--soft {
  background: var(--soft);
  color: #3e4050;
}

.tag--accent {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.tag--green {
  background: var(--green);
  color: var(--green-ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge--trusted {
  background: var(--navy);
  color: var(--white);
}

.badge--soft {
  background: var(--soft);
  color: var(--muted);
}

/* ---------- avatars ---------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-muted) 100%);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.avatar--xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.avatar--sm {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.avatar--lg {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

/* ---------- form controls ---------- */
.input,
.select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input::placeholder {
  color: #9a9ca8;
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(32, 37, 111, 0.1);
}

.input--lg {
  padding: 15px 18px;
  font-size: 15px;
}

.input--area {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%236b6d79' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.select--sm {
  width: auto;
  padding: 8px 34px 8px 12px;
  font-size: 13px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: auto;
  height: 34px;
  display: block;
}

.brand-word {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.city-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  flex: 0 0 auto;
}

.city-button:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.city-caret {
  font-size: 10px;
  color: var(--muted);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 220px;
  padding: 6px 6px 6px 16px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--white);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(32, 37, 111, 0.1);
}

.search-icon {
  font-size: 14px;
  opacity: 0.65;
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 8px 0;
  text-overflow: ellipsis;
}

.search-input:focus {
  outline: none;
}

.search-input::placeholder {
  color: #9a9ca8;
}

.search-submit {
  padding: 10px 20px;
  border-radius: var(--pill);
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.18s ease;
}

.search-submit:hover {
  background: var(--navy-deep);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 16px;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.icon-button:hover {
  border-color: var(--navy);
  color: var(--navy);
  transform: translateY(-1px);
}

.counter {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--pill);
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.counter--accent {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.header-cta {
  padding: 12px 20px;
}

.subnav {
  border-top: 1px solid var(--line);
}

.subnav-inner {
  display: flex;
  gap: 6px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 24px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav-inner::-webkit-scrollbar {
  display: none;
}

.nav-button {
  padding: 8px 16px;
  border-radius: var(--pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-button:hover {
  color: var(--navy);
  background: var(--soft);
}

.nav-button.is-active {
  background: var(--navy);
  color: var(--white);
}

/* ---------- layout ---------- */
.app-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 24px 80px;
}

.view[hidden] {
  display: none;
}

.view.is-active {
  animation: view-in 0.28s ease;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}

.eyebrow--light {
  color: var(--orange-light);
}

.screen-kicker {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.screen-kicker--light {
  color: rgba(255, 255, 255, 0.7);
}

.section {
  margin-top: 44px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(22px, 2.4vw, 30px);
}

.section-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-count {
  padding: 4px 10px;
  border-radius: var(--pill);
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.section-lead {
  margin-top: 8px;
  max-width: 640px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  padding: 52px clamp(24px, 5vw, 56px);
  border-radius: var(--radius-xl);
  background: radial-gradient(120% 140% at 88% 0%, #2c3488 0%, rgba(44, 52, 136, 0) 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 62%, #10143f 100%);
  color: var(--white);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 81, 59, 0.42) 0%, rgba(244, 81, 59, 0) 70%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.hero-copy h1 {
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-text {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.hero-stats {
  display: flex;
  gap: 34px;
  margin: 14px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  width: 100%;
}

.hero-stats dt {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.hero-stats dd {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 700;
}

.hero-preview {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: center;
  max-width: 420px;
  width: 100%;
  margin-left: auto;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13px;
  box-shadow: var(--shadow);
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble--user {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-end;
  background: var(--white);
  color: var(--ink);
  border-bottom-right-radius: 6px;
}

.chat-bubble--bato {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom-left-radius: 6px;
  backdrop-filter: blur(6px);
}

.chat-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--soft);
  font-size: 18px;
}

.chat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chat-tags li {
  padding: 3px 9px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
  font-weight: 600;
}

.chat-bubble--result {
  align-self: flex-start;
  background: var(--white);
  color: var(--ink);
}

.mini-listing {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--cream);
}

.mini-listing-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--orange-soft);
  font-size: 20px;
}

.mini-listing-title {
  font-size: 13px;
  font-weight: 600;
}

.mini-listing-meta {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- categories ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--shadow);
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--tint, var(--soft));
  font-size: 22px;
}

.category-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- communities (groups & channels) ---------- */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 14px;
}

.community-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--tint, var(--soft)) 0%, var(--white) 72%);
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.community-card:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--shadow);
}

.community-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.community-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--white);
  font-size: 21px;
  box-shadow: var(--shadow-sm);
}

.community-card-kind {
  padding: 3px 9px;
  border-radius: var(--pill);
  background: rgba(32, 37, 111, 0.08);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.community-card-name {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.community-card-meta {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.community-card-link {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}

.community-card:hover .community-card-link {
  color: var(--orange);
}

/* ---------- listing cards ---------- */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.listing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.listing-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow);
}

.listing-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, hsl(var(--hue) 62% 94%) 0%, hsl(var(--hue) 46% 86%) 100%);
  overflow: hidden;
}

.listing-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 70% at 70% 20%, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 60%);
}

.listing-emoji {
  font-size: 56px;
  filter: drop-shadow(0 10px 18px rgba(23, 24, 39, 0.18));
  transition: transform 0.3s ease;
}

.listing-card:hover .listing-emoji {
  transform: scale(1.06) rotate(-2deg);
}

.listing-photos {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: var(--pill);
  background: rgba(23, 24, 39, 0.55);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.listing-flag {
  position: absolute;
  right: 52px;
  top: 10px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: var(--navy);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.listing-source-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  max-width: calc(100% - 56px);
  padding: 4px 9px;
  border-radius: var(--pill);
  background: rgba(23, 24, 39, 0.62);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.listing-promoted {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: var(--orange);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.listing-card--external {
  border-style: solid;
  border-color: rgba(32, 37, 111, 0.16);
}

.community-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.community-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--tint, var(--soft));
  font-size: 12px;
}

.community-name {
  min-width: 0;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-kind {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

.favorite-button {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 17px;
  box-shadow: var(--shadow-sm);
  transition: color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.favorite-button:hover {
  transform: scale(1.08);
  color: var(--orange);
}

.favorite-button.is-saved {
  background: var(--orange);
  color: var(--white);
}

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

.listing-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.listing-title button {
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-title button:hover {
  color: var(--navy);
}

.listing-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.listing-meta {
  font-size: 12px;
  color: var(--muted);
}

.seller-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.seller-name {
  font-weight: 600;
  color: var(--ink);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-rating {
  margin-left: auto;
  color: var(--ink);
  font-weight: 600;
}

.seller-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  color: var(--green-ink);
  font-size: 10px;
  font-weight: 700;
}

/* ---------- page head ---------- */
.page-head {
  margin-bottom: 24px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}

.breadcrumbs button {
  color: var(--muted);
  font-size: 12px;
}

.breadcrumbs button:hover {
  color: var(--navy);
}

.page-head h1 {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.page-lead {
  margin-top: 10px;
  max-width: 680px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- search layout & filters ---------- */
.search-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.data-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  padding: 20px;
}

.filters {
  position: sticky;
  top: calc(var(--header-h) + 58px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filters-head h2 {
  font-size: 16px;
}

.filter-group {
  display: grid;
  gap: 10px;
}

.filter-group legend {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.filters-foot .primary-button {
  width: 100%;
}

.results {
  min-width: 0;
}

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

.results-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 12px;
  border-radius: var(--pill);
  border: 1px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.scope-chip[hidden] {
  display: none;
}

.scope-chip:hover {
  background: var(--navy);
  color: var(--white);
}

.scope-chip-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 9px;
}

.scope-chip:hover .scope-chip-reset {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.results-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.search-note {
  margin: -6px 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.search-note[hidden] {
  display: none;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- empty state ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 56px 24px;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background: var(--white);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-icon {
  font-size: 34px;
}

.empty-state h3 {
  font-size: 18px;
}

.empty-state p {
  max-width: 420px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state .primary-button {
  margin-top: 8px;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.empty-actions .primary-button {
  margin-top: 0;
}

.empty-actions [hidden] {
  display: none;
}

/* ---------- promo band ---------- */
.promo-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 36px clamp(22px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--navy) 0%, #2a3080 100%);
  color: var(--white);
}

.promo-band h2 {
  font-size: clamp(20px, 2.2vw, 28px);
  margin-bottom: 10px;
}

.promo-band p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

/* ---------- plans ---------- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.plan-grid--full {
  margin-bottom: 24px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.plan-card--free {
  background: var(--orange-soft);
  border-color: var(--orange-peach);
}

.plan-card h3 {
  font-size: 15px;
  font-weight: 700;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.plan-price span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.plan-features {
  display: grid;
  gap: 7px;
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.plan-card .secondary-button {
  margin-top: auto;
  width: 100%;
}

.plan-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: var(--navy);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.promo-note {
  margin-top: 24px;
}

.promo-note h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.promo-note p {
  color: var(--muted);
  font-size: 14px;
}

.promo-note code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--soft);
  font-size: 13px;
}

/* ---------- stacks (subscriptions, deals, chats) ---------- */
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.query-form {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.query-form .input {
  flex: 1 1 auto;
}

.subscription-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.subscription-query {
  font-size: 15px;
  font-weight: 600;
}

.subscription-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.subscription-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ---------- deals ---------- */
.deal-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deal-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.deal-title {
  font-size: 16px;
  font-weight: 600;
}

.deal-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.deal-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

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

.deal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status--active {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.status--done {
  background: var(--green);
  color: var(--green-ink);
}

.status--pending {
  background: var(--soft);
  color: var(--navy);
}

/* ---------- chats ---------- */
.chat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.chat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.chat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.chat-name {
  font-size: 15px;
  font-weight: 600;
}

.chat-time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.chat-listing {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--orange);
}

.chat-message {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink);
}

.chat-translation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background: var(--soft);
  font-size: 12px;
  color: var(--muted);
}

.chat-translation span {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  color: var(--navy);
}

.chat-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--pill);
  background: var(--orange);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}

/* ---------- profile ---------- */
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 22px;
  align-items: start;
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: calc(var(--header-h) + 58px);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-head h1 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.profile-handle {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--soft);
}

.profile-stats dt {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-stats dd {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

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

.reviews-card .section-heading {
  margin-bottom: 0;
}

.rating-pill {
  padding: 5px 12px;
  border-radius: var(--pill);
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

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

.review-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
}

.review-card--compact {
  padding: 12px;
}

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

.review-author {
  font-size: 13px;
  font-weight: 600;
}

.review-date {
  font-size: 11px;
  color: var(--muted);
}

.review-stars {
  margin-left: auto;
  color: var(--orange);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.review-text {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink);
}

.review-reply {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: var(--soft);
  font-size: 12px;
  color: var(--muted);
}

.review-reply span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--navy);
}

/* ---------- support ---------- */
.support-form {
  display: grid;
  gap: 16px;
  max-width: 640px;
}

.support-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.support-status {
  font-size: 13px;
  color: var(--green-ink);
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 24px;
  flex-wrap: wrap;
}

.brand--footer .brand-word {
  font-size: 20px;
}

.footer-tagline {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
}

.footer-nav button {
  color: var(--muted);
}

.footer-nav button:hover {
  color: var(--navy);
}

.footer-legal {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- drawer (карточка объявления) ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(17, 20, 45, 0.45);
  backdrop-filter: blur(3px);
  animation: fade-in 0.2s ease;
}

.drawer-backdrop[hidden] {
  display: none;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: min(560px, 100%);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  animation: drawer-in 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer[hidden] {
  display: none;
}

@keyframes drawer-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}

.drawer-close:hover {
  background: var(--white);
  color: var(--orange);
}

.drawer-gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, hsl(var(--hue) 62% 94%) 0%, hsl(var(--hue) 46% 86%) 100%);
}

.drawer-emoji {
  font-size: 96px;
  filter: drop-shadow(0 18px 30px rgba(23, 24, 39, 0.2));
}

.drawer-counter {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 5px 12px;
  border-radius: var(--pill);
  background: rgba(23, 24, 39, 0.58);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.drawer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 24px 32px;
}

.drawer-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer-content h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.025em;
  padding-right: 24px;
}

.drawer-price {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.drawer-description {
  font-size: 14px;
  color: #3e4050;
  line-height: 1.6;
}

.drawer-seller {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--cream);
}

.drawer-seller-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.drawer-source {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--tint, var(--soft));
}

.drawer-source-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--white);
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.drawer-source-name {
  font-size: 14px;
  font-weight: 700;
}

.drawer-source-meta {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.drawer-seller-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.drawer-actions .primary-button {
  flex: 1 1 200px;
}

.drawer-reviews {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.drawer-reviews h3 {
  font-size: 15px;
}

.drawer-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.drawer-note--source {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--cream);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  transform: translate(-50%, 24px);
  max-width: min(520px, calc(100vw - 32px));
  padding: 13px 20px;
  border-radius: var(--pill);
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- city menu ---------- */
.city-menu {
  position: fixed;
  z-index: 70;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.city-menu[hidden] {
  display: none;
}

.city-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  text-align: left;
  font-size: 13px;
  color: var(--ink);
}

.city-option:hover {
  background: var(--soft);
  color: var(--navy);
}

/* ---------- mobile bottom nav ---------- */
.mobile-nav {
  display: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .header-inner {
    gap: 12px;
  }

  .header-cta .cta-label {
    display: none;
  }

  .search {
    min-width: 160px;
  }
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .hero-preview {
    max-width: none;
    margin-left: 0;
  }

  .search-layout {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-card {
    position: static;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }

  .brand {
    order: 1;
  }

  .city-button {
    order: 2;
  }

  .header-actions {
    order: 3;
    margin-left: auto;
  }

  .search {
    order: 4;
    flex-basis: 100%;
  }

  .subnav-inner {
    padding: 6px 16px 8px;
  }

  .app-shell {
    padding: 16px 16px 96px;
  }

  .search-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .filters {
    position: static;
    order: 2;
  }

  .promo-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .query-form {
    flex-direction: column;
  }

  .subscription-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .drawer {
    width: 100%;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    top: 48px;
  }

  .site-footer {
    margin-bottom: 68px;
  }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 8px 10px;
    border-radius: var(--pill);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
  }

  .mobile-nav-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1 1 0;
    padding: 6px 2px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
  }

  .mobile-nav-button span[aria-hidden='true'] {
    font-size: 17px;
  }

  .mobile-nav-button.is-active {
    background: var(--soft);
    color: var(--navy);
  }

  .mobile-nav-button--fab {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    margin-top: -22px;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(244, 81, 59, 0.36);
  }

  .mobile-nav-button--fab span[aria-hidden='true'] {
    font-size: 22px;
  }

  .toast {
    bottom: 88px;
  }

  .header-actions .icon-button:nth-child(2) {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-cta {
    padding: 11px 16px;
  }

  .hero {
    padding: 30px 22px;
    border-radius: var(--radius-lg);
  }

  .hero-stats {
    gap: 20px;
  }

  .hero-stats dd {
    font-size: 18px;
  }

  .section {
    margin-top: 32px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  }

  .community-grid {
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 12px;
  }

  .community-card {
    padding: 13px;
  }

  .community-card-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .community-card-name {
    font-size: 13px;
  }

  .community-row {
    gap: 5px;
    font-size: 11px;
  }

  .listing-source-badge {
    max-width: calc(100% - 52px);
  }

  .category-card {
    padding: 12px;
  }

  .category-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .category-label {
    font-size: 12px;
  }

  .listing-grid {
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 12px;
  }

  .listing-body {
    padding: 12px;
  }

  .listing-price {
    font-size: 16px;
  }

  .listing-emoji {
    font-size: 40px;
  }

  .seller-row {
    display: none;
  }

  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .drawer-gallery {
    aspect-ratio: 4 / 3;
  }

  .drawer-emoji {
    font-size: 72px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
