/*
 * SitePass v23.7.566-test
 * 회원 연동요청 홈 알림 + 회원간 채팅 UI
 * 기존 만료/공유/관리자 채팅 UI와 분리된 추가 레이어입니다.
 */

.sp566-member-chat-section {
  margin: 11px 0 0;
}

.sp566-member-chat-section.hidden,
.sp566-member-room-panel.hidden,
.sp566-link-request-modal.hidden {
  display: none !important;
}

.sp566-member-chat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 2px 7px;
}

.sp566-member-chat-label b {
  color: #111827;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.25px;
}

.sp566-member-chat-label span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff3cd;
  color: #8a5700;
  font-size: 11px;
  font-weight: 950;
}

.sp566-member-room-list {
  display: grid;
  gap: 7px;
}

.sp566-member-room-button {
  width: 100%;
  appearance: none;
  border: 1px solid #dce6f5;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  color: #111827;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 86, 180, 0.06);
}

.sp566-member-room-button:active {
  transform: translateY(1px);
}

.sp566-member-room-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf2ff;
  color: #2455c3;
  font-size: 20px;
  font-weight: 950;
}

.sp566-member-room-copy {
  min-width: 0;
}

.sp566-member-room-copy b {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -0.3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp566-member-room-copy small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp566-member-room-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.sp566-member-room-meta em,
.sp566-member-pending-pill {
  border-radius: 999px;
  padding: 4px 7px;
  background: #fff1c7;
  color: #8a5700;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.sp566-member-room-meta i {
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.sp566-member-room-meta strong {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e53935;
  color: #ffffff;
  font-size: 11px;
  font-weight: 950;
}

.sp566-member-list-status {
  border: 1px dashed #d8e2f0;
  border-radius: 16px;
  padding: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.sp566-member-room-panel {
  min-height: calc(100vh - 170px);
}

.sp566-member-room-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.sp566-member-room-back {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.sp566-member-room-title {
  min-width: 0;
}

.sp566-member-room-title b {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.35px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp566-member-room-title small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.sp566-member-request-groups {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}

.sp566-member-request-card {
  border: 1px solid #d6e3f7;
  border-radius: 18px;
  padding: 12px;
  background: #f8fbff;
}

.sp566-member-request-card.accepted {
  border-color: #b7e5ce;
  background: #f2fbf6;
}

.sp566-member-request-card.rejected,
.sp566-member-request-card.cancelled {
  border-color: #e4e7ec;
  background: #f8fafc;
}

.sp566-member-request-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.sp566-member-request-card-head b {
  color: #111827;
  font-size: 14px;
  font-weight: 950;
}

.sp566-member-request-status {
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff1c7;
  color: #8a5700;
  font-size: 11px;
  font-weight: 950;
}

.sp566-member-request-card.accepted .sp566-member-request-status {
  background: #dff7ea;
  color: #087443;
}

.sp566-member-request-card.rejected .sp566-member-request-status,
.sp566-member-request-card.cancelled .sp566-member-request-status {
  background: #e9edf3;
  color: #64748b;
}

.sp566-member-request-items {
  display: grid;
  gap: 6px;
}

.sp566-member-request-item {
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.sp566-member-request-item span:last-child {
  color: #64748b;
}

.sp566-member-request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.sp566-member-request-actions button {
  border: 0;
  border-radius: 13px;
  padding: 10px;
  font-size: 13px;
  font-weight: 950;
}

.sp566-member-request-actions .reject {
  background: #eef1f5;
  color: #475569;
}

.sp566-member-request-actions .accept {
  background: #2458d3;
  color: #ffffff;
}

.sp566-member-request-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.sp566-member-messages {
  min-height: 160px;
  max-height: 52vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px 10px;
}

.sp566-member-message-row {
  display: flex;
}

.sp566-member-message-row.mine {
  justify-content: flex-end;
}

.sp566-member-message-bubble {
  max-width: 86%;
  border: 1px solid #e3e9f2;
  border-radius: 17px;
  padding: 9px 11px;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.04);
}

.sp566-member-message-row.mine .sp566-member-message-bubble {
  border-color: #fee500;
  background: #fee500;
}

.sp566-member-message-row.system .sp566-member-message-bubble {
  width: 100%;
  max-width: none;
  border-color: #dce6f5;
  background: #edf4ff;
  color: #2455a5;
  text-align: center;
}

.sp566-member-message-bubble small {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
}

.sp566-member-composer {
  margin-top: 8px;
  border: 1px solid #dfe7f2;
  border-radius: 18px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  background: #ffffff;
}

.sp566-member-composer textarea {
  width: 100%;
  min-height: 48px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid #dce4ef;
  border-radius: 13px;
  padding: 10px;
  background: #f8fafc;
  color: #111827;
  font-size: 13px;
  font-weight: 750;
  outline: none;
}

.sp566-member-composer button {
  align-self: stretch;
  min-width: 62px;
  border: 0;
  border-radius: 13px;
  padding: 0 13px;
  background: #111827;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

.sp566-member-read-only {
  margin-top: 8px;
  border-radius: 14px;
  padding: 10px 12px;
  background: #eef1f5;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.sp566-link-request-modal {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

.sp566-link-request-dialog {
  width: min(100%, 390px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.sp566-link-request-dialog-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: #eaf2ff;
  color: #2458d3;
  font-size: 25px;
}

.sp566-link-request-dialog h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -0.5px;
}

.sp566-link-request-dialog p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}

.sp566-link-request-dialog p b {
  color: #1f4fae;
  font-weight: 950;
}

.sp566-link-request-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 8px;
  margin-top: 18px;
}

.sp566-link-request-dialog-actions button {
  border: 0;
  border-radius: 14px;
  padding: 12px;
  font-size: 14px;
  font-weight: 950;
}

.sp566-link-request-dialog-actions .later {
  background: #eef1f5;
  color: #475569;
}

.sp566-link-request-dialog-actions .open {
  background: #2458d3;
  color: #ffffff;
}

.sp566-member-unread-badge {
  position: absolute;
  top: 3px;
  right: 5px;
  min-width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e53935;
  color: #ffffff;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.sp566-member-unread-badge.hidden {
  display: none !important;
}

@media (max-width: 560px) {
  .sp566-member-room-button {
    grid-template-columns: 39px minmax(0, 1fr) auto;
    padding: 9px 10px;
  }

  .sp566-member-room-icon {
    width: 39px;
    height: 39px;
    border-radius: 13px;
    font-size: 19px;
  }

  .sp566-member-room-copy b {
    font-size: 14px;
  }

  .sp566-member-room-meta i {
    display: block;
    font-size: 10px;
  }

  .sp566-member-message-bubble {
    max-width: 92%;
  }

  .sp566-member-composer {
    grid-template-columns: minmax(0, 1fr) 58px;
  }
}


/* SitePass v23.7.588-52-chat-card-one-third-compact
 * 6구간 52단계: 회원 1:1 채팅 목록 카드만 약 1/3 축소. 방 내부 UI는 변경하지 않음.
 */
.sp566-member-room-button {
  min-height: 44px;
  padding: 5px 9px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  border-radius: 16px;
}
.sp566-member-room-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 18px;
}
.sp566-member-room-copy small {
  margin-top: 1px;
  line-height: 1.15;
}
.sp566-member-room-meta { gap: 2px; }
.sp566-member-room-meta em,
.sp566-member-pending-pill {
  padding: 2px 6px;
  font-size: 10px;
}
.sp566-member-room-meta i { font-size: 10px; }
@media (max-width: 560px) {
  .sp566-member-room-button {
    min-height: 44px;
    padding: 5px 9px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
  }
  .sp566-member-room-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 18px;
  }
  .sp566-member-room-copy b { font-size: 14px; }
}

/* SitePass v23.7.590-55-member-chat-attachment-ui
 * 6구간 55단계: 기존 v588 채팅 카드/방 UI를 유지하고 첨부 composer와 파일카드만 추가.
 */
.sp566-member-composer {
  position: relative;
  grid-template-columns: 44px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 7px;
  padding: 8px;
}

.sp566-member-composer textarea {
  min-height: 44px;
  height: 44px;
  max-height: 96px;
  resize: none;
  padding: 11px 10px;
  line-height: 20px;
  overflow-y: auto;
  box-sizing: border-box;
}

.sp566-member-composer > #sp566MemberSendButton {
  align-self: center;
  width: 58px;
  min-width: 58px;
  height: 44px;
  padding: 0 8px;
}

.sp590-attachment-selection {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sp590-attachment-selection.hidden,
.sp590-attachment-menu.hidden {
  display: none !important;
}

.sp590-pending-file {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  gap: 7px;
  align-items: center;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  padding: 6px 7px;
  background: #f8fafc;
}

.sp590-pending-file-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #eef3f9;
  font-size: 16px;
}

.sp590-pending-file-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sp590-pending-file-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #243044;
  font-size: 11px;
  font-weight: 900;
}

.sp590-pending-file-copy small {
  color: #7b8799;
  font-size: 9px;
  font-weight: 800;
}

.sp566-member-composer .sp590-pending-file-remove {
  width: 30px;
  min-width: 30px;
  height: 30px;
  align-self: center;
  border-radius: 9px;
  padding: 0;
  background: #eef1f5;
  color: #64748b;
  font-size: 18px;
  font-weight: 700;
}

.sp590-attachment-picker-wrap {
  position: relative;
  width: 44px;
  height: 44px;
}

.sp566-member-composer .sp590-attachment-plus {
  width: 44px;
  min-width: 44px;
  height: 44px;
  align-self: center;
  border: 1px solid #dce4ef;
  border-radius: 13px;
  padding: 0;
  background: #eef2f7;
  color: #334155;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}

.sp566-member-composer .sp590-attachment-plus:disabled,
.sp566-member-composer > #sp566MemberSendButton:disabled {
  cursor: wait;
  opacity: 0.55;
}

.sp590-attachment-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: max-content;
  min-width: 176px;
  border: 1px solid #dce4ef;
  border-radius: 13px;
  padding: 2px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16);
}

.sp566-member-composer .sp590-attachment-menu button {
  width: 100%;
  min-width: 0;
  height: 26px;
  border-radius: 8px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #ffffff;
  color: #253248;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.sp566-member-composer .sp590-attachment-menu button:hover {
  background: #f3f6fa;
}

.sp590-attachment-message-text {
  margin-bottom: 7px;
}

.sp590-message-attachments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: min(64vw, 280px);
}

.sp590-message-attachment-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  border: 1px solid #dde5ef;
  border-radius: 12px;
  padding: 7px;
  background: #f8fafc;
}

.sp566-member-message-row.mine .sp590-message-attachment-card {
  border-color: rgba(90, 72, 0, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.sp590-message-attachment-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #eaf0f7;
  font-size: 17px;
}

.sp590-message-attachment-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sp590-message-attachment-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #243044;
  font-size: 11px;
  font-weight: 950;
}

.sp590-message-attachment-copy small {
  color: #718096;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
}

.sp566-member-composer button.sp590-attachment-download,
.sp590-attachment-download {
  min-width: 58px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  padding: 0 8px;
  background: #243044;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

.sp590-attachment-download:disabled {
  opacity: 0.55;
  cursor: wait;
}

.sp590-attachment-expired {
  max-width: 74px;
  color: #8a6570;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.sp590-attachment-expired-note {
  border-radius: 9px;
  padding: 7px 8px;
  background: rgba(148, 163, 184, 0.13);
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
}

@media (max-width: 560px) {
  .sp566-member-composer {
    grid-template-columns: 42px minmax(0, 1fr) 56px;
    gap: 6px;
    padding: 7px;
  }

  .sp590-attachment-picker-wrap,
  .sp566-member-composer .sp590-attachment-plus {
    width: 42px;
    min-width: 42px;
    height: 42px;
  }

  .sp566-member-composer textarea {
    min-height: 42px;
    height: 42px;
    padding: 10px 9px;
  }

  .sp566-member-composer > #sp566MemberSendButton {
    width: 56px;
    min-width: 56px;
    height: 42px;
  }

  .sp590-message-attachments {
    min-width: min(70vw, 260px);
  }

  .sp590-message-attachment-card {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 6px;
    padding: 6px;
  }

  .sp590-message-attachment-icon {
    width: 32px;
    height: 32px;
  }
}


/* SitePass v23.7.591-55-member-chat-equipment-label-request-dedup
 * 회원 채팅 카드: 동명이인 구분을 위해 현재 ACTIVE 연동 장비번호를 이름 아래 첫 정보로 노출.
 * v588의 44px 컴팩트 카드 높이/레이아웃은 유지.
 */
.sp591-member-room-equipment {
  color: #385782;
  font-weight: 950;
}

.sp591-member-room-preview {
  color: #64748b;
  font-weight: 750;
}


/* SitePass v23.7.592-55-member-room-three-column-align
 * 회원 대화도 같은 3열 규칙: 왼쪽(아이콘+회원명) / 가운데(장비번호+최근내용) / 오른쪽(알림상태+읽음/시간).
 */
.sp566-member-room-button.sp592-member-room-grid {
  grid-template-columns: minmax(118px, 130px) minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.sp592-member-room-ident {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sp592-member-room-ident b {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111827;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.3px;
  line-height: 1.15;
}
.sp592-member-room-content {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
}
.sp566-member-room-meta .sp592-member-notice-pill {
  padding: 2px 6px;
  background: #ecfdf5;
  color: #047857;
  font-size: 9px;
}
.sp566-member-room-meta .sp592-member-notice-pill.off {
  background: #f1f5f9;
  color: #64748b;
}
.sp566-member-room-meta i.sp592-member-unread {
  color: #dc2626;
  font-weight: 950;
}
@media (max-width: 560px) {
  .sp566-member-room-button.sp592-member-room-grid {
    grid-template-columns: minmax(112px, 126px) minmax(0, 1fr) auto;
    gap: 6px;
  }
  .sp592-member-room-ident { gap: 5px; }
  .sp592-member-room-ident b { font-size: 13px; }
  .sp592-member-room-content { font-size: 10.5px; }
}


/* SitePass v23.7.593-55-member-name-preserve-preview-larger
 * 회원 대화 카드도 동일: 아이콘+회원명은 잘리지 않게, 가운데 장비번호/최근내용은 조금 크게.
 */
.sp566-member-room-button.sp592-member-room-grid {
  grid-template-columns: minmax(145px, 160px) minmax(0, 1fr) auto;
}
.sp592-member-room-ident b {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  flex: 0 0 auto;
}
.sp592-member-room-content {
  font-size: 12.5px;
}
@media (max-width: 560px) {
  .sp566-member-room-button.sp592-member-room-grid {
    grid-template-columns: minmax(132px, 145px) minmax(0, 1fr) auto;
  }
  .sp592-member-room-ident b { font-size: 13px; }
  .sp592-member-room-content { font-size: 11.5px; }
}

/* SitePass v23.7.594-55-member-equipment-under-name
 * 회원방 카드 왼쪽은 아이콘 + 회원명/대표 활성장비 2줄,
 * 가운데는 요청상태(있을 때) + 최근 대화내용만 표시.
 * 대표 표기: 장비명 장비번호 외 N대. 기존 3열/말줄임/우측 상태는 유지.
 */
.sp566-member-room-button.sp592-member-room-grid {
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr) auto;
}
.sp594-member-room-ident-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}
.sp594-member-room-ident-copy b {
  display: block;
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.3px;
  line-height: 1.05;
  white-space: nowrap;
}
.sp594-member-room-ident-copy small {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #385782;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .sp566-member-room-button.sp592-member-room-grid {
    grid-template-columns: minmax(168px, 190px) minmax(0, 1fr) auto;
  }
  .sp594-member-room-ident-copy b { font-size: 13px; }
  .sp594-member-room-ident-copy small { font-size: 9.8px; }
}


/* SitePass v23.7.595-55-member-room-push-toggle-align
 * 고정방과 같은 열 너비를 사용하고 회원방 내부에도 서버 저장형 Push ON/OFF를 제공한다.
 */
.sp566-member-room-button.sp595-room-grid {
  grid-template-columns: var(--sp595-room-left-column, minmax(190px, 220px)) minmax(0, 1fr) var(--sp595-room-right-column, 84px);
  column-gap: var(--sp595-room-column-gap, 7px);
}
.sp566-member-room-button.sp595-room-grid .sp595-room-meta {
  width: var(--sp595-room-right-column, 84px);
  min-width: var(--sp595-room-right-column, 84px);
  align-items: flex-end;
}
.sp595-member-room-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  white-space: nowrap;
}
.sp595-member-room-notice-toggle {
  border: 0;
  border-radius: 999px;
  padding: 7px 9px;
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
}
.sp595-member-room-notice-toggle.off {
  background: #e5e7eb;
  color: #475569;
}
.sp595-member-room-notice-toggle:disabled {
  opacity: 0.62;
  cursor: wait;
}
@media (max-width: 560px) {
  .sp566-member-room-button.sp595-room-grid {
    grid-template-columns: var(--sp595-room-left-column, minmax(168px, 190px)) minmax(0, 1fr) var(--sp595-room-right-column, 76px);
    column-gap: var(--sp595-room-column-gap, 5px);
  }
  .sp595-member-room-notice-toggle {
    padding: 6px 8px;
    font-size: 10px;
  }
}


/* SitePass v23.7.597-55-member-chat-select-delete
 * 공유기록을 제외한 방의 삭제는 서버 원본을 보존하고 현재 회원 화면에서만 숨긴다.
 */
.sp597-member-delete-start {
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: #b42318;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}
.sp597-member-delete-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 8px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}
.sp597-member-delete-bar strong {
  color: #475569;
  font-size: 12px;
  text-align: center;
}
.sp597-member-delete-cancel,
.sp597-member-delete-confirm {
  border: 0;
  border-radius: 11px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 950;
}
.sp597-member-delete-cancel { background: #eef1f5; color: #475569; }
.sp597-member-delete-confirm { background: #dc2626; color: #fff; }
.sp597-member-delete-confirm:disabled { opacity: .42; }
.sp566-member-messages.selecting .sp566-member-message-row {
  align-items: center;
  gap: 8px;
}
.sp597-member-delete-check {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sp597-member-delete-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sp597-member-delete-check span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: transparent;
  font-size: 13px;
  font-weight: 950;
}
.sp597-member-delete-check input:checked + span {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}
.sp566-member-message-row.mine .sp597-member-delete-check { order: 2; }
@media (max-width: 560px) {
  .sp597-member-delete-start { padding: 5px 8px; font-size: 10px; }
  .sp597-member-delete-bar { gap: 6px; padding: 7px; }
}


/* SitePass v23.7.598-55-member-delete-left-of-push-toggle
 * 연동 상태는 위에 유지하고, 삭제와 알림 ON/OFF는 같은 줄에 배치한다.
 */
.sp598-member-room-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}
.sp598-member-room-action-row .sp597-member-delete-start,
.sp598-member-room-action-row .sp595-member-room-notice-toggle {
  min-height: 34px;
  margin: 0;
}
@media (max-width: 560px) {
  .sp595-member-room-head-actions {
    gap: 4px;
  }
  .sp598-member-room-action-row {
    gap: 5px;
  }
  .sp598-member-room-action-row .sp597-member-delete-start,
  .sp598-member-room-action-row .sp595-member-room-notice-toggle {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 10px;
  }
}


/* SitePass v23.7.602-55-reference-card-ui
 * 첨부 + 버튼은 사진·파일 전용으로 유지하고,
 * 장비카드/서류카드/서류갱신요청은 별도 3개 고정행으로 제공한다.
 */
.sp602-reference-action-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.sp566-member-composer .sp602-reference-action-row button {
  min-width: 0;
  height: 34px;
  border: 1px solid #d8e1ec;
  border-radius: 11px;
  padding: 0 6px;
  background: #f5f8fc;
  color: #30415d;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.sp566-member-composer .sp602-reference-action-row button:hover {
  border-color: #9eb5d7;
  background: #edf4ff;
  color: #2455a5;
}
.sp566-member-composer .sp602-reference-action-row button:disabled {
  cursor: wait;
  opacity: 0.5;
}
.sp602-reference-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.sp602-reference-modal.hidden { display: none !important; }
.sp602-reference-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(15, 23, 42, 0.52);
}
.sp602-reference-sheet {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(78vh, 720px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px 24px 18px 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}
.sp602-reference-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e6ebf2;
  padding: 17px 18px 14px;
}
.sp602-reference-sheet-head > div { min-width: 0; }
.sp602-reference-sheet-head small {
  display: block;
  margin-bottom: 3px;
  color: #7890b0;
  font-size: 10px;
  font-weight: 950;
}
.sp602-reference-sheet-head b {
  display: block;
  color: #172033;
  font-size: 18px;
  font-weight: 1000;
}
.sp602-reference-sheet-head p {
  margin: 5px 0 0;
  color: #6f7d91;
  font-size: 12px;
  font-weight: 750;
}
.sp602-reference-close {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #eef2f7;
  color: #44526a;
  font-size: 24px;
  line-height: 1;
}
.sp602-reference-picker-body {
  max-height: calc(min(78vh, 720px) - 96px);
  overflow-y: auto;
  padding: 14px;
}
.sp602-reference-choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sp602-reference-choice {
  width: 100%;
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #dde5ef;
  border-radius: 16px;
  padding: 9px 10px;
  background: #fff;
  text-align: left;
}
.sp602-reference-choice:hover:not(:disabled) {
  border-color: #a8bfdf;
  background: #f5f9ff;
}
.sp602-reference-choice:disabled { opacity: 0.52; }
.sp602-reference-choice-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #eef4fb;
  font-size: 21px;
}
.sp602-reference-choice-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sp602-reference-choice-copy b {
  overflow: hidden;
  color: #1f2b3e;
  font-size: 14px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp602-reference-choice-copy small {
  color: #728096;
  font-size: 11px;
  font-weight: 800;
}
.sp602-reference-choice em {
  border-radius: 10px;
  padding: 7px 9px;
  background: #edf4ff;
  color: #2455a5;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}
.sp602-reference-choice.document.expired .sp602-reference-choice-icon { background: #fff0f0; }
.sp602-reference-choice.document.expired .sp602-reference-choice-copy small { color: #b0414e; }
.sp602-reference-choice.document.today .sp602-reference-choice-icon { background: #fff5df; }
.sp602-reference-back {
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #eef2f7;
  color: #4a5b74;
  font-size: 11px;
  font-weight: 900;
}
.sp602-reference-selected-equipment {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 11px 2px 10px;
  color: #21304a;
}
.sp602-reference-selected-equipment b { font-size: 14px; font-weight: 1000; }
.sp602-reference-selected-equipment span { color: #718096; font-size: 11px; font-weight: 850; }
.sp602-reference-status {
  border-radius: 14px;
  padding: 22px 14px;
  background: #f5f7fa;
  color: #66758b;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}
.sp602-reference-status.error { background: #fff1f2; color: #a53b4a; }
body.sp602-reference-modal-open { overflow: hidden; }
.sp566-member-message-row.reference .sp566-member-message-bubble {
  width: min(86%, 390px);
  max-width: min(86%, 390px);
  padding: 8px;
}
.sp566-member-message-row.mine.reference .sp566-member-message-bubble {
  border-color: #d9c400;
  background: #fee500;
}
.sp602-reference-message-text {
  margin: 3px 3px 8px;
  color: #263247;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.sp602-reference-message {
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}
.sp602-reference-message header {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
}
.sp602-reference-message-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #edf4ff;
  font-size: 19px;
}
.sp602-reference-message header > div { min-width: 0; }
.sp602-reference-message header b {
  display: block;
  overflow: hidden;
  color: #1f2b3e;
  font-size: 12px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp602-reference-message header small {
  display: block;
  overflow: hidden;
  margin: 3px 0 0;
  color: #718096;
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp602-reference-message header em {
  border-radius: 9px;
  padding: 5px 7px;
  background: #eaf8f0;
  color: #23784c;
  font-size: 9px;
  font-style: normal;
  font-weight: 1000;
  white-space: nowrap;
}
.sp602-reference-message.expired header em,
.sp602-reference-message.unavailable header em { background: #fff0f1; color: #a53b4a; }
.sp602-reference-message.today header em { background: #fff5df; color: #9a6518; }
.sp602-reference-message.changed header em { background: #edf4ff; color: #2455a5; }
.sp602-reference-message footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  border-top: 1px solid #e7edf4;
  padding: 7px 10px;
  background: #f7f9fc;
}
.sp602-reference-message footer span {
  color: #485870;
  font-size: 9px;
  font-weight: 900;
}
.sp602-reference-message footer small {
  margin: 0;
  color: #8a96a8;
  font-size: 8px;
  font-weight: 750;
  text-align: right;
}
@media (max-width: 560px) {
  .sp566-member-composer .sp602-reference-action-row button {
    height: 32px;
    padding: 0 3px;
    font-size: 10px;
  }
  .sp602-reference-modal { padding: 0; }
  .sp602-reference-sheet {
    width: 100%;
    max-height: 84vh;
    border-radius: 22px 22px 0 0;
  }
  .sp602-reference-picker-body { max-height: calc(84vh - 96px); }
  .sp602-reference-choice { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; }
  .sp602-reference-choice-icon { width: 38px; height: 38px; }
  .sp566-member-message-row.reference .sp566-member-message-bubble {
    width: 91%;
    max-width: 91%;
  }
  .sp602-reference-message header { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 7px; padding: 8px; }
  .sp602-reference-message-icon { width: 34px; height: 34px; }
  .sp602-reference-message footer { align-items: flex-start; flex-direction: column; }
  .sp602-reference-message footer small { text-align: left; }
}

/* SitePass v23.7.603-55-request-summary-one-line-collapse
 * 장비 연동 요청은 기본 한 줄 요약으로 표시하고, 탭하면 상세 장비와 승인 버튼을 펼칩니다.
 * 채팅 메시지 영역 높이를 확보하면서 기존 승인/거절 기능은 그대로 유지합니다.
 */
.sp566-member-request-groups {
  gap: 6px;
  margin-bottom: 8px;
}

.sp566-member-request-card {
  padding: 0;
  overflow: hidden;
  border-radius: 15px;
}

.sp566-member-request-card-head {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 18px;
  gap: 7px;
  align-items: center;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.sp566-member-request-card-head b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.15;
}

.sp603-member-request-summary {
  min-width: 0;
  overflow: hidden;
  color: #52647d;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp566-member-request-status {
  padding: 3px 7px;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.sp603-member-request-chevron {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  transition: transform 0.18s ease;
}

.sp566-member-request-card.expanded .sp603-member-request-chevron {
  transform: rotate(180deg);
}

.sp603-member-request-body {
  padding: 0 10px 10px;
}

.sp603-member-request-body.hidden {
  display: none !important;
}

@media (max-width: 560px) {
  .sp566-member-request-card-head {
    grid-template-columns: auto minmax(42px, 1fr) auto 16px;
    gap: 5px;
    padding: 8px 9px;
  }

  .sp566-member-request-card-head b {
    font-size: 12px;
  }

  .sp603-member-request-summary {
    font-size: 10px;
  }

  .sp566-member-request-status {
    padding: 3px 6px;
    font-size: 9px;
  }
}



/* SitePass v23.7.604-55-chat-compact-no-reference-actions
 * 채팅방은 활성 연동 후 열리므로 중복 설명문을 제거하고 헤더 높이를 축소한다.
 * 참조카드 발송행은 DOM에서 제거하며 composer는 +/입력/전송 한 줄만 유지한다.
 */
.sp566-member-room-head {
  margin-bottom: 8px;
}
.sp566-member-room-title {
  display: flex;
  align-items: center;
  min-height: 38px;
}
.sp566-member-room-title b {
  line-height: 1.15;
}

/* SitePass v23.7.605-55-member-link-owner-broadcast */
.sp605-bulk-send-card.hidden,
.sp605-bulk-send-modal.hidden,
.sp605-bulk-result.hidden {
  display: none !important;
}

.sp605-bulk-send-card {
  width: 100%;
  margin: 8px 0 0;
  border: 1px solid #cfe1fb;
  border-radius: 17px;
  background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 100%);
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: #111827;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(37, 86, 180, 0.06);
}

.sp605-bulk-send-card:active {
  transform: translateY(1px);
}

.sp605-bulk-send-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf3ff;
  font-size: 19px;
}

.sp605-bulk-send-copy {
  min-width: 0;
}

.sp605-bulk-send-copy b,
.sp605-bulk-send-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp605-bulk-send-copy b {
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.25px;
}

.sp605-bulk-send-copy small {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 760;
}

.sp605-bulk-send-arrow {
  color: #5574a5;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.sp605-bulk-send-modal {
  position: fixed;
  inset: 0;
  z-index: 10090;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}

.sp605-bulk-send-dialog {
  width: min(100%, 560px);
  max-height: min(88vh, 760px);
  overflow: auto;
  border: 1px solid #dce6f5;
  border-radius: 23px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 24px 65px rgba(15, 23, 42, 0.24);
}

.sp605-bulk-send-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sp605-bulk-send-head > div {
  min-width: 0;
}

.sp605-bulk-send-head b,
.sp605-bulk-send-head small {
  display: block;
}

.sp605-bulk-send-head b {
  color: #111827;
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -0.5px;
}

.sp605-bulk-send-head small {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.sp605-bulk-send-head > button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.sp605-bulk-send-search-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.sp605-bulk-send-search-row input,
.sp605-bulk-field input,
.sp605-bulk-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d8e2f0;
  border-radius: 13px;
  background: #f8fafc;
  color: #111827;
  font: inherit;
  outline: none;
}

.sp605-bulk-send-search-row input,
.sp605-bulk-field input {
  min-height: 42px;
  padding: 0 12px;
}

.sp605-bulk-field textarea {
  min-height: 112px;
  padding: 11px 12px;
  line-height: 1.5;
  resize: vertical;
}

.sp605-bulk-send-search-row input:focus,
.sp605-bulk-field input:focus,
.sp605-bulk-field textarea:focus {
  border-color: #6c93dd;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(74, 119, 205, 0.12);
}

.sp605-bulk-send-search-row button {
  min-width: 78px;
  border: 1px solid #bfd2f0;
  border-radius: 13px;
  background: #eef5ff;
  color: #244e96;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.sp605-bulk-send-search-row button:disabled {
  cursor: default;
  opacity: 0.55;
}

.sp605-bulk-target-summary {
  margin: 10px 2px 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.sp605-bulk-target-list {
  max-height: 238px;
  overflow: auto;
  display: grid;
  gap: 7px;
  padding: 2px;
}

.sp605-bulk-target-row {
  border: 1px solid #e1e9f5;
  border-radius: 14px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: auto 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  background: #ffffff;
  cursor: pointer;
}

.sp605-bulk-target-row.selected {
  border-color: #86a9e4;
  background: #f0f6ff;
}

.sp605-bulk-target-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #315fae;
}

.sp605-bulk-target-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf3fb;
  font-size: 17px;
}

.sp605-bulk-target-copy {
  min-width: 0;
}

.sp605-bulk-target-copy b,
.sp605-bulk-target-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp605-bulk-target-copy b {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.sp605-bulk-target-copy small {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 730;
}

.sp605-bulk-empty {
  padding: 25px 10px;
  border: 1px dashed #d7e1ef;
  border-radius: 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.sp605-bulk-field {
  margin-top: 12px;
  display: block;
}

.sp605-bulk-field > span {
  margin: 0 2px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.sp605-bulk-field > span i {
  color: #8290a6;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.sp605-bulk-result {
  margin-top: 11px;
  border-radius: 12px;
  padding: 9px 11px;
  background: #ecfdf3;
  color: #14733b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
}

.sp605-bulk-result.error {
  background: #fff5f2;
  color: #b33a26;
}

.sp605-bulk-send-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8px;
}

.sp605-bulk-send-actions button {
  min-height: 45px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.sp605-bulk-send-actions .cancel {
  border: 1px solid #d8e2f0;
  background: #ffffff;
  color: #475569;
}

.sp605-bulk-send-actions .send {
  border: 1px solid #254f96;
  background: #163d7d;
  color: #ffffff;
}

.sp605-bulk-send-actions button:disabled {
  cursor: default;
  opacity: 0.5;
}

.sp605-bulk-send-note {
  margin: 9px 2px 0;
  color: #7b8799;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 520px) {
  .sp605-bulk-send-modal {
    padding: 10px 8px max(10px, env(safe-area-inset-bottom));
    align-items: flex-end;
  }

  .sp605-bulk-send-dialog {
    max-height: 92vh;
    border-radius: 22px 22px 16px 16px;
    padding: 14px;
  }

  .sp605-bulk-target-list {
    max-height: 205px;
  }
}

/* SitePass v23.7.608-55-member-chat-polished-header-recipient-qr-restore
 * 회원채팅방 상단을 상대회원/장비연동 요청/삭제/알림으로 한 줄 통합한다.
 * 메시지 composer는 방 최하단에 고정하고, 회원연동채팅 목록에는 카카오톡형 +초대를 제공한다.
 * 단체 전송은 각 기존 1:1 회원채팅방으로 개별 저장되며 수신자끼리는 노출되지 않는다.
 */
.sp606-member-chat-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.sp606-member-chat-label > b {
  white-space: nowrap;
}

.sp606-member-chat-label #sp566MemberPendingLabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp606-invite-button {
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  background: #fee500;
  color: #111827;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.sp606-invite-button.hidden {
  display: none !important;
}

.sp566-member-room-panel {
  height: calc(100dvh - 145px);
  min-height: 520px;
  max-height: 820px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sp566-member-room-head.sp606-member-room-head {
  flex: 0 0 auto;
  grid-template-columns: 38px minmax(88px, 1fr) auto auto;
  gap: 7px;
  margin-bottom: 8px;
}

.sp606-member-room-title {
  min-width: 0;
}

.sp606-member-room-title b {
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp606-member-request-toggle {
  min-height: 34px;
  border: 1px solid #b7e5ce;
  border-radius: 999px;
  padding: 6px 9px;
  background: #f2fbf6;
  color: #087443;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.sp606-member-request-toggle::after {
  content: '⌄';
  display: inline-block;
  margin-left: 4px;
  color: #64748b;
  transition: transform .18s ease;
}

.sp606-member-request-toggle.expanded::after {
  transform: rotate(180deg);
}

.sp606-member-request-toggle.hidden {
  display: none !important;
}

.sp606-member-room-head-actions {
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.sp606-member-room-head-actions .sp598-member-room-action-row {
  gap: 5px;
}

.sp606-member-room-head-actions .sp597-member-delete-start,
.sp606-member-room-head-actions .sp595-member-room-notice-toggle {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 10px;
}

.sp566-member-request-groups {
  flex: 0 0 auto;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 7px;
}

.sp566-member-request-groups.hidden {
  display: none !important;
}

.sp606-member-request-detail {
  padding: 8px 9px;
}

.sp606-member-request-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.sp606-member-request-detail-head b {
  color: #111827;
  font-size: 12px;
  font-weight: 950;
}

.sp606-member-request-detail .sp603-member-request-body {
  padding: 0;
}

.sp566-member-messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-bottom: 12px;
}

.sp566-member-composer {
  position: sticky;
  bottom: 0;
  z-index: 8;
  flex: 0 0 auto;
  margin-top: auto;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -8px 22px rgba(15, 23, 42, .05);
}

.sp566-member-read-only {
  flex: 0 0 auto;
  margin-top: auto;
}

.sp605-bulk-send-card {
  display: none !important;
}

.sp605-bulk-send-modal {
  align-items: stretch;
  justify-content: center;
  padding: 18px;
}

.sp606-group-send-dialog {
  width: min(100%, 520px);
  height: min(720px, calc(100dvh - 36px));
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sp606-group-send-dialog .sp605-bulk-send-head,
.sp606-group-send-dialog .sp605-bulk-send-search-row,
.sp606-group-send-dialog .sp605-bulk-target-summary,
.sp606-group-send-dialog .sp605-bulk-result,
.sp606-group-send-dialog .sp605-bulk-send-note {
  flex: 0 0 auto;
}

.sp606-group-send-dialog .sp605-bulk-target-list {
  flex: 1 1 auto;
  min-height: 140px;
  max-height: none;
  overflow-y: auto;
}

.sp606-group-composer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  border: 1px solid #dfe7f2;
  border-radius: 17px;
  padding: 8px;
  background: #ffffff;
}

.sp606-group-composer textarea {
  width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: 96px;
  resize: none;
  border: 1px solid #dce4ef;
  border-radius: 13px;
  padding: 11px 10px;
  background: #f8fafc;
  color: #111827;
  font-size: 13px;
  font-weight: 750;
  line-height: 20px;
  box-sizing: border-box;
  outline: none;
}

.sp606-group-composer button {
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: #111827;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.sp606-group-composer button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

body.sp606-group-send-open {
  overflow: hidden;
}

@media (max-width: 680px) {
  .sp566-member-room-panel {
    height: calc(100dvh - 132px);
    min-height: 480px;
  }

  .sp566-member-room-head.sp606-member-room-head {
    grid-template-columns: 34px minmax(78px, 1fr) auto auto;
    gap: 5px;
  }

  .sp566-member-room-back {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .sp606-member-room-title b {
    font-size: 15px;
  }

  .sp606-member-request-toggle {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 9.5px;
  }

  .sp606-member-room-head-actions .sp597-member-delete-start,
  .sp606-member-room-head-actions .sp595-member-room-notice-toggle {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 9.5px;
  }

  .sp605-bulk-send-modal {
    padding: 8px;
  }

  .sp606-group-send-dialog {
    height: calc(100dvh - 16px);
    border-radius: 20px;
  }
}

@media (max-width: 460px) {
  .sp566-member-room-head.sp606-member-room-head {
    grid-template-columns: 32px minmax(66px, 1fr) auto auto;
    gap: 4px;
  }

  .sp606-member-room-title b {
    font-size: 14px;
  }

  .sp606-member-request-toggle {
    padding: 5px 6px;
    font-size: 9px;
  }

  .sp606-member-room-head-actions .sp598-member-room-action-row {
    gap: 3px;
  }

  .sp606-member-room-head-actions .sp597-member-delete-start,
  .sp606-member-room-head-actions .sp595-member-room-notice-toggle {
    padding: 5px 6px;
    font-size: 9px;
  }
}


/* SitePass v23.7.608-55-member-chat-polished-header-recipient-qr-restore
 * 헤더는 좌측 회원, 정중앙 장비연동 요청, 우측 삭제/알림의 3열 고정.
 * 단체발송 검색/전체선택 높이는 약 1/3 축소하고 대상은 위에서부터 10명씩 페이지 표시.
 */
.sp566-member-room-head.sp606-member-room-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.sp607-member-room-left {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
}

.sp607-member-room-left .sp566-member-room-back {
  flex: 0 0 auto;
}

.sp607-member-room-left .sp606-member-room-title {
  min-width: 0;
}

.sp606-member-request-toggle {
  justify-self: center;
  align-self: center;
}

.sp606-member-room-head-actions {
  justify-self: end;
  align-self: center;
}

.sp606-member-room-head-actions .sp598-member-room-action-row {
  display: flex;
  align-items: center;
}

.sp606-group-send-dialog .sp605-bulk-send-head b {
  font-size: 17px;
}

.sp606-group-send-dialog .sp605-bulk-send-head small {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.3;
}

.sp606-group-send-dialog .sp605-bulk-send-head > button {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 20px;
}

.sp606-group-send-dialog .sp605-bulk-send-search-row {
  margin-top: 9px;
  gap: 6px;
}

.sp606-group-send-dialog .sp605-bulk-send-search-row input {
  min-height: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
}

.sp606-group-send-dialog .sp605-bulk-send-search-row button {
  min-width: 68px;
  height: 30px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1;
}

.sp606-group-send-dialog .sp605-bulk-target-summary {
  margin: 7px 2px 5px;
  font-size: 11px;
}

.sp606-group-send-dialog .sp605-bulk-target-list {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 6px;
}

.sp607-bulk-pager {
  flex: 0 0 auto;
  min-height: 30px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.sp607-bulk-pager > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sp607-bulk-pager b {
  min-width: 72px;
  color: #334155;
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

.sp607-bulk-pager button {
  height: 28px;
  min-width: 45px;
  border: 1px solid #d8e2f0;
  border-radius: 9px;
  background: #ffffff;
  color: #31578f;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.sp607-bulk-pager button:disabled {
  color: #9aa7b8;
  background: #f4f7fb;
  cursor: default;
  opacity: .7;
}

@media (max-width: 680px) {
  .sp566-member-room-head.sp606-member-room-head {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 5px;
  }

  .sp607-member-room-left {
    gap: 5px;
  }

  .sp607-bulk-pager {
    font-size: 9.5px;
  }
}

@media (max-width: 460px) {
  .sp566-member-room-head.sp606-member-room-head {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 3px;
  }

  .sp607-member-room-left {
    gap: 3px;
  }

  .sp607-bulk-pager > span {
    display: none;
  }

  .sp607-bulk-pager {
    justify-content: flex-end;
  }
}


/* SitePass v23.7.608-55-member-chat-polished-header-recipient-qr-restore
 * 뒤로가기 흰색 버튼 축소, 중앙 장비연동 요청을 2단 정보+chevron으로 정돈한다.
 */
.sp566-member-room-head.sp606-member-room-head {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 8px;
}

.sp607-member-room-left {
  gap: 6px;
}

.sp607-member-room-left .sp566-member-room-back {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 11px;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sp606-member-request-toggle {
  position: relative;
  min-width: 128px;
  min-height: 48px;
  padding: 6px 27px 12px 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  line-height: 1.05;
}

.sp606-member-request-toggle::after {
  content: none !important;
}

.sp608-request-main {
  display: block;
  color: #087443;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.sp608-request-equipment {
  display: block;
  max-width: 150px;
  overflow: hidden;
  color: #426457;
  font-size: 9.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp608-request-chevron {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #2f7a5b;
  border-bottom: 2px solid #2f7a5b;
  transform: translateX(-50%) rotate(45deg);
  transition: transform .18s ease, bottom .18s ease;
}

.sp606-member-request-toggle.expanded .sp608-request-chevron {
  bottom: 2px;
  transform: translateX(-50%) rotate(225deg);
}

@media (max-width: 680px) {
  .sp566-member-room-head.sp606-member-room-head {
    column-gap: 5px;
  }

  .sp607-member-room-left {
    gap: 5px;
  }

  .sp607-member-room-left .sp566-member-room-back {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 10px;
    font-size: 19px;
  }

  .sp606-member-request-toggle {
    min-width: 116px;
    min-height: 46px;
    padding: 5px 22px 11px 9px;
  }

  .sp608-request-main {
    font-size: 10px;
  }

  .sp608-request-equipment {
    max-width: 132px;
    font-size: 9px;
  }
}

@media (max-width: 460px) {
  .sp607-member-room-left .sp566-member-room-back {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 9px;
    font-size: 18px;
  }

  .sp607-member-room-left {
    gap: 4px;
  }

  .sp606-member-request-toggle {
    min-width: 108px;
    padding-left: 7px;
    padding-right: 19px;
  }

  .sp608-request-equipment {
    max-width: 116px;
  }
}


/* SitePass v23.7.609-55-chat-header-fullname-qr-retry-fixed-room-back */
.sp566-member-room-head.sp606-member-room-head { grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); min-height:42px; column-gap:8px; }
.sp607-member-room-left { gap:6px; min-width:0; }
.sp607-member-room-left .sp566-member-room-back { width:26px; height:26px; min-width:26px; min-height:26px; padding:0; border-radius:9px; display:grid; place-items:center; font-family:Arial,sans-serif; font-size:19px; font-weight:900; line-height:1; text-align:center; text-indent:0; transform:none; }
.sp606-member-room-title b { font-family:"Pretendard Variable",Pretendard,"Noto Sans KR","Apple SD Gothic Neo",sans-serif; font-size:16px; font-weight:850; letter-spacing:-.035em; line-height:1.15; white-space:nowrap; }
.sp606-member-request-toggle { min-width:0; max-width:min(42vw,310px); min-height:40px; padding:5px 22px 11px 11px; display:inline-flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; overflow:hidden; }
.sp609-request-line { max-width:100%; display:inline-flex; align-items:center; justify-content:center; gap:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sp609-request-divider { flex:0 0 auto; color:#68a087; font-size:10px; font-weight:900; }
.sp608-request-main,.sp608-request-equipment { display:inline-block; max-width:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:1.05; }
.sp608-request-main { flex:0 0 auto; font-size:10.5px; }
.sp608-request-equipment { flex:1 1 auto; min-width:0; font-size:9.5px; }
.sp608-request-chevron { bottom:4px; width:6px; height:6px; }
@media(max-width:680px){.sp607-member-room-left .sp566-member-room-back{width:26px;height:26px;min-width:26px;min-height:26px;border-radius:9px;font-size:19px}.sp606-member-room-title b{font-size:15px}.sp606-member-request-toggle{max-width:min(43vw,260px);min-height:38px;padding:5px 18px 10px 8px}.sp608-request-main{font-size:10px}.sp608-request-equipment{font-size:9px}}
@media(max-width:460px){.sp607-member-room-left .sp566-member-room-back{width:24px;height:24px;min-width:24px;min-height:24px;border-radius:8px;font-size:18px}.sp607-member-room-left{gap:4px}.sp606-member-room-title b{font-size:14px}.sp606-member-request-toggle{max-width:45vw;padding-left:7px;padding-right:16px}.sp609-request-line{gap:3px}}


/* SitePass v23.7.610-55-back-icon-svg-exact-center
 * 뒤로가기 문자를 SVG로 교체하여 글꼴 baseline 영향 없이 흰색 버튼의 가로·세로 정중앙에 고정한다.
 */
.sp607-member-room-left .sp566-member-room-back {
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  line-height: 0 !important;
  text-indent: 0 !important;
  overflow: hidden;
}
.sp607-member-room-left .sp566-member-room-back .sp610-back-svg {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
  transform: none;
}
@media (max-width: 460px) {
  .sp607-member-room-left .sp566-member-room-back .sp610-back-svg { width: 13px; height: 13px; }
}


/* SitePass v23.7.611-55-header-unified-inline-chevron-recipient-qr-refresh
 * 회원채팅 헤더 글자 크기/세로축 통일, 장비연동 chevron을 로더 오른쪽 같은 줄에 고정.
 */
.sp566-member-room-head.sp606-member-room-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  column-gap: 8px;
  --sp611-head-font-size: 14px;
  --sp611-head-font-weight: 700;
}

.sp607-member-room-left,
.sp606-member-room-head-actions,
.sp606-member-room-head-actions .sp598-member-room-action-row {
  align-items: center;
}

.sp606-member-room-title b,
.sp606-member-request-toggle,
.sp606-member-room-head-actions .sp597-member-delete-start,
.sp606-member-room-head-actions .sp595-member-room-notice-toggle {
  font-family: "Pretendard Variable", Pretendard, SUIT, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif !important;
  font-size: var(--sp611-head-font-size) !important;
  font-weight: var(--sp611-head-font-weight) !important;
  letter-spacing: -0.025em;
  line-height: 1 !important;
  white-space: nowrap;
}

.sp606-member-room-title b {
  display: block;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp606-member-request-toggle {
  position: relative;
  justify-self: center;
  align-self: center;
  min-width: 0;
  max-width: min(54vw, 390px);
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  overflow: hidden;
  text-align: center;
}

.sp609-request-line {
  min-width: 0;
  max-width: 100%;
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  overflow: hidden;
  white-space: nowrap !important;
}

.sp608-request-main,
.sp608-request-equipment,
.sp609-request-divider {
  display: inline-block !important;
  flex: 0 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  color: #087443;
  font-family: inherit !important;
  font-size: var(--sp611-head-font-size) !important;
  font-weight: var(--sp611-head-font-weight) !important;
  letter-spacing: -0.025em;
  line-height: 1 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.sp609-request-divider {
  flex: 0 0 auto;
  color: #4c8f70;
}

.sp608-request-chevron {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  display: inline-block !important;
  flex: 0 0 auto;
  width: 7px !important;
  height: 7px !important;
  margin: -3px 0 0 1px;
  border-right: 2px solid #2f7a5b;
  border-bottom: 2px solid #2f7a5b;
  transform: rotate(45deg) !important;
  transform-origin: center;
  transition: transform .18s ease, margin .18s ease;
}

.sp606-member-request-toggle.expanded .sp608-request-chevron {
  margin-top: 3px;
  transform: rotate(225deg) !important;
}

.sp606-member-room-head-actions .sp598-member-room-action-row {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 5px;
}

.sp606-member-room-head-actions .sp597-member-delete-start,
.sp606-member-room-head-actions .sp595-member-room-notice-toggle {
  min-height: 34px;
  padding: 0 10px;
}

@media (max-width: 680px) {
  .sp566-member-room-head.sp606-member-room-head {
    --sp611-head-font-size: 12px;
    column-gap: 5px;
  }
  .sp607-member-room-left { gap: 5px; }
  .sp606-member-request-toggle {
    max-width: 50vw;
    min-height: 32px;
    padding: 0 8px;
    gap: 4px !important;
  }
  .sp609-request-line { gap: 3px !important; }
  .sp606-member-room-head-actions .sp597-member-delete-start,
  .sp606-member-room-head-actions .sp595-member-room-notice-toggle {
    min-height: 32px;
    padding: 0 7px;
  }
}

@media (max-width: 460px) {
  .sp566-member-room-head.sp606-member-room-head {
    --sp611-head-font-size: 11px;
    column-gap: 3px;
  }
  .sp606-member-request-toggle {
    max-width: 48vw;
    padding: 0 6px;
  }
  .sp606-member-room-head-actions .sp598-member-room-action-row { gap: 3px; }
  .sp606-member-room-head-actions .sp597-member-delete-start,
  .sp606-member-room-head-actions .sp595-member-room-notice-toggle { padding: 0 5px; }
}


/* SitePass v23.7.616-55-clean-split-chat-real-file-cards
 * No layout rules above are replaced. File emoji is replaced with a realistic document/photo card.
 */
.sp606-invite-button {
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(202, 164, 0, 0.18);
}

.sp616-file-visual {
  position: relative;
  display: inline-block;
  overflow: hidden;
  flex: 0 0 auto;
  width: 34px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.10);
  vertical-align: middle;
}

.sp616-file-visual-small {
  width: 30px;
  height: 32px;
  border-radius: 7px;
}

.sp616-file-visual-large {
  width: 58px;
  height: 66px;
  border-radius: 10px;
}

.sp616-file-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sp616-paper {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.sp616-paper-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, transparent 48%, #dce3ec 50%);
}

.sp616-file-ext {
  position: absolute;
  left: 4px;
  top: 5px;
  z-index: 3;
  min-width: 22px;
  max-width: calc(100% - 8px);
  height: 13px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  color: #ffffff;
  font-size: 7px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.02em;
}

.sp616-file-visual-large .sp616-file-ext {
  left: 6px;
  top: 8px;
  min-width: 32px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  font-size: 9px;
}

.sp616-file-pdf .sp616-file-ext { background: #e53935; }
.sp616-file-sheet .sp616-file-ext { background: #16834a; }
.sp616-file-doc .sp616-file-ext { background: #2563c9; }
.sp616-file-hwp .sp616-file-ext { background: #1769d2; }
.sp616-file-text .sp616-file-ext { background: #64748b; }
.sp616-file-generic .sp616-file-ext { background: #475569; }
.sp616-file-image .sp616-file-ext { background: rgba(15, 23, 42, 0.76); }

.sp616-paper-lines {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 6px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sp616-paper-lines i {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #cbd5e1;
}

.sp616-paper-lines i:last-child {
  width: 68%;
}

.sp616-file-visual-large .sp616-paper-lines {
  left: 8px;
  right: 8px;
  bottom: 10px;
  gap: 5px;
}

.sp616-file-visual-large .sp616-paper-lines i {
  height: 3px;
}

.sp616-photo-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #dbeafe 0%, #e0f2fe 54%, #dcfce7 55%, #bbf7d0 100%);
}

.sp616-photo-sun {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.sp616-photo-hill {
  position: absolute;
  bottom: -2px;
  border-radius: 999px 999px 0 0;
}

.sp616-photo-hill.back {
  left: -6px;
  width: 70%;
  height: 42%;
  background: #86efac;
}

.sp616-photo-hill.front {
  right: -8px;
  width: 75%;
  height: 54%;
  background: #22c55e;
}

.sp590-pending-file {
  grid-template-columns: 32px minmax(0, 1fr) 30px;
}

.sp590-message-attachments {
  min-width: min(78vw, 720px);
}

.sp590-message-attachment-card {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-height: 78px;
  padding: 7px 9px;
  border-radius: 14px;
  background: #ffffff;
}

.sp590-pending-file-icon,
.sp590-message-attachment-icon {
  display: none !important;
}

@media (min-width: 920px) {
  .sp566-member-message-row.attachment .sp566-member-message-bubble {
    width: min(96%, 820px);
    max-width: 96%;
  }

  .sp590-message-attachments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 8px;
    min-width: 0;
  }

  .sp590-message-attachment-card {
    min-width: 0;
    min-height: 148px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    padding: 10px 8px 8px;
    text-align: center;
  }

  .sp590-message-attachment-copy {
    width: 100%;
    align-items: center;
  }

  .sp590-message-attachment-copy b {
    width: 100%;
    font-size: 11px;
  }

  .sp590-message-attachment-copy small {
    font-size: 9px;
  }

  .sp590-attachment-download {
    width: 100%;
    min-width: 0;
    height: 28px;
    margin-top: auto;
    border-radius: 8px;
  }

  .sp590-attachment-expired {
    max-width: none;
    margin-top: auto;
    text-align: center;
  }
}

@media (max-width: 919px) {
  .sp616-file-visual-large {
    width: 42px;
    height: 48px;
  }

  .sp590-message-attachment-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    min-height: 60px;
  }
}

/* SitePass v23.7.617-55-chat-wide-conversation-composer-fix
 * Composer stays on one clean line; placeholder must never wrap or show a scrollbar.
 */
#contactScreen #sp566MemberComposer {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: center;
}

#contactScreen #sp566MemberMessageInput {
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  max-height: 96px;
  box-sizing: border-box;
  padding: 11px 13px;
  overflow-y: hidden;
  overflow-x: hidden;
  resize: none;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  line-height: 20px;
}

#contactScreen #sp566MemberMessageInput::placeholder {
  white-space: nowrap;
}

@media (min-width: 920px) {
  #contactScreen #sp566MemberComposer {
    grid-template-columns: 44px minmax(180px, 1fr) 64px;
    gap: 8px;
    padding: 8px;
  }

  #contactScreen #sp566MemberMessageInput {
    font-size: 13px;
  }

  #contactScreen #sp566MemberSendButton {
    width: 64px;
    min-width: 64px;
    height: 44px;
  }
}

@media (max-width: 919px) {
  #contactScreen #sp566MemberMessageInput {
    height: 42px;
    min-height: 42px;
    max-height: 96px;
    padding: 10px 13px;
    line-height: 20px;
  }
}


/* SitePass v23.7.620-55-member-card-fixed-ellipsis
 * 회원방 카드는 2행 고정. 회원명/장비명/최근글은 한 줄을 넘으면 … 처리한다.
 */
@media (min-width: 920px) {
  #contactScreen .sp566-member-room-list,
  #contactScreen .sp566-member-chat-section {
    overflow-x: hidden !important;
  }

  #contactScreen .sp566-member-room-button.sp592-member-room-grid.sp595-room-grid {
    grid-template-columns: minmax(0, 1fr) 80px !important;
    grid-template-rows: auto auto;
    grid-template-areas:
      "ident meta"
      "content meta";
    column-gap: 8px !important;
    row-gap: 3px;
    min-height: 70px;
    padding: 9px 10px !important;
    align-items: center;
    overflow: hidden;
  }

  #contactScreen .sp592-member-room-ident {
    grid-area: ident;
    min-width: 0;
    overflow: hidden;
  }

  #contactScreen .sp594-member-room-ident-copy {
    min-width: 0;
    overflow: hidden;
  }

  #contactScreen .sp594-member-room-ident-copy b,
  #contactScreen .sp594-member-room-ident-copy small {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #contactScreen .sp592-member-room-content {
    grid-area: content;
    min-width: 0;
    margin-left: 48px;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px;
    line-height: 1.2;
    color: #64748b;
  }

  #contactScreen .sp595-room-meta {
    grid-area: meta;
    width: 80px !important;
    min-width: 80px !important;
    align-items: flex-end;
    justify-self: end;
  }
}


/* SitePass v23.7.633-55-compact-horizontal-attachment-actions
 * 첨부파일 카드: 왼쪽 파일 아이콘, 오른쪽 파일정보, 하단 텍스트형 열기/다운로드.
 */
.sp590-message-attachments {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  min-width: min(76vw, 560px) !important;
}

.sp590-message-attachment-card.sp633-attachment-row {
  min-width: 0 !important;
  min-height: 72px !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 50px minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  text-align: left !important;
  border-radius: 13px !important;
}

.sp633-attachment-row .sp616-file-visual-large {
  width: 46px !important;
  height: 52px !important;
  justify-self: start !important;
  flex: none !important;
}

.sp633-attachment-row .sp590-message-attachment-copy {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 3px !important;
  text-align: left !important;
}

.sp633-attachment-row .sp590-message-attachment-copy b {
  width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

.sp633-attachment-row .sp590-message-attachment-copy small {
  font-size: 9.5px !important;
  line-height: 1.3 !important;
}

.sp633-attachment-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  white-space: nowrap;
}

.sp633-attachment-actions button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #2457a6;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.4;
  cursor: pointer;
}

.sp633-attachment-actions button:hover {
  text-decoration: underline;
}

.sp633-attachment-actions button:disabled {
  opacity: 0.52;
  cursor: wait;
  text-decoration: none;
}

.sp633-attachment-actions i {
  color: #94a3b8;
  font-size: 10px;
  font-style: normal;
}

.sp633-attachment-row .sp590-attachment-expired {
  max-width: none !important;
  margin-top: 3px !important;
  text-align: left !important;
}

@media (min-width: 920px) {
  .sp566-member-message-row.attachment .sp566-member-message-bubble {
    width: min(88%, 620px) !important;
    max-width: 88% !important;
  }
}

@media (max-width: 560px) {
  .sp590-message-attachments {
    min-width: min(82vw, 360px) !important;
  }
  .sp590-message-attachment-card.sp633-attachment-row {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    min-height: 62px !important;
    padding: 8px 9px !important;
    gap: 8px !important;
  }
  .sp633-attachment-row .sp616-file-visual-large {
    width: 40px !important;
    height: 46px !important;
  }
}

/* SitePass v23.7.635-55-local-powershell-attachment-card-cleanup
 * 첨부 카드만 국소 수정:
 * - PDF/Excel 아이콘과 텍스트 시작선 정렬
 * - 오른쪽 튀어나옴/가로 스크롤 제거
 * - 연한 노란색 배경 제거
 * - 열기/다운로드 텍스트 링크 유지
 */
#contactScreen .sp566-member-message-row.attachment .sp566-member-message-bubble {
  width: min(100%, 560px) !important;
  max-width: min(100%, 560px) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#contactScreen .sp566-member-message-row.mine.attachment .sp566-member-message-bubble {
  background: #ffffff !important;
  border-color: #e3e9f2 !important;
}

#contactScreen .sp590-message-attachments {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

#contactScreen .sp590-message-attachment-card.sp633-attachment-row {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 12px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#contactScreen .sp633-attachment-row .sp616-file-visual-large {
  width: 42px !important;
  height: 48px !important;
  margin-top: 2px !important;
  align-self: start !important;
  justify-self: start !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  text-align: left !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy b {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  color: #0f172a !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy small {
  display: block !important;
  margin: 0 !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  color: #64748b !important;
}

#contactScreen .sp633-attachment-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 2px !important;
  white-space: nowrap !important;
}

#contactScreen .sp633-attachment-actions button {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  color: #2457a6 !important;
}

#contactScreen .sp633-attachment-actions i {
  color: #94a3b8 !important;
}

#contactScreen .sp566-member-chat-section,
#contactScreen .sp566-member-messages,
#contactScreen .sp566-member-composer {
  overflow-x: hidden !important;
}

@media (max-width: 560px) {
  #contactScreen .sp590-message-attachment-card.sp633-attachment-row {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  #contactScreen .sp633-attachment-row .sp616-file-visual-large {
    width: 38px !important;
    height: 44px !important;
  }
}

/* SitePass v23.7.636-55-restore-outer-yellow-remove-inner-pale
 * 사용자 확정:
 * - 바깥쪽 내가 보낸 메시지의 진한 노란색(#fee500)은 유지
 * - 안쪽 첨부파일 카드의 연한 노란색만 제거
 */
#contactScreen .sp566-member-message-row.mine.attachment .sp566-member-message-bubble {
  background: #fee500 !important;
  border-color: #fee500 !important;
}

#contactScreen .sp590-message-attachment-card.sp633-attachment-row {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* SitePass v23.7.637-55-balanced-attachment-content
 * 카드 전체 폭은 유지하고, 아이콘+파일정보 묶음을 카드 안에서 좌우 균형 있게 배치한다.
 */
#contactScreen .sp590-message-attachment-card.sp633-attachment-row {
  width: min(100%, 440px) !important;
  max-width: 440px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 8px 14px !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 12px !important;
  box-sizing: border-box !important;
}

#contactScreen .sp633-attachment-row .sp616-file-visual-large {
  justify-self: center !important;
}

@media (max-width: 560px) {
  #contactScreen .sp590-message-attachment-card.sp633-attachment-row {
    width: 100% !important;
    max-width: 100% !important;
    padding: 7px 10px !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 10px !important;
  }
}

/* SitePass v23.7.638-55-final-attachment-and-bottom-nav-cleanup
 * 요청 확정 범위만 반영:
 * - 첨부 메시지의 바깥 진한 노란색 유지
 * - 첨부 내용은 카드 폭에 맞춰 오른쪽 빈 공간 최소화
 * - 열기/다운로드를 파일정보 바로 아래에 붙임
 */
#contactScreen .sp566-member-message-row.mine.attachment .sp566-member-message-bubble {
  width: min(100%, 500px) !important;
  max-width: min(100%, 500px) !important;
  background: #fee500 !important;
  border-color: #fee500 !important;
  padding: 10px 12px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#contactScreen .sp590-message-attachments {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  gap: 6px !important;
}

#contactScreen .sp590-message-attachment-card.sp633-attachment-row {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 4px 2px !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#contactScreen .sp633-attachment-row .sp616-file-visual-large {
  width: 42px !important;
  height: 48px !important;
  margin: 0 !important;
  align-self: start !important;
  justify-self: start !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy {
  width: 100% !important;
  min-width: 0 !important;
  gap: 1px !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy b {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.28 !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy small {
  margin: 0 !important;
  font-size: 10px !important;
  line-height: 1.22 !important;
}

#contactScreen .sp633-attachment-actions {
  margin: 1px 0 0 !important;
  gap: 6px !important;
  line-height: 1 !important;
}

#contactScreen .sp633-attachment-actions button,
#contactScreen .sp633-attachment-actions i {
  line-height: 1.1 !important;
}

@media (max-width: 560px) {
  #contactScreen .sp566-member-message-row.mine.attachment .sp566-member-message-bubble {
    width: min(100%, 430px) !important;
    max-width: min(100%, 430px) !important;
    padding: 9px 10px !important;
  }

  #contactScreen .sp590-message-attachment-card.sp633-attachment-row {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 3px 1px !important;
  }
}

/* SitePass v23.7.639-55-fit-attachment-bubble-and-nav-cache-fix
 * 첨부 메시지는 일반 채팅처럼 내용에 맞는 작은 네모 말풍선으로 표시한다.
 */
#contactScreen .sp566-member-message-row.attachment .sp566-member-message-bubble,
#contactScreen .sp566-member-message-row.mine.attachment .sp566-member-message-bubble {
  width: fit-content !important;
  min-width: 280px !important;
  max-width: min(86%, 500px) !important;
  display: inline-block !important;
  padding: 9px 11px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#contactScreen .sp566-member-message-row.mine.attachment .sp566-member-message-bubble {
  background: #fee500 !important;
  border-color: #fee500 !important;
}

#contactScreen .sp590-message-attachments {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: block !important;
  overflow: hidden !important;
}

#contactScreen .sp590-message-attachment-card.sp633-attachment-row {
  width: fit-content !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, auto) !important;
  align-items: start !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#contactScreen .sp633-attachment-row .sp616-file-visual-large {
  width: 38px !important;
  height: 44px !important;
  margin: 0 !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy {
  width: auto !important;
  min-width: 0 !important;
  max-width: 390px !important;
  gap: 0 !important;
  align-items: flex-start !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy b {
  max-width: 390px !important;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy small {
  margin: 0 !important;
  font-size: 9.5px !important;
  line-height: 1.2 !important;
}

#contactScreen .sp633-attachment-actions {
  margin: 0 !important;
  gap: 5px !important;
  line-height: 1 !important;
}

#contactScreen .sp633-attachment-actions button,
#contactScreen .sp633-attachment-actions i {
  line-height: 1 !important;
}

@media (max-width: 560px) {
  #contactScreen .sp566-member-message-row.attachment .sp566-member-message-bubble,
  #contactScreen .sp566-member-message-row.mine.attachment .sp566-member-message-bubble {
    min-width: 240px !important;
    max-width: 88% !important;
    padding: 8px 9px !important;
  }

  #contactScreen .sp633-attachment-row .sp590-message-attachment-copy {
    max-width: 260px !important;
  }

  #contactScreen .sp633-attachment-row .sp590-message-attachment-copy b {
    max-width: 260px !important;
  }
}

/* SitePass v23.7.640-55-attachment-icon-unclip-actions-tight
 * 첨부 아이콘 잘림 제거 + 열기/다운로드를 파일 정보 바로 아래에 밀착.
 */
#contactScreen .sp633-attachment-row .sp616-file-visual-large {
  width: 42px !important;
  height: 48px !important;
  overflow: visible !important;
  flex: 0 0 42px !important;
}

#contactScreen .sp633-attachment-row .sp616-file-visual-large .sp616-file-ext {
  left: 4px !important;
  top: 6px !important;
  min-width: 0 !important;
  max-width: calc(100% - 8px) !important;
  width: auto !important;
  height: 14px !important;
  padding: 0 4px !important;
  border-radius: 4px !important;
  font-size: 7px !important;
  line-height: 14px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy {
  gap: 0 !important;
  line-height: 1 !important;
}

#contactScreen .sp633-attachment-row .sp590-message-attachment-copy b,
#contactScreen .sp633-attachment-row .sp590-message-attachment-copy small {
  margin: 0 !important;
}

#contactScreen .sp633-attachment-actions {
  display: inline-flex !important;
  align-items: center !important;
  margin-top: -1px !important;
  padding: 0 !important;
  gap: 5px !important;
  height: 14px !important;
  min-height: 14px !important;
  line-height: 14px !important;
}

#contactScreen .sp633-attachment-actions button,
#contactScreen .sp633-attachment-actions i {
  margin: 0 !important;
  padding: 0 !important;
  height: 14px !important;
  min-height: 14px !important;
  line-height: 14px !important;
  vertical-align: top !important;
}

@media (max-width: 560px) {
  #contactScreen .sp633-attachment-row .sp616-file-visual-large {
    width: 40px !important;
    height: 46px !important;
    flex-basis: 40px !important;
  }
}


/* SitePass v23.7.642-55-chat-list-width-and-search-reset
 * 사용자 요청 반영:
 * - 회원연동채팅 카드의 이름/장비 한 줄이 더 잘 보이도록 왼쪽 목록 폭을 약간 확장
 * - 아이콘/우측 메타 폭을 소폭 줄여 회원명·장비 정보가 한 줄에 최대한 자연스럽게 들어오도록 조정
 */
@media (min-width: 920px) {
  #contactScreen .sitepass-chat-card {
    grid-template-columns: clamp(362px, 39%, 452px) minmax(0, 1fr) !important;
  }

  #contactScreen .sp566-member-room-button.sp592-member-room-grid.sp595-room-grid {
    grid-template-columns: minmax(0, 1fr) 74px !important;
    column-gap: 7px !important;
    row-gap: 2px !important;
    min-height: 68px !important;
    padding: 8px 10px !important;
  }

  #contactScreen .sp592-member-room-ident {
    gap: 5px !important;
  }

  #contactScreen .sp566-member-room-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 12px !important;
    font-size: 18px !important;
    flex: 0 0 34px !important;
  }

  #contactScreen .sp594-member-room-ident-copy b {
    font-size: 12px !important;
    line-height: 1.12 !important;
    letter-spacing: -0.42px !important;
  }

  #contactScreen .sp592-member-room-content {
    margin-left: 40px !important;
    font-size: 11px !important;
  }

  #contactScreen .sp595-room-meta {
    width: 74px !important;
    min-width: 74px !important;
  }

  #contactScreen .sp566-member-room-meta .sp592-member-notice-pill {
    padding: 2px 5px !important;
    font-size: 8.5px !important;
  }

  #contactScreen .sp595-room-meta i {
    font-size: 10px !important;
  }
}


/* SitePass v23.7.647-55-attachment-picker-overlay-visible
 * 회원채팅 + 첨부 메뉴가 열렸지만 메시지/입력창 뒤 레이어에 가려지는 회귀 수정.
 * 메뉴 로직과 허용 확장자는 변경하지 않고 stacking/overflow만 보강한다.
 */
#contactScreen #sp566MemberRoomPanel {
  isolation: isolate !important;
}

#contactScreen .sp566-member-messages {
  position: relative !important;
  z-index: 1 !important;
}

#contactScreen .sp566-member-composer {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 5000 !important;
  overflow: visible !important;
  isolation: isolate !important;
}

#contactScreen .sp590-attachment-picker-wrap {
  position: relative !important;
  z-index: 5100 !important;
  overflow: visible !important;
}

#contactScreen .sp590-attachment-menu {
  left: 0 !important;
  bottom: calc(100% + 8px) !important;
  z-index: 5200 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#contactScreen .sp590-attachment-menu.hidden {
  display: none !important;
}


/* v660: message delete scope chooser */
.sp660-delete-scope-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  display: grid; place-items: center; padding: 20px;
  background: rgba(15,23,42,.48); backdrop-filter: blur(2px);
}
.sp660-delete-scope-card {
  width: min(360px, 100%); display: grid; gap: 10px;
  border-radius: 20px; padding: 20px; background: #fff;
  box-shadow: 0 24px 70px rgba(15,23,42,.28);
}
.sp660-delete-scope-card b { font-size: 17px; color: #111827; }
.sp660-delete-scope-card p { margin: 0 0 4px; color: #64748b; font-size: 13px; line-height: 1.55; }
.sp660-delete-scope-card button {
  width: 100%; border: 0; border-radius: 13px; padding: 12px 14px;
  background: #eef2f7; color: #1f2937; font-size: 14px; font-weight: 900; cursor: pointer;
}
.sp660-delete-scope-card button.danger { background: #dc2626; color: #fff; }
.sp660-delete-scope-card button.cancel { background: transparent; color: #64748b; }

/* STEP84 member-link mobile-only viewport and close-visibility repair.
 * Fixed-room CSS and member message/Realtime behavior are intentionally untouched.
 */
#contactScreen #sp566MemberRoomPanel.hidden,
#contactScreen #sp566MemberRoomPanel[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  #contactScreen #sp566MemberRoomPanel:not(.hidden):not([hidden]) {
    height: var(--sp663-member-visible-height, calc(100dvh - 132px)) !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  #contactScreen #sp566MemberMessages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
}

/* Existing member-only 460px breakpoint is the first range where the
 * centered request control and right-side alert can collide.
 */
@media (max-width: 460px) {
  #contactScreen .sp566-member-room-head.sp606-member-room-head {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "member actions"
      "request request";
    row-gap: 6px;
  }

  #contactScreen .sp607-member-room-left {
    grid-area: member;
    min-width: 0;
  }

  #contactScreen .sp606-member-room-head-actions {
    grid-area: actions;
    justify-self: end;
  }

  #contactScreen .sp606-member-request-toggle {
    grid-area: request;
    width: min(100%, 320px);
    max-width: 100%;
    justify-self: center;
  }
}


/* SitePass v23.7.746 R14 - contact card share
 * 기존 채팅/첨부/장비카드 CSS를 유지하고 연락처 카드 액션만 최소 추가.
 */
.sp590-attachment-menu {
  min-width: 208px;
}

.sp746-contact-card header small {
  font-size: 11px;
  letter-spacing: 0.01em;
}

.sp746-contact-footer {
  align-items: center !important;
  flex-direction: row !important;
  gap: 0 !important;
}

.sp746-contact-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
}

.sp746-contact-actions button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #2457a6;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
}

.sp746-contact-actions button:hover {
  text-decoration: underline;
}

.sp746-contact-actions i {
  color: #94a3b8;
  font-size: 9px;
  font-style: normal;
  margin: 0 1px;
}

@media (max-width: 560px) {
  .sp746-contact-footer {
    flex-direction: row !important;
    gap: 0 !important;
  }

  .sp746-contact-actions {
    flex-wrap: wrap;
    gap: 2px 4px;
  }

  .sp746-contact-actions button {
    font-size: 10px;
    line-height: 1.3;
  }

  .sp746-contact-actions i {
    margin: 0;
  }
}


/* SitePass v23.7.765 R14 - received recipient-share mobile action row.
 * 연락처 카드 공통 CSS는 유지하고 받은 recipient_share 카드에만 적용.
 */
.sp751-recipient-link-card .sp765-recipient-share-footer {
  align-items: stretch !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.sp751-recipient-link-card .sp765-recipient-share-actions {
  flex-wrap: nowrap !important;
  width: 100%;
  white-space: nowrap;
}

.sp751-recipient-link-card .sp765-recipient-share-expiry {
  display: block;
  width: 100%;
  text-align: right !important;
}


/* SitePass v23.7.751 R14 - recipient link picker + compact share menu. */

/* SitePass v23.7.758 R14 - Kakao-style history-reading new-message control.
 * Absolute positioning keeps the message viewport geometry unchanged.
 */
#contactScreen #sp566MemberRoomPanel {
  position: relative !important;
}

#contactScreen .sp758-member-new-message {
  position: absolute;
  left: 50%;
  z-index: 5050;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  min-height: 34px;
  padding: 8px 14px;
  border: 1px solid rgba(37, 87, 166, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  color: #2457a6;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#contactScreen .sp758-member-new-message.hidden,
#contactScreen .sp758-member-new-message[hidden] {
  display: none !important;
}

#contactScreen .sp758-member-new-message:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

@media (max-width: 680px) {
  #contactScreen .sp758-member-new-message {
    min-height: 36px;
    padding: 9px 14px;
    font-size: 12.5px;
  }
}
