.gallery-wrap {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 100px;
  color: #182c28;
}
.gallery-wrap [hidden] {
  display: none !important;
}
.gallery-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.gallery-wrap h1 {
  font-size: clamp(2.8rem, 6.7vw, 5.6rem);
  letter-spacing: -0.065em;
  line-height: 1;
  margin: 0 0 12px;
}
.gallery-wrap p {
  line-height: 1.6;
}
.gallery-intro p,
#share > p {
  margin: 0;
  max-width: 55ch;
}
.gallery-wrap .btn,
.gallery-wrap button,
.gallery-wrap select {
  cursor: pointer;
}
.gallery-tools,
.gallery-tools #filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.gallery-tools {
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid #b9c6b9;
  border-bottom: 1px solid #b9c6b9;
}
.gallery-tools label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
}
.gallery-tools select,
.gallery-tools button {
  border: 1px solid #a6b9ab;
  border-radius: 100px;
  padding: 8px 12px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
}
.gallery-tools button[aria-pressed="true"] {
  background: #173d31;
  color: #fff;
  border-color: #173d31;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr));
  gap: 26px 18px;
}
.gcard {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.gcard .art,
.detail-art {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: #e2e8cf;
  background-image: linear-gradient(
      30deg,
      transparent 49.4%,
      #c3cdae 49.8%,
      #c3cdae 50.2%,
      transparent 50.6%
    ),
    linear-gradient(
      -30deg,
      transparent 49.4%,
      #c3cdae 49.8%,
      #c3cdae 50.2%,
      transparent 50.6%
    );
  background-size: 80px 46px;
  border: 1px solid #a9b8a5;
  border-radius: 10px;
  aspect-ratio: 1.55;
}
.gcard:nth-child(3n + 2) .art {
  background-color: #eadccc;
  background-image: linear-gradient(
      30deg,
      transparent 49.4%,
      #d5c4af 49.8%,
      #d5c4af 50.2%,
      transparent 50.6%
    ),
    linear-gradient(
      -30deg,
      transparent 49.4%,
      #d5c4af 49.8%,
      #d5c4af 50.2%,
      transparent 50.6%
    );
}
.gcard:nth-child(3n) .art {
  background-color: #d6e8e4;
}
.art img,
.detail-art img,
#draft-preview {
  image-rendering: pixelated;
  object-fit: contain;
  max-width: 80%;
  max-height: 80%;
  width: auto;
  height: auto;
}
.gcard:hover h2,
.back:hover {
  text-decoration: underline;
}
.gcard h2 {
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 12px 0 3px;
  overflow-wrap: anywhere;
}
.gcard p {
  margin: 0;
  font-size: 0.88rem;
}
.kind,
.votes {
  position: absolute;
  bottom: 9px;
  left: 9px;
  background: #fffdf4;
  color: #173a30;
  border: 1px solid #b9c5b2;
  border-radius: 40px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 650;
}
.votes {
  left: auto;
  right: 9px;
}
.recipe {
  padding: 22px;
  line-height: 1.5;
  color: #20483d;
  font-size: 1.08rem;
  font-family: Georgia, serif;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.back {
  display: inline-block;
  margin-bottom: 26px;
  color: #006d59;
  text-decoration: none;
  font-weight: 650;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(20px, 5vw, 60px);
  align-items: start;
}
.detail-art {
  aspect-ratio: 1.12;
}
.detail-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.detail-text h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
}
.detail-text h2 {
  font-size: 1rem;
  margin: 23px 0 5px;
}
.detail-text p {
  margin: 6px 0 12px;
  white-space: pre-wrap;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}
.gallery-wrap blockquote {
  margin: 8px 0;
  padding: 16px 18px;
  border-left: 4px solid #006d59;
  background: #e9ebdf;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#share {
  max-width: 690px;
  margin: auto;
}
#share form {
  display: grid;
  gap: 17px;
  margin-top: 28px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
#share label:not(.check) {
  display: grid;
  gap: 6px;
  font-weight: 650;
}
#share small {
  font-weight: 400;
  font-size: 0.82rem;
  color: #4d645a;
}
#share input:not([type="checkbox"]),
#share select,
#share textarea {
  border: 1px solid #9aad9f;
  border-radius: 6px;
  background: #fffdf7;
  color: inherit;
  font: inherit;
  padding: 11px;
  width: 100%;
  box-sizing: border-box;
}
#share textarea {
  resize: vertical;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.check input {
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: #006d59;
}
.gallery-wrap .btn {
  width: fit-content;
  text-decoration: none;
}
.gallery-wrap button:disabled {
  opacity: 0.65;
  cursor: default;
}
#draft-preview {
  max-height: 140px;
}
.gallery-wrap :focus-visible {
  outline: 3px solid #08775b;
  outline-offset: 3px;
}
#receipts {
  margin-top: 36px;
  border-top: 1px solid #bec8b9;
  padding-top: 8px;
}
#receipts:empty {
  display: none;
}
#receipts a {
  display: block;
  margin: 8px 0;
  color: #006d59;
}
@media (max-width: 700px) {
  .gallery-wrap {
    width: calc(100% - 32px);
    padding-top: 35px;
  }
  .gallery-intro,
  .detail-grid {
    display: grid;
  }
  .gallery-tools {
    align-items: start;
  }
  .gallery-grid {
    gap: 22px 12px;
  }
  .gallery-intro {
    margin-bottom: 24px;
  }
  .detail-art {
    max-height: 300px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .gallery-wrap h1 {
    font-size: 2.85rem;
  }
}
