/* ── Slando — base stylesheet (design-system aligned) ─────────────────────
   Tokens, layout primitives, header/footer, card, buttons, inputs, badges,
   breadcrumbs, section header. Page-specific styles live in home.css,
   search.css, listing.css. */

:root {
  /* Colors */
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1a1a2e;
  --ink-soft: #4a4a66;
  --muted: #8a8a99;
  --line: #e6e6ec;
  --line-soft: #f0f0f4;
  --accent: #e94560;
  --accent-hover: #d63a52;
  --accent-soft: rgba(233, 69, 96, 0.08);
  --accent-ring: rgba(233, 69, 96, 0.12);
  --success: #5a9a4e;
  --info: #5b7dbd;
  --tg: #0088cc;
  --tg-hover: #0077b5;
  --danger: #d14343;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 14px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(20, 20, 40, 0.06);
  --shadow-md: 0 4px 16px rgba(20, 20, 40, 0.10);
  --shadow-lg: 0 8px 32px rgba(20, 20, 40, 0.14);

  /* Layout */
  --header-h: 64px;
  --container: 1320px;
  --container-narrow: 1200px;

  /* Hero gradient (used once, on home) */
  --hero-gradient: linear-gradient(120deg, #1a1a2e 0%, #2d2d4e 55%, #e94560 100%);
}

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

/* The HTML `hidden` attribute is used by auth.js to flip header chunks
   between anonymous/user states. Flex/inline-flex classes on the same
   element beat the user-agent `[hidden] { display: none }` rule, so pin
   it with !important to keep `hidden` working on any display type. */
[hidden] { display: none !important; }

html, body { min-height: 100%; }

/* Prevent any overflowing child from creating a horizontal scrollbar.
   Content that legitimately scrolls horizontally (gallery thumbs, tabs)
   uses overflow-x: auto on a local wrapper, not the root. */
html { overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { cursor: pointer; border: none; background: none; }

/* ── Header ──────────────────────────────────────────────────────────── */

.site-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}
.site-header__inner {
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
}
.brand .brand__dot { color: var(--accent); }

.header__spacer { flex: 1; min-width: 0; }
.header__actions { display: flex; align-items: center; gap: 8px; min-width: 0; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.icon-btn__glyph {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
}
.icon-btn__count {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 10px;
  display: none;
  text-align: center;
  line-height: 1.4;
}
.icon-btn__count.is-visible { display: inline-block; }

.lang-toggle {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--surface);
  transition: border-color 0.15s, color 0.15s;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

.hdr-post {
  background: var(--accent);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
  transition: background 0.15s;
}
.hdr-post:hover { background: var(--accent-hover); }

/* ── Content frame ───────────────────────────────────────────────────── */

main { flex: 1; width: 100%; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Section header ──────────────────────────────────────────────────── */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.section-header__sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}
.see-all {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s;
}
.see-all:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Breadcrumbs ─────────────────────────────────────────────────────── */

.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--muted); transition: color 0.15s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--muted); }
.breadcrumbs .current { color: var(--ink); font-weight: 500; }

/* ── Card ────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}
.card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eceef2;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__no-photo {
  color: var(--muted);
  font-size: 13px;
}
.card__photo-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.card__member-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(90, 154, 78, 0.92);
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.2px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.card__fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--muted);
  box-shadow: 0 1px 3px rgba(20, 20, 40, 0.1);
  transition: transform 0.18s, color 0.15s, background 0.15s;
  z-index: 2;
}
.card__fav-btn:hover { transform: scale(1.08); background: #fff; color: var(--accent); }
.card__fav-btn.is-active { color: var(--accent); }

.card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card__cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.card__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
  margin-bottom: 6px;
}
.card__price {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.3px;
  line-height: 1;
}
.card__price .no-price { color: var(--muted); font-weight: 500; font-size: 14px; }

.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--muted);
}
.card__meta .card__city {
  font-weight: 600;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card__meta .card__time {
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Badges ──────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.badge--cat {
  background: var(--accent-soft);
  color: var(--accent);
}
.badge--cond {
  background: #f3f0ea;
  color: var(--ink-soft);
  text-transform: capitalize;
}
.badge--sold {
  background: rgba(26, 26, 46, 0.8);
  color: #fff;
  letter-spacing: 1px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ── Grid ────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1200px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (max-width: 800px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 480px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: var(--surface); color: var(--ink-soft); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2d2d4e; }
.btn--tg { background: var(--tg); color: #fff; }
.btn--tg:hover { background: var(--tg-hover); }
.btn--block { width: 100%; }
.btn--lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Panel (used for filters card, listing info, seller card, description) ── */

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

/* ── Empty state ─────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 15px;
}
.empty-state .emoji {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.6;
}

/* ── Email-verify banner (T2.9) ──────────────────────────────────────── */

/* Base banner — shared between the layout-level (.verify-banner--global)
   and any page-specific usage. */
.verify-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  border-radius: 10px;
  margin-bottom: 16px;
}
.verify-banner__body { flex: 1; min-width: 0; }
.verify-banner__title {
  font-weight: 700;
  font-size: 14px;
}
.verify-banner__sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.verify-banner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.verify-banner__close {
  background: transparent;
  border: 0;
  padding: 4px 8px;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
}
.verify-banner__close:hover { color: var(--ink); background: rgba(0, 0, 0, 0.04); }

/* Layout-level banner sits between header and <main>, spans the content
   width, and gets a bit more breathing room than the legacy in-panel one. */
.verify-banner--global {
  max-width: var(--container);
  margin: 12px auto 0;
  width: calc(100% - 32px);
}
@media (max-width: 700px) {
  .verify-banner--global {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .verify-banner--global .verify-banner__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ── Footer ──────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  margin-top: 60px;
}
.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.site-footer .brand {
  color: #fff;
  font-size: 28px;
  margin-bottom: 12px;
}
.site-footer .brand .brand__dot { color: var(--accent); }
.site-footer__about {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.6;
  max-width: 300px;
}
.site-footer h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer a {
  color: rgba(255, 255, 255, 0.65);
  display: block;
  padding: 4px 0;
  font-size: 14px;
  transition: color 0.15s;
}
.site-footer a:hover { color: #fff; }
.site-footer__bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 880px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  .site-footer__inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Form group (.fg) — label + input/select/textarea stacked ────────── */

.fg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.fg label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.fg input,
.fg select,
.fg textarea {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fg textarea {
  height: auto;
  padding: 10px 14px;
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}
.fg select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%238a8a99' d='M5 6L0 0h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.fg small {
  color: var(--muted);
  font-size: 12px;
}

/* ── Tabs (used on profile, chat, anywhere else) ─────────────────────── */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
}
.tab {
  background: transparent;
  border: none;
  padding: 12px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Avatar (circle w/ initial) ──────────────────────────────────────── */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.3px;
  border-radius: 50%;
  flex-shrink: 0;
  user-select: none;
}
.avatar--sm { width: 32px; height: 32px; font-size: 13px; }
.avatar--md { width: 48px; height: 48px; font-size: 18px; }
.avatar--lg { width: 72px; height: 72px; font-size: 26px; }

/* ── Stat block (number over label) ──────────────────────────────────── */

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat__value {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.stat__label {
  font-size: 12px;
  color: var(--muted);
}

/* ── Toggle row (label left, switch right) ───────────────────────────── */

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row__label { font-size: 15px; color: var(--ink); }
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #d4d4dc;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: left 0.2s;
}
.toggle.is-on { background: var(--accent); }
.toggle.is-on::after { left: 20px; }

/* ── Verified pill (seller profile, etc.) ────────────────────────────── */

.verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(90, 154, 78, 0.12);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
}

/* ── Trust tier pill + granular identity badges ──────────────────────── */

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.trust-pill--trusted {
  background: rgba(79, 70, 229, 0.12);
  color: #4338ca;
  border: 1px solid rgba(79, 70, 229, 0.25);
}
.trust-pill--standard {
  background: rgba(90, 154, 78, 0.12);
  color: var(--success);
  border: 1px solid rgba(90, 154, 78, 0.25);
}

.profile-hero__badges,
.seller-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.seller-badges { margin-top: 4px; }

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.045);
  color: var(--muted);
  border: 1px solid var(--line-soft, rgba(0, 0, 0, 0.06));
}
.trust-badge--email {
  background: rgba(90, 154, 78, 0.08);
  color: var(--success);
  border-color: rgba(90, 154, 78, 0.2);
}
.trust-badge--tg {
  background: rgba(44, 130, 201, 0.08);
  color: #1d6fa5;
  border-color: rgba(44, 130, 201, 0.2);
}
.trust-badge--age { color: var(--ink-soft); }

.seller-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.seller-rating {
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Danger outline button ───────────────────────────────────────────── */

.btn--danger-outline {
  background: #fff;
  color: var(--danger);
  border-color: var(--danger);
}
.btn--danger-outline:hover {
  background: var(--danger);
  color: #fff;
}

/* ── Header: log-in button + account menu ────────────────────────────── */

.hdr-login {
  white-space: nowrap;
}

.hdr-account {
  position: relative;
}
.hdr-account__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}
.hdr-account__btn:hover {
  background: #f3f1ea;
  border-color: var(--line);
}
.hdr-account__name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hdr-account__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 6px;
  z-index: 50;
}
.hdr-account__menu a,
.hdr-account__menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.hdr-account__menu a:hover,
.hdr-account__menu button:hover {
  background: #f3f1ea;
}
.hdr-account__sep {
  height: 1px;
  background: var(--line);
  margin: 4px 2px;
}

/* ── Header: unread-messages badge ────────────────────────────────────
 * The pill next to the display name is desktop-only (hidden on ≤640px,
 * same breakpoint that collapses .hdr-account__name). On mobile, the
 * badge inside the dropdown menu item is the only surface. */
.hdr-unread {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  padding: 1px 7px;
  border-radius: 10px;
  line-height: 1.4;
  text-align: center;
}
.hdr-unread[hidden] { display: none; }

/* Menu-item layout so label + badge sit on one row, right-aligned badge. */
.hdr-account__menu a.hdr-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hdr-menu-item__badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  padding: 1px 7px;
  border-radius: 10px;
  line-height: 1.4;
  text-align: center;
}
.hdr-menu-item__badge[hidden] { display: none; }

/* ── Header: mobile responsive ───────────────────────────────────────── */

/* ≤ 640px: drop the display name — avatar initial is enough */
@media (max-width: 640px) {
  .hdr-account__name { display: none; }
  /* Hide the header-level unread pill on mobile — the menu-item badge
     inside the dropdown remains, per product requirement. */
  .hdr-unread { display: none; }
  .hdr-account__btn { padding: 4px 8px 4px 4px; gap: 6px; }
  .header__actions { gap: 4px; }
  /* Login button: tighten to fit */
  .hdr-login { padding: 0 12px; }
}

/* ≤ 480px: hide "Post listing" text — keep the ＋ sign (anon only) */
@media (max-width: 480px) {
  .hdr-post__label { display: none; }
  .hdr-post { padding: 6px 10px; }
  /* Shrink brand slightly */
  .brand { font-size: 22px; }
  .site-header__inner { padding: 0 16px; gap: 10px; }
  /* Lang toggle: a little tighter */
  .lang-toggle { padding: 5px 8px; font-size: 11px; }
}

/* ≤ 400px: last resort — hide Favorites text, keep ♡ glyph + badge */
@media (max-width: 400px) {
  .icon-btn__label { display: none; }
  .icon-btn { padding: 8px 6px; gap: 2px; }
}

/* ── Container: tighter padding at very small sizes ──────────────────── */
@media (max-width: 400px) {
  .container, .container--narrow { padding: 0 14px; }
}

/* ── Shared modal (used by /settings, /listing/:id, /chats) ─────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--panel, #fff);
  border-radius: 14px;
  padding: 24px;
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.modal__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}
.modal__body {
  color: var(--ink);
  font-size: 14px;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.msg-compose__summary {
  background: var(--surface-muted, #f7f5ee);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}
.msg-compose__title {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-compose__price {
  color: var(--accent, #2a72c7);
  font-weight: 700;
  margin-top: 2px;
}
.msg-compose__status {
  font-size: 13px;
  min-height: 18px;
}
.msg-compose__status--ok { color: #16a34a; }
.msg-compose__status--err { color: var(--danger, #dc2626); }
.msg-compose__status a { color: inherit; text-decoration: underline; }

/* ── Cookie-consent banner ────────────────────────────────────────────
 * Fixed along the bottom of the viewport. Hidden by default; consent.js
 * reveals it on first visit and tears it down when the user chooses. */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  max-width: 960px;
  margin: 0 auto;
}
.cookie-banner[hidden] { display: none; }

.cookie-banner__body {
  flex: 1 1 280px;
  min-width: 0;
}
.cookie-banner__title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.cookie-banner__text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.cookie-banner__link {
  color: var(--accent);
  text-decoration: underline;
  margin-left: 4px;
  white-space: nowrap;
}

.cookie-banner__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .cookie-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 12px;
    gap: 10px;
  }
  .cookie-banner__actions { width: 100%; justify-content: flex-end; }
}
