.tag-stack {
  display: grid;
  grid-template-rows: 28px 28px;
  gap: 4px;
  height: 60px;
  margin: 0 0 8px;
  min-width: 0;
}

.tag-slot {
  min-width: 0;
  min-height: 28px;
  max-height: 28px;
  overflow: hidden;
}

.tag-slot > .actress-tags,
.tag-slot > .unified-tags {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 28px;
  max-height: 28px;
  margin: 0 !important;
  overflow: hidden;
}

.tag-slot > .actress-tags {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tag-slot > .actress-tags::-webkit-scrollbar {
  display: none;
}

.tag-slot .actress-chip,
.tag-slot .preference-label,
.summary-tag-chip,
.tag-more-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.tag-slot-tags .preference-label {
  flex: 0 0 auto;
}

.summary-tag-chip,
.tag-more-button {
  height: 26px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(0,0,0,.38);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.summary-tag-chip {
  min-width: 0;
  max-width: 24vw;
  padding: 0 9px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-more-button {
  padding: 0 9px;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.32);
}

.tag-source-data {
  display: none !important;
}

.card-body .work-title {
  min-height: 49px;
  max-height: 49px;
}

.card-body .price-row {
  min-height: 24px;
}

.card-body .meta {
  min-height: 18px;
}

.tag-sheet-open {
  overflow: hidden;
}

.tag-sheet-overlay {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(4px);
}

.tag-sheet-overlay[hidden] {
  display: none !important;
}

.tag-sheet {
  width: min(680px,100%);
  max-height: min(72dvh,720px);
  overflow-y: auto;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255,255,255,.14);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: #111116;
  color: #fff;
  box-shadow: 0 -18px 50px rgba(0,0,0,.42);
}

.tag-sheet-handle {
  width: 42px;
  height: 4px;
  margin: 2px auto 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
}

.tag-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tag-sheet-head small {
  display: block;
  margin-bottom: 2px;
  color: #ff315d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.tag-sheet-head h2 {
  margin: 0;
  font-size: 18px;
}

.tag-sheet-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: #1c1c24;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.tag-sheet-note {
  margin: 8px 0 14px;
  color: #9d9da8;
  font-size: 11px;
}

.tag-sheet-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-sheet-chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: #1a1a22;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  touch-action: manipulation;
}

.tag-sheet-chip.category-combo,
.tag-sheet-chip.category-relationship,
.tag-sheet-chip.category-setting {
  border-color: rgba(255,49,93,.34);
  background: rgba(255,49,93,.08);
}

@media (max-height: 700px) {
  .tag-stack {
    grid-template-rows: 26px 26px;
    height: 56px;
    gap: 4px;
    margin-bottom: 6px;
  }

  .tag-slot,
  .tag-slot > .actress-tags,
  .tag-slot > .unified-tags {
    min-height: 26px;
    max-height: 26px;
  }

  .summary-tag-chip,
  .tag-more-button {
    height: 24px;
    font-size: 9px;
  }
}

@media (min-width: 720px) {
  .summary-tag-chip {
    max-width: 150px;
  }
}
