:root {
  color-scheme: light;
  --bg: #eef2ff;
  --text: #14142f;
  --muted: #5b5d7a;
  --accent: #5b5ff0;
  --accent-strong: #4230a3;
  --surface: #ffffff;
  --line: rgba(69, 56, 154, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(120deg, rgba(91, 95, 240, 0.22), transparent 36%),
    linear-gradient(300deg, rgba(139, 92, 246, 0.16), transparent 42%),
    var(--bg);
  color: var(--text);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 0;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

button,
a,
input,
select {
  font: inherit;
}

button,
a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}

button {
  border: 0;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

input,
select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.panel,
.offer-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(40, 38, 122, 0.12);
}

.panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
}

.stack {
  display: grid;
  gap: 12px;
}

.notice {
  overflow-wrap: anywhere;
  color: var(--muted);
  line-height: 1.45;
}

.text-button {
  min-height: auto;
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  text-align: left;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.list-row div {
  display: grid;
  gap: 3px;
}

.list-row span,
.empty {
  color: var(--muted);
}

.list-row button {
  flex: 0 0 auto;
}

.badge {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(91, 95, 240, 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.shop {
  display: grid;
  gap: 18px;
}

.shop-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.shop h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.search {
  width: min(360px, 100%);
}

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

.tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

.tab[aria-selected="true"] {
  background: var(--accent);
  color: white;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.offer-card {
  overflow: hidden;
}

.offer-image {
  min-height: 190px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 14px;
  background:
    linear-gradient(180deg, transparent 42%, rgba(20, 20, 47, 0.42)),
    url("assets/marketplace-photos.png");
  background-position:
    center,
    var(--photo-x) var(--photo-y);
  background-size:
    cover,
    400% 300%;
}

.offer-type,
.offer-distance {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.offer-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.offer-title {
  margin-bottom: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.offer-price {
  color: var(--accent-strong);
  font-size: 1.35rem;
  font-weight: 900;
}

.offer-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 12px;
}

.page-numbers {
  display: flex;
  gap: 8px;
}

.page-number {
  width: 46px;
  min-height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

.page-number[aria-current="page"] {
  background: var(--accent);
  color: white;
}

@media (max-width: 900px) {
  .topbar,
  .dashboard,
  .offer-grid {
    grid-template-columns: 1fr;
  }

  .shop-head {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .shell {
    padding-top: 30px;
  }

  .list-row,
  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .page-numbers {
    justify-content: center;
  }
}
