:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #f1f4f3;
  --card: #ffffff;
  --card-strong: #fff8df;
  --ink: #17212b;
  --text: #17212b;
  --muted: #7b8491;
  --line: #e4e9ee;
  --blue: #2f9fd7;
  --deep-blue: #e8f4fa;
  --gold: #ffc928;
  --green: #55bd72;
  --orange: #f5a623;
  --red: #ef4444;
  --shadow: 0 10px 24px rgba(23, 33, 43, 0.08);
}

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

html {
  min-width: 320px;
  background: var(--bg);
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.web-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(360px, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 12px clamp(14px, 3.5vw, 40px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(228, 233, 238, 0.92);
  box-shadow: 0 8px 24px rgba(23, 33, 43, 0.05);
  backdrop-filter: blur(14px);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  font-weight: 850;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 14px;
  background: #f1f4f3;
  border: 1px solid var(--line);
}

.search-panel {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px auto;
  gap: 10px;
}

.search-field,
.city-field,
.toolbar select {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 14px;
  border-radius: 14px;
  background: #f1f3f4;
  border: 1px solid var(--line);
  box-shadow: none;
}

.search-field span,
.city-field span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-field input,
.city-field select,
.toolbar select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-weight: 750;
}

.city-field select,
.toolbar select {
  color-scheme: light;
}

.search-field input::placeholder {
  color: var(--muted);
}

.search-button,
.post-button,
.login-button,
.ghost-link {
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 850;
  white-space: nowrap;
}

.search-button,
.post-button {
  color: #ffffff;
  background: var(--green);
  box-shadow: 0 10px 22px rgba(85, 189, 114, 0.18);
}

.login-button,
.ghost-link {
  color: var(--text);
  background: #f1f4f3;
  border: 1px solid var(--line);
  box-shadow: none;
}

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

.web-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 22px;
  padding: 22px clamp(14px, 3.5vw, 40px) 44px;
}

.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 14px;
}

.side-section,
.hero-band,
.toolbar,
.listing-card {
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.side-section {
  padding: 16px;
}

.side-section h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.profile-tile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-tile img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 50%;
  background: #f1f4f3;
  border: 2px solid #e4e9ee;
}

.profile-tile strong,
.profile-tile span {
  display: block;
}

.profile-tile strong {
  color: var(--ink);
  font-weight: 850;
}

.profile-tile span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  color: var(--muted);
  border-radius: 12px;
  background: #f7f9f8;
  border: 1px solid var(--line);
  text-align: left;
  font-weight: 750;
}

.category-button.active,
.category-button:hover {
  color: var(--ink);
  border-color: rgba(85, 189, 114, 0.62);
  box-shadow: 0 0 0 2px rgba(85, 189, 114, 0.12);
}

.category-button.active small,
.category-button:hover small {
  color: var(--green);
}

.category-button small {
  color: var(--muted);
  font-weight: 850;
}

.check-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.content {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.hero-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(18px, 2.6vw, 28px);
  color: var(--ink);
  background: linear-gradient(135deg, #ffffff 0%, #eef8f1 100%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.hero-band h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 850;
}

.hero-band p:not(.eyebrow) {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 650;
}

.hero-button {
  min-width: 136px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stats-strip div {
  min-height: 72px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}

.stats-strip div:last-child {
  border-color: rgba(250, 204, 21, 0.52);
  background: var(--card-strong);
  box-shadow: 0 10px 22px rgba(179, 130, 0, 0.1);
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.stats-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-strip div:last-child strong,
.stats-strip div:last-child span {
  color: #8a6200;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.toolbar h2,
.toolbar p {
  margin: 0;
}

.toolbar h2 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 850;
}

.toolbar p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.toolbar select {
  max-width: 250px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.listing-card {
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.listing-media {
  position: relative;
  min-height: 148px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #f7faf8 0%, #edf4f0 100%);
}

.listing-symbol {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--green);
  background: #e8f6ed;
  font-size: 26px;
  font-weight: 900;
  border: 1px solid rgba(85, 189, 114, 0.22);
  box-shadow: none;
}

.listing-card:nth-child(3n) .listing-symbol,
.listing-card:nth-child(4n) .listing-symbol {
  background: var(--gold);
  color: #8a6200;
}

.listing-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--orange);
  font-size: 10px;
  font-weight: 900;
  z-index: 2;
}

.listing-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.listing-body h3 {
  min-height: 48px;
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.18;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.listing-price {
  color: var(--red);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.listing-meta {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 650;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--card);
  text-align: center;
  font-weight: 750;
}

@media (max-width: 1180px) {
  .web-header {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: space-between;
  }

  .web-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

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

@media (max-width: 860px) {
  .web-header {
    position: sticky;
    padding: 12px 14px;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .web-shell {
    grid-template-columns: 1fr;
    padding: 14px 14px 36px;
  }

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

  .content {
    order: 1;
  }

  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-band {
    display: grid;
  }

  .hero-button {
    width: 100%;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar select {
    max-width: none;
  }

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

@media (max-width: 560px) {
  .brand span {
    font-size: 22px;
  }

  .header-actions {
    grid-template-columns: 1fr;
  }

  .ghost-link,
  .login-button,
  .post-button,
  .search-button {
    width: 100%;
  }

  .category-list,
  .listing-grid {
    grid-template-columns: 1fr;
  }

  .hero-band h1 {
    font-size: 28px;
  }
}
