:root {
  --ink: #11110f;
  --muted: #736f67;
  --soft: #f4f0e9;
  --paper: #fbfaf7;
  --line: #e5dfd5;
  --clay: #9d684d;
  --olive: #4c5847;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #ded8cf;
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "Apple SD Gothic Neo", sans-serif;
  word-break: keep-all;
}

button,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(17, 17, 15, .06);
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  background: rgba(251, 250, 247, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.side-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.side-drawer.open {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 15, 0.34);
  opacity: 0;
  transition: opacity .2s ease;
}

.drawer-panel {
  position: relative;
  width: min(84vw, 320px);
  height: 100%;
  padding: calc(16px + env(safe-area-inset-top)) 18px 24px;
  background: var(--paper);
  transform: translateX(-100%);
  transition: transform .24s ease;
  box-shadow: 1px 0 0 rgba(17, 17, 15, .08);
}

.side-drawer.open .drawer-backdrop {
  opacity: 1;
}

.side-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.drawer-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.drawer-links {
  display: grid;
  gap: 10px;
}

.drawer-links a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.app-logo {
  justify-self: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-button svg,
.search-box svg,
.bottom-tabs svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-hero {
  margin: 14px;
  min-height: 236px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(17, 17, 15, .92), rgba(66, 55, 47, .52)),
    url("/assets/secondary-archive-hero.png") center/cover;
}

.app-hero p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.app-hero h1 {
  margin: 0 0 22px;
  font-size: 31px;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .28);
  font-size: 12px;
}

.hero-mini span {
  color: rgba(255, 255, 255, .72);
}

.hero-mini strong {
  font-size: 18px;
}

.search-panel {
  padding: 0 14px 14px;
}

.filter-block {
  margin-top: 12px;
}

.filter-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.member-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 14px 14px;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.member-strip span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.member-strip strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.member-action {
  flex: 0 0 auto;
  min-width: 76px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  cursor: pointer;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.chip-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.chip.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 14px 22px;
  background: var(--line);
  border: 1px solid var(--line);
}

.status-strip div {
  min-width: 0;
  padding: 13px 10px;
  background: #fff;
}

.status-strip span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.status-strip strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
}

.feed-section {
  padding: 0 14px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.sort-select {
  flex: 0 0 auto;
  min-width: 116px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.product-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
}

.mobile-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #d7d0c4, #665447);
}

.mobile-card:nth-child(2n) .mobile-media {
  background: linear-gradient(135deg, #ede8df, #566052);
}

.mobile-card:nth-child(3n) .mobile-media {
  background: linear-gradient(135deg, #e0d8cc, #a06d4f);
}

.mobile-media::before {
  content: "";
  position: absolute;
  inset: 30% 14% 18%;
  border-radius: 999px;
  background: rgba(255, 255, 255, .38);
  filter: blur(22px);
}

.badge-stack {
  position: absolute;
  top: 9px;
  left: 9px;
  display: grid;
  gap: 5px;
}

.badge {
  width: max-content;
  max-width: 128px;
  padding: 4px 7px;
  color: #fff;
  background: rgba(17, 17, 15, .76);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mobile-body {
  padding: 11px;
}

.mobile-brand {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.mobile-name {
  min-height: 42px;
  margin: 0 0 9px;
  font-size: 13px;
  line-height: 1.45;
}

.mobile-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.mobile-price span {
  color: var(--clay);
  font-size: 13px;
  font-weight: 900;
}

.mobile-price strong {
  font-size: 13px;
  white-space: nowrap;
}

.source-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--olive);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px 18px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
}

.bottom-tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 480px);
  height: calc(66px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(251, 250, 247, .94);
  border-top: 1px solid var(--line);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.bottom-tabs a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #a29b90;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
}

.bottom-tabs a.active {
  color: var(--ink);
}

.bottom-tabs svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 481px) {
  .app-shell {
    min-height: calc(100vh - 32px);
    margin-top: 16px;
    margin-bottom: 16px;
  }
}
