:root {
  --bg: #efe7d6;
  --ink: #16241c;
  --muted: #5d6a62;
  --card: #fbf7ee;
  --line: #d8cdb6;
  --green: #1f4a38;
  --gold: #c9842a;
  --danger: #8f3a2a;
  --chip: #e7f0e8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 400px at 10% -10%, #f6f0e2 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: Outfit, "Segoe UI", sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 36px 28px 18px;
  max-width: 1200px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 6px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
}

h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 0.9;
}

.lede {
  max-width: 42rem;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.meta {
  min-width: 180px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  color: var(--muted);
}

.controls {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 28px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.pill.is-on {
  background: var(--green);
  border-color: var(--green);
  color: #f6f1e4;
}

.like-pill .like-n {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.like-pill.is-on {
  background: var(--gold);
  border-color: var(--gold);
  color: #fbf7ee;
}

.search input,
.sort select {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 9px 12px;
}

.tools {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 10px;
  flex: 1 1 320px;
  min-width: 0;
}

.search {
  flex: 1 1 auto;
  min-width: 0;
}

.search input {
  width: 100%;
  min-width: 0;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.sort select {
  width: 10.75rem;
  min-width: 0;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
}

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.count-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.count {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.like-pill {
  flex: 0 0 auto;
}

.grid {
  max-width: 1200px;
  margin: 0 auto 48px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card.is-focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.photo {
  aspect-ratio: 4 / 3;
  background: #ddd4c2 center / cover no-repeat;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  align-items: center;
}

.dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(246, 241, 228, 0.42);
  box-shadow: 0 0 0 1px rgba(22, 36, 28, 0.28);
  cursor: pointer;
}

.dot.is-on {
  background: #f6f1e4;
}

.zoom {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 36, 28, 0.55);
  color: #f6f1e4;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.zoom svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo.is-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  background: var(--chip);
  color: var(--green);
  padding: 3px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.badge.warn {
  background: #f3ddd6;
  color: var(--danger);
}

.badge.deal {
  background: #1f4a38;
  color: #f4f0e4;
}

.body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price {
  font-family: Fraunces, Georgia, serif;
  font-size: 28px;
  margin: 0;
}

.like {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: -4px -4px -4px 0;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.like svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.like.is-on svg {
  fill: currentColor;
}

.title {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.where,
.why {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.where {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.pin {
  flex-shrink: 0;
  color: var(--green);
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: 0;
  line-height: 1.35;
  text-decoration: none;
  font-weight: 500;
}

.pin:hover,
.pin:focus-visible {
  color: var(--gold);
  text-decoration: underline;
}

.pin-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.actions {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.open,
.share {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.open {
  background: var(--green);
  color: #f6f1e4;
  border: 0;
}

.share {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
}

.share svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty,
footer {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-size: 13px;
}

footer {
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .top,
  .controls {
    display: block;
  }

  .top {
    padding: 24px 16px 14px;
  }

  .controls {
    padding: 8px 16px 12px;
  }

  .pills {
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
  }

  .pill {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 8px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
  }

  .meta {
    margin-top: 16px;
  }

  .search {
    margin-top: 8px;
  }

  .search input {
    width: 100%;
    min-width: 0;
    margin-top: 0;
  }

  .tools {
    margin-top: 8px;
    width: 100%;
    flex: none;
  }

  .sort select {
    width: 9.25rem;
    margin-top: 0;
  }

  .checks {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .count-row,
  .grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .like-pill {
    flex: 0 0 auto;
  }
}

body.is-locked {
  overflow: hidden;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(22, 36, 28, 0.94);
  display: grid;
  place-items: center;
}

.viewer[hidden] {
  display: none;
}

.viewer-img {
  max-width: min(100vw - 16px, 1100px);
  max-height: calc(100dvh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

.viewer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 247, 238, 0.12);
  color: #f6f1e4;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.viewer-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.viewer-dots {
  bottom: 88px;
}

.viewer.is-single .viewer-dots,
.viewer.is-single .viewer-thumbs {
  display: none;
}

.viewer-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.viewer-thumbs {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.viewer-thumb {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 2px solid transparent;
  padding: 0;
  background: #2a3d32 center / cover no-repeat;
  cursor: pointer;
}

.viewer-thumb.is-on {
  border-color: #c9842a;
}
