.note-card {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.note-card:hover,
.note-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(165, 43, 29, 0.18);
  box-shadow: 0 18px 34px rgba(74, 49, 23, 0.12);
}

.note-card:focus-visible {
  outline: 3px solid rgba(12, 111, 118, 0.2);
  outline-offset: 2px;
}

.note-card .building-notes {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notes-modal-dialog {
  width: min(760px, 100%);
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(28, 26, 23, 0.06);
  box-shadow: 0 24px 60px rgba(28, 26, 23, 0.18);
}

.notes-modal-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 18px;
  padding-right: 4px;
}

.notes-modal .search-preview-modal-actions {
  gap: 8px;
}

.notes-modal-copy-button {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-deep);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.notes-modal-copy-button:hover,
.notes-modal-copy-button:focus-visible {
  background: rgba(255, 255, 255, 1);
}

.notes-modal .search-preview-modal-actions .image-modal-close {
  padding: 6px 10px;
  font-size: 0.82rem;
  line-height: 1.15;
  white-space: nowrap;
}

.note-directory-status {
  width: fit-content;
}

.note-private-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(165, 43, 29, 0.18);
  background: rgba(255, 250, 249, 0.94);
  color: #8b2019;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.note-urgent-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(196, 43, 23, 0.18);
  background: linear-gradient(135deg, #fff8f5 0%, #ffede6 46%, #ffe2d9 100%);
  color: #8f140f;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(196, 43, 23, 0.08);
}

.note-urgent-tag[hidden] {
  display: none !important;
}

.notes-modal-urgent-tag {
  margin-top: 8px;
  width: fit-content;
}

.notes-modal-feedback {
  min-height: 1.2em;
}

.notes-modal-meta {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(28, 26, 23, 0.06);
}

.notes-modal-section {
  display: grid;
  gap: 10px;
}

.notes-media-gallery {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.notes-image-modal {
  z-index: 90;
}

.notes-image-modal-dialog {
  width: min(940px, 100%);
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(255, 255, 255, 0.98);
}

.notes-image-modal-frame {
  min-height: min(68vh, 620px);
  background: rgba(28, 26, 23, 0.92);
}

.notes-image-modal .image-modal-image {
  max-height: min(72vh, 680px);
}

.notes-modal-section h4 {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.notes-modal-notes {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.notes-modal .building-needs {
  background: linear-gradient(180deg, rgba(255, 244, 200, 0.96), rgba(255, 235, 163, 0.9));
  border: 1px solid rgba(214, 162, 19, 0.28);
}

.notes-modal .building-needs-text {
  color: #5c4a17;
}

.notes-modal .building-needs-title {
  color: #7a5302;
}

.notes-modal .building-needs-icon {
  background: #f0b90b;
  color: #543700;
  box-shadow: inset 0 -1px 0 rgba(84, 55, 0, 0.12);
}

.notes-modal .building-events {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(28, 26, 23, 0.06);
}

.notes-modal-events .building-event-item {
  -webkit-line-clamp: unset;
  overflow: visible;
}

@media (max-width: 720px) {
  .notes-modal-dialog {
    width: min(100%, 100%);
    padding: 16px;
  }

  .notes-modal-meta {
    grid-template-columns: 1fr;
  }
}