@font-face {
  font-family: "Archivo";
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/archivo-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/archivo-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Literata";
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/literata-600-normal.woff2") format("woff2");
}

:root {
  --cream: #f7ead8;
  --paper: #fffdf8;
  --ink: #172018;
  --soft: #697069;
  --green: #0e6b33;
  --mint: #d9f0df;
  --gold: #e1bb55;
  --line: rgba(23, 32, 24, 0.11);
  --shadow: 0 14px 36px rgba(54, 43, 27, 0.1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #dde0d9; }
body {
  min-height: 100vh;
  margin: 0;
  background: #dde0d9;
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Literata", Georgia, serif; letter-spacing: -0.035em; }
h1 { margin-bottom: 12px; font-size: clamp(2.8rem, 13vw, 4.3rem); line-height: 0.96; }
h2 { font-size: 1.75rem; line-height: 1.04; }
h3 { font-size: 1rem; }

.market-app {
  position: relative;
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 18px 122px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 0 70px rgba(20, 30, 22, 0.16);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
}

.app-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.app-brand img { width: 34px; height: 34px; }
.app-brand span { display: grid; min-width: 0; }
.app-brand strong { font-size: 0.82rem; }
.app-brand small { overflow: hidden; color: var(--soft); font-size: 0.65rem; text-overflow: ellipsis; white-space: nowrap; }

.app-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-weight: 700;
  cursor: pointer;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.market-intro > h1 { max-width: 390px; }
.points-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 15px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
}
.points-strip span { display: grid; }
.points-strip strong { font-size: 0.85rem; }
.points-strip small { margin-top: 3px; color: rgba(255,255,255,0.58); font-size: 0.66rem; }

.gold-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: #211d11;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.featured-offer {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(0deg, rgba(20, 13, 8, 0.93), rgba(20, 13, 8, 0.06) 76%),
    url("assets/menu/ribs.jpg") center / cover;
  box-shadow: var(--shadow);
}
.featured-copy { position: absolute; right: 20px; bottom: 20px; left: 20px; }
.featured-copy .eyebrow { color: #f5d87d; }
.featured-copy h2 { max-width: 310px; margin-bottom: 7px; font-size: 2.1rem; }
.featured-copy > p:not(.eyebrow) { max-width: 340px; margin-bottom: 16px; color: rgba(255,255,255,0.74); font-size: 0.75rem; line-height: 1.45; }
.featured-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.claim-button, .order-button, .icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.claim-button { background: var(--gold); color: #211d11; }
.order-button { background: #fff; color: var(--green); }
.icon-button { width: 42px; background: var(--mint); color: var(--green); font-size: 1.1rem; }
.claim-button.is-claimed { background: var(--mint); color: var(--green); }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 30px 0 14px;
}
.section-heading h2 { margin: 0; }
.section-heading .eyebrow { margin-bottom: 4px; }
.text-button {
  padding: 7px 0;
  border: 0;
  background: none;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.offer-card {
  overflow: hidden;
  border: 1px solid rgba(23,32,24,0.07);
  border-radius: 22px;
  background: rgba(255,255,255,0.6);
  box-shadow: 0 8px 22px rgba(54,43,27,0.05);
}
.offer-card img { width: 100%; aspect-ratio: 1.35; object-fit: cover; }
.offer-card-copy { padding: 13px; }
.offer-card h3 { min-height: 39px; margin: 8px 0 4px; line-height: 1.18; }
.offer-card p { min-height: 28px; margin-bottom: 12px; color: var(--soft); font-size: 0.65rem; line-height: 1.35; }
.offer-tag { color: var(--green); font-size: 0.61rem; font-weight: 700; text-transform: uppercase; }
.offer-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.offer-card-actions .claim-button { flex: 1; }
.offer-card-wide {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 120px 1fr;
}
.offer-card-wide img { height: 100%; aspect-ratio: auto; }
.offer-card-wide h3, .offer-card-wide p { min-height: 0; }

.app-panel[hidden] { display: none; }
.panel-title { margin: 34px 0 22px; }
.panel-title > p:not(.eyebrow) { max-width: 38ch; color: var(--soft); font-size: 0.8rem; line-height: 1.5; }

.category-scroller {
  display: flex;
  gap: 7px;
  margin: 0 -18px 18px;
  padding: 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-scroller button {
  flex: none;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.category-scroller button[aria-selected="true"] { border-color: var(--green); background: var(--green); color: #fff; }

.app-menu-list { display: grid; gap: 10px; }
.app-menu-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 19px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(54,43,27,0.05);
}
.app-menu-item img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }
.app-menu-item h3 { margin-bottom: 4px; }
.app-menu-item p { margin: 0; color: var(--soft); font-size: 0.65rem; line-height: 1.35; }
.app-menu-item-price { display: block; margin-top: 6px; font-weight: 700; }
.app-menu-item button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--mint);
  color: var(--green);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.rewards-card {
  width: 100%;
  min-height: 245px;
  padding: 22px;
  border: 0;
  border-radius: 28px;
  background: var(--gold);
  color: #21301f;
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.rewards-card-top { display: flex; justify-content: space-between; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.rewards-card > strong { display: block; margin-top: 48px; font-family: "Literata", serif; font-size: 3.8rem; line-height: 0.9; }
.rewards-card > small { display: block; margin: 4px 0 18px; }
.rewards-progress { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: rgba(33,48,31,0.17); }
.rewards-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); }
.rewards-card > span:last-child { display: block; margin-top: 7px; font-size: 0.68rem; }

.claimed-list { display: grid; gap: 9px; }
.claimed-empty { padding: 22px; border: 1px dashed var(--line); border-radius: 18px; color: var(--soft); font-size: 0.76rem; text-align: center; }
.claimed-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 17px;
  background: var(--paper);
}
.claimed-offer strong { display: block; font-size: 0.82rem; }
.claimed-offer small { color: var(--soft); font-size: 0.65rem; }
.claimed-offer span:last-child { color: var(--green); font-size: 0.7rem; font-weight: 700; }

.rewards-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  text-decoration: none;
}
.rewards-link span:first-child { display: grid; }
.rewards-link strong { font-size: 0.8rem; }
.rewards-link small { margin-top: 3px; color: var(--soft); font-size: 0.65rem; }

.app-nav {
  position: fixed;
  right: max(12px, calc((100vw - 456px) / 2));
  bottom: 12px;
  left: max(12px, calc((100vw - 456px) / 2));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 24px;
  background: rgba(255,253,248,0.9);
  box-shadow: 0 16px 36px rgba(23,32,24,0.16);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.app-nav button {
  display: grid;
  min-height: 54px;
  place-items: center;
  gap: 4px;
  padding: 5px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: #788079;
  font-size: 0.63rem;
  cursor: pointer;
}
.app-nav b { font-size: 1.15rem; line-height: 1; }
.app-nav button.is-active { background: var(--mint); color: var(--green); }

.app-cart {
  position: fixed;
  right: max(18px, calc((100vw - 444px) / 2));
  bottom: 84px;
  left: max(18px, calc((100vw - 444px) / 2));
  z-index: 28;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 15px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 18px 40px rgba(23,32,24,0.22);
}
.app-cart[hidden] { display: none; }
.app-cart span { display: grid; }
.app-cart strong { font-size: 0.77rem; }
.app-cart small { margin-top: 2px; color: rgba(255,255,255,0.56); font-size: 0.62rem; }

.app-toast {
  position: fixed;
  right: max(18px, calc((100vw - 444px) / 2));
  bottom: 84px;
  left: max(18px, calc((100vw - 444px) / 2));
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 17px;
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.app-toast.is-visible { opacity: 1; transform: translateY(0) scale(1); }

.member-dialog {
  width: min(390px, calc(100% - 28px));
  margin: auto;
  padding: 30px;
  border: 0;
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 28px 90px rgba(12,18,13,0.38);
}
.member-dialog::backdrop { background: rgba(9,16,11,0.72); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.member-dialog > img { width: 48px; height: 48px; margin: 0 auto 16px; }
.member-dialog h2 { margin-bottom: 18px; }
.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 1.2rem;
  cursor: pointer;
}
.member-code {
  display: grid;
  grid-template-columns: repeat(7, 11px);
  justify-content: center;
  gap: 5px;
  width: fit-content;
  margin: 0 auto 12px;
  padding: 18px;
  border: 2px solid var(--ink);
}
.member-code i { width: 11px; height: 11px; background: var(--ink); }
.member-code i:nth-child(3n), .member-code i:nth-child(7n) { opacity: 0.14; }
.member-number { display: block; margin-bottom: 18px; letter-spacing: 0.12em; }
.member-dialog > p:last-child { margin-bottom: 0; color: var(--soft); font-size: 0.75rem; line-height: 1.5; }
.member-dialog > p:last-child strong { color: var(--green); font-size: 1rem; }

.pressable {
  transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}
.pressable:active { transform: scale(0.97); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

@media (hover: hover) and (pointer: fine) {
  .offer-card:hover { border-color: rgba(14,107,51,0.28); }
  .rewards-link:hover { border-color: rgba(14,107,51,0.35); }
}

@media (min-width: 700px) {
  body { padding: 28px 0; }
  .market-app { min-height: calc(100vh - 56px); border-radius: 34px; }
}

@media (max-width: 360px) {
  .market-app { padding-inline: 14px; }
  .category-scroller { margin-inline: -14px; padding-inline: 14px; }
  .offer-grid { grid-template-columns: 1fr; }
  .offer-card-wide { grid-column: auto; grid-template-columns: 105px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .pressable, .app-toast { transition-duration: 0.01ms; }
}
