.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 2px;
}

.event-meta span {
  padding: 4px 7px;
  border: 1px solid #eee3da;
  border-radius: 6px;
  background: #fffaf6;
  color: #6d746f;
  font-size: 10px;
  line-height: 1.2;
}

.customer-detail-sheet {
  box-sizing: border-box;
  padding-bottom: 18px;
}

.customer-detail-status {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #fff0eb;
  color: #b85f4d;
  font-size: 10px;
  font-weight: 700;
}

.customer-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 0 12px;
}

.customer-detail-summary span {
  min-width: 0;
  padding: 8px 4px;
  border-radius: 7px;
  background: #f8f5f1;
  color: #65736e;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

.customer-detail-section {
  margin-top: 10px;
  border: 1px solid #eee7df;
  border-radius: 8px;
  background: #faf8f5;
  overflow: hidden;
}

.customer-detail-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  color: #263b35;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.customer-detail-section > summary::-webkit-details-marker {
  display: none;
}

.customer-detail-section > summary::after {
  content: "⌄";
  margin-left: 8px;
  color: #8a9691;
  font-size: 14px;
  transition: transform .16s ease;
}

.customer-detail-section[open] > summary::after {
  transform: rotate(180deg);
}

.customer-detail-section > summary small {
  margin-left: auto;
  color: #8a9691;
  font-size: 10px;
  font-weight: 500;
}

.customer-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #eee7df;
  background: #fff;
}

.customer-detail-field {
  min-width: 0;
}

.customer-detail-field-wide {
  grid-column: 1 / -1;
}

.customer-detail-field > span {
  display: block;
  color: #82908b;
  font-size: 10px;
  line-height: 1.4;
}

.customer-detail-field > b {
  display: block;
  margin-top: 3px;
  color: #263b35;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.customer-detail-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.customer-detail-images a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: #f1ece7;
}

.customer-detail-images img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customer-detail-history {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eee7df;
  background: #fff;
}

.customer-detail-history article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-left: 3px solid #ef8a73;
  border-radius: 5px;
  background: #faf7f3;
}

.customer-detail-history article strong {
  color: #263b35;
  font-size: 12px;
}

.customer-detail-history article span,
.customer-detail-history article p {
  margin: 0;
  color: #6f7b76;
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.customer-import-group h4 {
  margin: 2px 0 8px;
  color: #3b4b46;
  font-size: 12px;
}

.customer-import-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.customer-import-values div {
  min-width: 0;
}

.customer-import-values span,
.customer-import-values b {
  display: block;
}

.customer-import-values b {
  margin-top: 2px;
  color: #263b35;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.customer-detail-empty,
.customer-detail-history-error {
  padding: 14px 12px;
  color: #84908c;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.customer-detail-history-error {
  margin-top: 10px;
  border-radius: 7px;
  background: #fff0eb;
  color: #a55343;
}

.customer-detail-close {
  position: static;
}

@media (max-width: 350px) {
  .customer-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
