.tabs {
  flex-wrap: wrap;
  overflow: visible;
  gap: 9px 15px;
}

.tabs button {
  white-space: nowrap;
  padding-bottom: 8px;
}

#invite-form {
  flex-wrap: wrap;
}

#invite-form .invite-code-label {
  flex: 1 0 100%;
}

#invite-form label:not(.invite-code-label) {
  flex: 1 1 calc(50% - 8px);
}

#invite-form button {
  width: 100%;
}

.search-results {
  max-height: 300px;
  overflow-y: auto;
}

.search-results button {
  line-height: 1.5;
}

.locate-button {
  margin: 7px 0 10px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #527a62;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.locate-button:hover { text-decoration: underline; }
.locate-button:disabled { opacity: .55; cursor: wait; }

.announcement-card {
  margin: 16px 0 18px;
  padding: 14px 16px;
  border: 1px solid #d7e2d5;
  border-radius: 12px;
  background: #f5f8ef;
  color: #2c513d;
}

.announcement-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.announcement-heading small { font-weight: 400; color: #728a79; }
.announcement-card p { margin: 9px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
#announcement-form { display: grid; gap: 12px; }
#announcement-input { width: 100%; box-sizing: border-box; resize: vertical; min-height: 130px; }

.detail-modal {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 30px;
  border-radius: 16px;
  background: #fcfdf9;
  box-shadow: 0 25px 80px #10271950;
}
.detail-modal h2 { margin: 11px 28px 18px 0; font: 600 29px Georgia,"Noto Serif SC",serif; color: #284a38; }
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 9px; }
.detail-gallery:empty { display: none; }
.detail-gallery a { display: block; min-width: 0; }
.detail-gallery img { display: block; width: 100%; height: 180px; object-fit: cover; border-radius: 9px; }
.detail-note { white-space: pre-wrap; overflow-wrap: anywhere; color: #425e4a; line-height: 1.8; font-size: 14px; }
.detail-author { color: #829685; font-size: 12px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.detail-actions button { border: 0; border-radius: 7px; background: #315d49; color: white; padding: 9px 13px; }
.detail-actions button.danger { background: #f5e9e5; color: #a75e52; }
@media (max-width: 640px) { .detail-modal { padding: 22px; } .detail-gallery img { height: 140px; } }
