.category-filters {
  display: block;
  padding: 0 6vw 20px;
}

.category-filters button {
  display: none;
  align-items: baseline;
  gap: 7px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #6f6a61;
  font-size: 9px;
  letter-spacing: .17em;
  text-transform: uppercase;
  transition: color .2s ease, border-color .2s ease;
}

.category-filters button:hover,
.category-filters button:focus-visible,
.category-filters button.is-active {
  border-bottom-color: #bf8b32;
  color: #8f682a;
}

.category-filters button span {
  color: #a49d90;
  font-size: 8px;
  letter-spacing: .08em;
}

.category-select-wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(330px, 100%);
  margin: 0 0 0 auto;
  color: #9a886b;
  font-size: 7px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.category-select-wrap > span {
  display: block;
  margin: 0;
}

.category-select-wrap::after {
  content: "\2193";
  position: absolute;
  right: 7px;
  bottom: 12px;
  color: #c5943e;
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
  transition: transform .2s ease;
}

.category-select-wrap:focus-within::after {
  transform: translateY(2px);
}

.category-select-wrap select {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 0 30px 0 2px;
  border: 0;
  border-bottom: 1px solid rgba(191, 139, 50, .52);
  border-radius: 0;
  outline: none;
  appearance: none;
  background: transparent;
  box-shadow: none;
  color: #102d49;
  cursor: pointer;
  font: 500 9px/1 "DM Sans", sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.category-select-wrap select:hover,
.category-select-wrap select:focus-visible {
  border-bottom-color: #bf8b32;
  box-shadow: none;
}

.category-result {
  height: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gallery article[hidden] {
  display: none !important;
}

@media (min-width: 721px) {
  .gallery.is-category-filtered {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 18px;
    columns: auto;
  }

  .gallery.is-category-filtered article {
    display: block;
    width: 100%;
    margin: 0;
  }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .gallery.is-category-filtered {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.caption-copy {
  min-width: 0;
}

.gallery .caption .photo-category-label {
  display: block;
  margin-bottom: 5px;
  color: #d7ae5c;
  font-size: 7px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.gallery .caption h3 {
  overflow-wrap: anywhere;
}

.lightbox-category {
  flex: 0 0 auto;
  color: #d7ae5c;
  font-size: 8px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.panel input[type="text"],
.panel input[list] {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid #aaa;
  outline: none;
  background: transparent;
  font-family: "Italiana", serif;
  font-size: 22px;
}

.edit-panel {
  width: min(680px, 100%);
}

.edit-panel textarea {
  min-height: 88px;
}

.edit-category-help {
  margin: 8px 0 2px;
  color: #746e63;
  font-size: 10px;
  line-height: 1.5;
}

.category-picker {
  margin: 24px 0 4px;
  padding: 16px;
  border: 1px solid rgba(17, 17, 15, .18);
}

.category-picker legend {
  padding: 0 8px;
  color: #8f682a;
  font-size: 9px;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.category-picker legend small {
  color: #746e63;
  letter-spacing: .06em;
  text-transform: none;
}

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

.category-choices label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(17, 17, 15, .2);
  color: #4d4942;
  cursor: pointer;
}

.category-choices input {
  accent-color: #bf8b32;
}

.category-new {
  margin-top: 16px !important;
}

.edit-panel .primary {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .category-filters {
    padding: 0 20px 18px;
  }

  .category-select-wrap {
    width: 100%;
    margin: 0 auto;
  }

  .category-select-wrap select {
    min-height: 38px;
    padding: 0 30px 0 2px;
    font-size: 9px;
  }

  .category-select-wrap::after {
    right: 7px;
    bottom: 12px;
  }

  .edit-panel {
    padding-top: 48px;
  }
}
