body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #fdf6f6;
  display: flex;
  justify-content: center;
  padding: 20px;
  margin: 0;
}
.container {
  background: white;
  width: 100%;
  max-width: 400px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 30px 20px;
  text-align: center;
  box-sizing: border-box;
}
h1 { color: #e88fa1; font-size: 1.5rem; margin-bottom: 20px; }
input, button {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
}
button {
  background-color: #e88fa1;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
}
button:hover { background-color: #d17a8c; }
.input-group { display: flex; gap: 5px; margin-top: 15px; }
.input-group input { margin-bottom: 0; }
.input-group button { width: auto; white-space: nowrap; }
.diary-list { list-style: none; padding: 0; text-align: left; }
.diary-item {
  background: #fff5f7;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 4px solid #e88fa1;
  word-break: break-all;
}
.author { font-weight: bold; font-size: 0.85rem; color: #e88fa1; margin-bottom: 5px; }
.empty-message { color: #aaa; font-size: 0.9rem; margin-top: 20px; margin-bottom: 20px; text-align: center; }

/* 밴드형 다중 공간 리스트 스타일 추가 */
.spaces-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  text-align: left;
}
.space-card {
  background: #fff5f7;
  border: 1px solid #ffdde4;
  padding: 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.space-card:hover { background: #ffe6eb; transform: translateY(-2px); }
.space-card h3 { margin: 0 0 5px 0; color: #e88fa1; font-size: 1.1rem; }
.space-card p { margin: 0; font-size: 0.8rem; color: #777; }

.tabs { display: flex; gap: 8px; margin-bottom: 10px; overflow-x: auto; padding-bottom: 5px; }
.tabs::-webkit-scrollbar { height: 6px; }
.tabs::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
.tab-btn { background: #eee; color: #555; padding: 6px 12px; border-radius: 15px; font-size: 0.85rem; border: none; cursor: pointer; white-space: nowrap; flex-shrink: 0; width: auto; margin-bottom: 0; }
.tab-btn.active { background: #e88fa1; color: white; font-weight: bold; }

.space-title-container { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; margin-top: 5px; }
.space-title-container h2 { margin: 0; font-size: 1.2rem; color: #e88fa1; }
.btn-toggle-edit { background-color: transparent; color: #888; border: 1px solid #ddd; font-size: 0.75rem; padding: 4px 10px; border-radius: 6px; width: auto; margin: 0; }
.btn-toggle-edit.active { background-color: #e88fa1; color: white; border-color: #e88fa1; }

.action-buttons { display: flex; gap: 5px; margin-top: 8px; }
.btn-edit, .btn-delete { background-color: transparent; padding: 4px 10px; font-size: 0.75rem; border-radius: 6px; cursor: pointer; width: auto; margin-bottom: 0; }
.btn-edit { color: #999; border: 1px solid #ccc; }
.btn-edit:hover { background-color: #f0f0f0; }
.btn-delete { color: #ff6b6b; border: 1px solid #ffb3b3; }
.btn-delete:hover { background-color: #ffe6e6; }

.action-header { display: flex; gap: 10px; margin-bottom: 15px; }
.btn-invite { background-color: #fff; color: #e88fa1; border: 1px solid #e88fa1; padding: 8px; font-size: 0.85rem; border-radius: 8px; flex: 1; margin-bottom: 0; }
.btn-invite:hover { background-color: #fff5f7; }

.nav-bar { display: flex; gap: 8px; margin-bottom: 10px; } 
.nav-btn { flex: 1; background-color: #eee; color: #555; margin-bottom: 0; font-size: 0.85rem; padding: 10px 5px;}
.nav-btn.active { background-color: #e88fa1; color: white; }

.today-date { font-size: 0.75rem; color: #888; text-align: right; margin-bottom: 15px; }
.diary-date-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; background-color: #fff5f7; padding: 8px; border-radius: 8px; }
.diary-date-header h3 { font-size: 1rem; color: #e88fa1; margin: 0; }
.diary-date-header button { width: auto; padding: 4px 10px; background-color: white; color: #e88fa1; border: 1px solid #e88fa1; margin: 0; }
.diary-date-header button:hover { background-color: #ffe6eb; }

.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.calendar-header h2 { font-size: 1.2rem; color: #e88fa1; margin: 0; }
.calendar-header button { width: auto; padding: 6px 15px; background-color: transparent; color: #e88fa1; border: 1px solid #e88fa1; margin: 0; }
.calendar-header button:hover { background-color: #fff5f7; }
.calendar-days-header { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 0.85rem; font-weight: bold; color: #888; margin-bottom: 5px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-day { background-color: #fdf6f6; border-radius: 6px; min-height: 70px; padding: 4px; display: flex; flex-direction: column; cursor: pointer; border: 1px solid transparent; text-align: left; }
.calendar-day:hover { border-color: #e88fa1; }
.day-num { font-size: 0.8rem; font-weight: bold; margin-bottom: 4px; color: #555; }
.calendar-event { background-color: #e88fa1; color: white; font-size: 0.65rem; padding: 3px; border-radius: 4px; margin-bottom: 2px; word-break: break-all; line-height: 1.2; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: white; padding: 25px 20px; border-radius: 12px; width: 90%; max-width: 350px; text-align: left; }
.modal-content h3 { margin-top: 0; color: #e88fa1; text-align: center; margin-bottom: 15px; }
.date-time-group { margin-bottom: 10px; display: flex; gap: 5px; align-items: center; font-size: 0.85rem; }
.date-time-group label { width: 35px; font-weight: bold; color: #555; text-align: center; }
.date-time-group input { padding: 8px; flex: 1; margin-bottom: 0; }
.modal-buttons { display: flex; gap: 8px; margin-top: 20px; }
.modal-buttons button { margin-bottom: 0; flex: 1; }

.album-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.album-item { background: #fff5f7; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; align-items: center; border-left: 4px solid #e88fa1; }
.album-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; margin-bottom: 8px; cursor: zoom-in; } 
.album-item p { margin: 0; font-size: 0.85rem; word-break: break-all; color: #333; }
.file-label { background: #eee; padding: 12px; border-radius: 8px; cursor: pointer; font-size: 0.85rem; white-space: nowrap; display: flex; align-items: center; justify-content: center; margin-bottom: 0; border: 1px solid #ddd; }
.file-label:hover { background: #ddd; }

.chat-container { background-color: #fcfcfc; border-radius: 8px; height: 350px; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 15px; border: 1px solid #eee; }
.chat-container::-webkit-scrollbar { width: 6px; }
.chat-container::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
.chat-message { max-width: 75%; padding: 8px 12px; border-radius: 12px; font-size: 0.9rem; line-height: 1.4; word-break: break-all; display: flex; flex-direction: column; }
.chat-message.mine { align-self: flex-end; background-color: #e88fa1; color: white; border-bottom-right-radius: 2px; }
.chat-message.others { align-self: flex-start; background-color: white; color: #333; border: 1px solid #ddd; border-top-left-radius: 2px; }
.chat-author { font-size: 0.75rem; margin-bottom: 4px; }
.chat-image { max-width: 100%; border-radius: 8px; margin-top: 5px; cursor: zoom-in; }
#btnChatImage:hover { background-color: #ddd !important; }

/* 공감(좋아요) 버튼 스타일 (왼쪽 아래 구석 정렬) */
.reaction-area { 
  display: flex; 
  justify-content: flex-start; /* 왼쪽 정렬 */
  width: 100%; 
  margin-top: auto; /* 내용 아래쪽 끝으로 밀어내기 */
  padding-top: 12px;
}
.btn-like { 
  background: transparent; border: 1px solid #ddd; border-radius: 12px; 
  padding: 4px 12px; font-size: 0.8rem; cursor: pointer; color: #888; transition: 0.2s; 
}
.btn-like:hover { background: #f9f9f9; }
.btn-like.active { background: white; color: #e88fa1; border: 1px solid #ffdde4; font-weight: bold; }

/* 채팅방 공감 버튼 (말풍선 내부 좌측 하단) */
.chat-reaction-area {
  display: flex;
  justify-content: flex-start; /* 항상 말풍선 기준 왼쪽 정렬 */
  margin-top: 5px;
}
.btn-like-chat { 
  background: transparent; border: 1px solid #eee; font-size: 0.75rem; cursor: pointer; 
  color: #aaa; padding: 3px 8px; border-radius: 10px;
}
.btn-like-chat:hover { background: #f9f9f9; }
.btn-like-chat.active { color: #e88fa1; font-weight: bold; background: white; border-color: #ffdde4; }

/* 실시간 알림(Toast) 스타일 */
#toast {
  visibility: hidden;
  min-width: 250px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  text-align: center;
  border-radius: 20px;
  padding: 12px 20px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  font-size: 0.9rem;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s, bottom 0.3s;
  pointer-events: none;
}
#toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 40px;
}