* { box-sizing: border-box; }
/* 이 파일의 여러 클래스(.modal/.room-active/.room-empty 등)가 display를 직접 지정하는데,
   author CSS가 같은 속성에 대해 브라우저 기본 [hidden] { display:none } 규칙보다 우선순위가
   높아서 hidden 속성이 무시되는 문제가 있었음(실측 확인 - 새 대화 모달이 항상 떠 있었음).
   !important로 hidden을 항상 최우선 적용해 고침. */
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  background: #F2F4F8;
  color: #1A1D27;
  -webkit-font-smoothing: antialiased;
  /* 뷰포트에 고정: 모바일 키보드가 떠도 문서가 스크롤되며 헤더가 잘리는 것을 막는다.
     실제 스크롤은 .messages 등 내부 영역(overflow-y:auto)에서만 일어난다. */
  position: fixed;
  inset: 0;
  width: 100%;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; outline: none; }

.app-shell { height: 100vh; height: 100dvh; height: var(--app-h, 100dvh); display: flex; flex-direction: column; }

.btn-ghost {
  height: 28px; padding: 0 12px; border: 1px solid #DDE1E9; border-radius: 6px;
  background: #FFFFFF; color: #1A1D27; font-size: 12.5px;
}
.btn-ghost:hover { border-color: #1565C0; color: #1565C0; background: rgba(21,101,192,0.06); }

/* ── 상단 프로필 헤더 ─────────────────────────────────────────────────── */
.profile-header {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: #FFFFFF; border-bottom: 1px solid #DDE1E9;
}
.profile-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-name { font-size: 14.5px; font-weight: 700; color: #1A1D27; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-status { font-size: 11.5px; color: #4D5566; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.icon-btn {
  width: 34px; height: 34px; border: none; border-radius: 999px; background: transparent;
  color: #4D5566; display: flex; align-items: center; justify-content: center; position: relative;
}
.icon-btn:hover { background: #F2F4F8; color: #1565C0; }

.settings-menu {
  position: absolute; top: 60px; right: 14px; z-index: 25; min-width: 140px;
  background: #FFFFFF; border: 1px solid #DDE1E9; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14); overflow: hidden; padding: 4px;
}
.settings-menu-item {
  width: 100%; text-align: left; padding: 9px 12px; border: none; background: transparent;
  border-radius: 6px; font-size: 12.5px; color: #1A1D27;
}
.settings-menu-item:hover { background: #F2F4F8; color: #F03E3E; }

.friend-search-bar { flex: none; padding: 8px 16px; background: #FFFFFF; border-bottom: 1px solid #DDE1E9; }
.friend-search-input {
  width: 100%; height: 34px; border: 1px solid #DDE1E9; border-radius: 999px;
  padding: 0 14px; font-size: 12.5px; background: #F2F4F8; color: #1A1D27;
}
.friend-search-input:focus { border-color: #1565C0; background: #FFFFFF; }

/* ── 화면 전환 ─────────────────────────────────────────────────────────── */
.main-views { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ── 친구 화면 ─────────────────────────────────────────────────────────── */
.tab-row { flex: none; display: flex; gap: 4px; padding: 0 16px; background: #FFFFFF; border-bottom: 1px solid #DDE1E9; }
.tab-item {
  padding: 12px 4px; margin-right: 18px; border: none; background: transparent;
  font-size: 13.5px; font-weight: 600; color: #8C95A8; border-bottom: 2px solid transparent;
}
.tab-item.active { color: #1565C0; border-bottom-color: #1565C0; }

.friends-list { flex: 1; min-height: 0; overflow-y: auto; background: #FFFFFF; }
.friend-section { padding: 4px 0 8px; }
.friend-section-head {
  padding: 12px 16px 6px; font-size: 12px; font-weight: 700; color: #8C95A8; display: flex; align-items: center; gap: 6px;
}
.friend-section-count { font-weight: 500; color: #B4BCCB; }

.friend-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 16px; cursor: pointer;
}
.friend-row:hover { background: #F8F9FC; }
.friend-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.friend-name { font-size: 13.5px; font-weight: 600; color: #1A1D27; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-sub { font-size: 11.5px; color: #8C95A8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-chat-btn {
  flex: none; width: 30px; height: 30px; border: none; border-radius: 999px; background: transparent;
  color: #B4BCCB; display: flex; align-items: center; justify-content: center;
}
.friend-chat-btn:hover { background: #E3EEFA; color: #1565C0; }

.friends-empty { padding: 60px 16px; text-align: center; font-size: 12.5px; color: #8C95A8; }
.placeholder-pane { flex: 1; display: flex; align-items: center; justify-content: center; color: #8C95A8; font-size: 13px; }
.news-pane { flex: 1; min-height: 0; display: flex; }

/* ── 쪽지 보내기 모달 ─────────────────────────────────────────────────── */
.note-modal-to { flex: none; padding: 12px 14px 0; font-size: 12.5px; color: #4D5566; }
.note-modal-to strong { color: #1A1D27; }
.note-modal-textarea {
  flex: 1; min-height: 140px; margin: 12px 14px; border: 1px solid #E2E8F0; border-radius: 10px;
  padding: 12px 13px; font-size: 13px; line-height: 1.6; color: #1A1D27; resize: vertical; outline: none; }
.note-modal-textarea:focus { border-color: #1565C0; }

/* ── 쪽지함 목록 ───────────────────────────────────────────────────────── */
.note-list { flex: 1; min-height: 0; overflow-y: auto; background: #FFFFFF; padding: 4px 0; }

/* ── TEST 탭: EXAM 서비스 최신 문제 세트(과목 탭 + 세트 칩 + 시험 페이지 iframe) ── */
.test-open-link { margin-left: auto; align-self: center; font-size: 12px; color: #8C95A8; text-decoration: none; padding: 6px 0; }
.test-open-link:hover { color: #1565C0; }
.test-batch-bar { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; background: #FFFFFF; border-bottom: 1px solid #DDE1E9; scrollbar-width: thin; }
.test-batch-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #DDE1E9; border-radius: 999px;
  padding: 6px 12px; font-size: 12px; color: #4D5566; background: #FFFFFF; cursor: pointer; white-space: nowrap;
}
.test-batch-chip b { font-weight: 700; color: #1A1D27; }
.test-batch-chip small { color: #8C95A8; }
.test-batch-chip.active { border-color: #1565C0; color: #1565C0; background: #EEF3FB; }
.test-batch-chip.active b { color: #1565C0; }
.test-batch-chip.latest::before { content: 'NEW'; font-size: 9px; font-weight: 800; color: #FFFFFF; background: #F03E3E; border-radius: 4px; padding: 1px 4px; }
.test-batch-hint { font-size: 12px; color: #8C95A8; padding: 6px 2px; }
.test-frame { flex: 1; min-height: 0; width: 100%; border: none; background: #FFFFFF; }

.note-empty { padding: 60px 16px; text-align: center; font-size: 12.5px; color: #8C95A8; }
.note-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #F0F2F6; align-items: flex-start; }
.note-item.unread { background: #F5F9FF; }
.note-item-body-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.note-item-head { display: flex; align-items: baseline; gap: 6px; }
.note-item-name { font-size: 13px; font-weight: 700; color: #1A1D27; }
.note-item-dir { font-size: 10.5px; color: #8C95A8; }
.note-item-time { margin-left: auto; font-size: 10.5px; color: #8C95A8; flex: none; }
.note-item-text { font-size: 12.5px; color: #1A1D27; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.note-item-actions { flex: none; display: flex; gap: 4px; }
.note-action-btn {
  width: 28px; height: 28px; border: 1px solid #DDE1E9; border-radius: 8px; background: #FFFFFF;
  color: #8C95A8; display: flex; align-items: center; justify-content: center;
}
.note-action-btn:hover { border-color: #F03E3E; color: #F03E3E; }
.note-action-btn.restore:hover { border-color: #1565C0; color: #1565C0; }

/* 아바타 안 온라인 표시 점 */
.avatar { position: relative; }
.presence-dot {
  position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 999px;
  background: #B4BCCB; border: 2px solid #FFFFFF; display: block;
}
.presence-dot.online { background: #30C48D; }

/* ── 하단 탭 내비게이션 ───────────────────────────────────────────────── */
.bottom-nav {
  flex: none; display: flex; background: #FFFFFF; border-top: 1px solid #DDE1E9;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: transparent; padding: 6px 4px; color: #8C95A8; font-size: 10.5px; position: relative;
}
.bottom-nav-item.active { color: #1565C0; }
.nav-badge {
  position: absolute; top: 2px; right: calc(50% - 20px); min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: #F03E3E; color: #FFFFFF; font-size: 9.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.app-body { flex: 1; min-height: 0; display: flex; }

.room-list {
  width: 300px; flex: none; display: flex; flex-direction: column;
  background: #F8F9FC; border-right: 1px solid #DDE1E9;
}
.room-list-head {
  flex: none; padding: 12px 14px; display: flex; align-items: center;
  border-bottom: 1px solid #DDE1E9;
}
.room-list-title { font-size: 13.5px; font-weight: 700; color: #1A1D27; }
.btn-icon {
  margin-left: auto; width: 28px; height: 28px; border: 1px solid #DDE1E9; border-radius: 8px;
  background: #FFFFFF; color: #4D5566; font-size: 16px; line-height: 1; display: flex;
  align-items: center; justify-content: center;
}
.btn-icon:hover { border-color: #1565C0; color: #1565C0; }

.room-list-items { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.room-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border: none; border-radius: 8px; cursor: pointer; text-align: left; background: transparent;
  box-sizing: border-box;
}
.room-item:hover { background: #EEF1F7; }
.room-item.active { background: #E3EEFA; }
.room-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.room-item-name { font-size: 12.5px; font-weight: 500; color: #1A1D27; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-item-preview { font-size: 11.5px; color: #4D5566; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-item-unread {
  flex: none; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: #F03E3E; color: #FFFFFF; font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.room-list-empty { padding: 40px 16px; text-align: center; font-size: 12px; color: #8C95A8; }

.avatar {
  display: flex; align-items: center; justify-content: center; border-radius: 999px;
  background: #8C95A8; color: #FFFFFF; font-weight: 600; flex: none; letter-spacing: -0.2px;
}
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar-md { width: 32px; height: 32px; font-size: 11.5px; }

.room-view { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #FFFFFF; }
.room-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: #8C95A8; font-size: 13px; }

.room-active { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.room-header {
  flex: none; height: 56px; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid #DDE1E9;
}
.room-header-name { font-size: 13.5px; font-weight: 600; color: #1A1D27; }
.back-btn {
  display: none; width: 28px; height: 28px; border: none; border-radius: 8px;
  background: transparent; color: #4D5566; font-size: 17px; line-height: 1; flex: none;
  align-items: center; justify-content: center;
}
.back-btn:hover { background: #F2F4F8; color: #1565C0; }

.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg-row { display: flex; gap: 8px; align-items: flex-end; }
.msg-row.mine { flex-direction: row-reverse; }
.msg-bubble {
  padding: 9px 12px; border-radius: 3px 12px 12px 12px; background: #F2F4F8; color: #1A1D27;
  font-size: 12.5px; line-height: 1.6; word-break: break-word; max-width: min(72%, 440px);
}
.msg-row.mine .msg-bubble { border-radius: 12px 3px 12px 12px; background: #1565C0; color: #FFFFFF; }
.msg-time { flex: none; font-size: 10px; color: #8C95A8; padding-bottom: 2px; white-space: nowrap; }

.compose {
  flex: none; border-top: 1px solid #DDE1E9; padding: 10px 14px; display: flex; gap: 8px;
  background: #FFFFFF;
}
.compose-input {
  flex: 1; min-width: 0; height: 36px; border: 1px solid #DDE1E9; border-radius: 10px;
  padding: 0 12px; font-size: 13px; color: #1A1D27; background: #FFFFFF;
}
.compose-input:focus { border-color: #1565C0; }
.btn-send {
  flex: none; height: 36px; padding: 0 16px; border: none; border-radius: 10px;
  background: #1565C0; color: #FFFFFF; font-size: 12.5px; font-weight: 600;
}
.btn-send:hover { background: #0E4894; }
.btn-send:disabled { background: #B4BCCB; cursor: default; }

.modal {
  position: fixed; inset: 0; background: rgba(26,29,39,0.32); display: flex;
  align-items: center; justify-content: center; z-index: 20;
}
.modal-card {
  width: 360px; max-height: 70vh; background: #FFFFFF; border-radius: 12px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.modal-head {
  flex: none; height: 48px; display: flex; align-items: center; padding: 0 14px;
  border-bottom: 1px solid #DDE1E9; font-size: 13.5px; font-weight: 600;
}
.modal-head .btn-icon { border: none; background: transparent; font-size: 18px; margin-left: auto; }
.modal-search {
  flex: none; margin: 12px 14px; height: 32px; border: 1px solid #DDE1E9; border-radius: 8px;
  padding: 0 10px; font-size: 12.5px;
}
.modal-search:focus { border-color: #1565C0; }
.modal-results { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 10px; }

.conn-status {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 999px; background: #1A1D27; color: #FFFFFF;
  font-size: 12px; z-index: 30;
}
.conn-status.error { background: #F03E3E; }

/* ── 반응형(모바일) ──────────────────────────────────────────────────────
   좁은 화면에서는 대화목록/채팅방을 나란히 둘 곳이 없어 한 번에 하나만 보여주고,
   #appBody의 data-view(list|room, messenger.js가 방 열기/뒤로가기에서 토글)로
   어느 쪽을 보여줄지 정한다. 768px 이상(데스크톱/태블릿 가로)에서는 항상 둘 다 보임. */
@media (max-width: 768px) {
  .profile-header { padding: 10px 12px; gap: 10px; }
  .btn-ghost { height: 26px; padding: 0 10px; font-size: 12px; }

  .room-list { width: 100%; border-right: none; }
  .app-body[data-view="list"] .room-view { display: none; }
  .app-body[data-view="room"] .room-list { display: none; }
  .back-btn { display: flex; }

  .messages { padding: 12px; }
  .msg-bubble { max-width: 82%; }
  .compose { padding: 8px 10px; }

  /* 모바일: 모달을 전체 화면으로(새창처럼). 헤더의 오른쪽 × 로 닫는다. */
  .modal { align-items: stretch; }
  .modal-card { width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; border-radius: 0; }
}

/* 데스크톱에서는 모바일 전용 뒤로가기 버튼을 항상 숨기고, 목록/채팅방을 항상 함께 보여준다
   (data-view 토글이 모바일에서만 의미가 있도록 명시적으로 무효화). */
@media (min-width: 769px) {
  .app-body[data-view] .room-view,
  .app-body[data-view] .room-list { display: flex; }
}

/* ── 그룹 채팅 / 방 개설 UI 추가분 ───────────────────────────────────────── */
/* 헤더 '나가기' 버튼: 방 이름 오른쪽 끝으로 밀어 배치 */
.room-meet { margin-left: auto; flex: none; }
.room-meet:hover { border-color: #1565C0; color: #1565C0; background: rgba(21,101,192,0.06); }
.room-leave { flex: none; }
.room-active .room-meet[hidden] + .room-leave { margin-left: auto; }   /* 회의 단추가 없을 때는 나가기가 오른쪽 끝 */
.room-leave:hover { border-color: #F03E3E; color: #F03E3E; background: rgba(240,62,62,0.06); }

/* 그룹 방 아바타는 1:1과 구분되도록 파란 톤 */
.avatar.is-group { background: #1565C0; }

/* 대화목록 아이템의 그룹 뱃지(인원수) */
.room-item-badge {
  flex: none; font-size: 10px; color: #4D5566; background: #E3EEFA;
  border-radius: 999px; padding: 1px 6px; margin-left: 4px;
}

/* 그룹 메시지의 보낸사람 이름 라벨 */
.msg-sender { font-size: 10.5px; color: #8C95A8; margin: 0 2px 2px; }
.msg-col { display: flex; flex-direction: column; min-width: 0; max-width: min(74%, 460px); }
.msg-row.mine .msg-col { align-items: flex-end; }
.msg-col .msg-bubble { max-width: 100%; }

/* 방 개설 모달: 방이름 입력 */
.modal-input {
  flex: none; margin: 12px 14px 0; height: 34px; border: 1px solid #DDE1E9; border-radius: 8px;
  padding: 0 10px; font-size: 12.5px;
}
.modal-input:focus { border-color: #1565C0; }
.modal-search { margin-top: 10px; }

/* 선택된 대상 chip 목록 */
.modal-selected {
  flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 4px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px 0 10px;
  background: #E3EEFA; color: #1565C0; border-radius: 999px; font-size: 11.5px; font-weight: 500;
}
.chip button {
  border: none; background: transparent; color: #1565C0; font-size: 14px; line-height: 1;
  padding: 0; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
}
.chip button:hover { color: #0E4894; }

/* 결과 아이템 선택 표시 */
.room-item.selected { background: #E3EEFA; }
.room-item .room-item-check {
  flex: none; width: 18px; height: 18px; border-radius: 999px; border: 1px solid #C4CCDA;
  display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-size: 11px;
}
.room-item.selected .room-item-check { background: #1565C0; border-color: #1565C0; }

/* 모달 하단(힌트 + 개설 버튼) */
.modal-foot {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-top: 1px solid #DDE1E9;
}
.modal-hint { flex: 1; min-width: 0; font-size: 11.5px; color: #8C95A8; }

@media (max-width: 768px) {
  /* (전체 화면 규칙이 이미 적용됨) */
}

/* ── 파일 첨부 UI ─────────────────────────────────────────────────────────── */
.btn-attach {
  flex: none; width: 36px; height: 36px; border: 1px solid #DDE1E9; border-radius: 10px;
  background: #FFFFFF; color: #4D5566; font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.btn-attach:hover { border-color: #1565C0; color: #1565C0; }

/* 음성 입력(마이크) 버튼 - 첨부 버튼과 동일 크기 */
.btn-mic {
  flex: none; width: 36px; height: 36px; border: 1px solid #DDE1E9; border-radius: 10px;
  background: #FFFFFF; color: #4D5566; font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.btn-mic:hover { border-color: #1565C0; color: #1565C0; }
.btn-mic[disabled] { opacity: .45; cursor: default; }
.btn-mic.recording { border-color: #F03E3E; color: #F03E3E; background: rgba(240,62,62,0.08);
  animation: micpulse 1.1s ease-in-out infinite; }
@keyframes micpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240,62,62,0.45); }
  50% { box-shadow: 0 0 0 5px rgba(240,62,62,0); }
}

/* 이미지 첨부: 파란 말풍선 배경 없이 썸네일만 */
.msg-bubble.bubble-image { padding: 3px; background: transparent; }
.msg-row.mine .msg-bubble.bubble-image { background: transparent; }
.msg-attach-img { display: block; }
.msg-attach-img img {
  display: block; max-width: min(260px, 60vw); max-height: 280px;
  border-radius: 10px; border: 1px solid #DDE1E9; object-fit: cover;
}

/* 일반 파일 첨부: 아이콘 + 파일명 링크 */
.msg-bubble.bubble-file { padding: 8px 12px; }
.msg-attach-file { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.msg-attach-file .af-icon { flex: none; font-size: 15px; }
.msg-attach-file .af-name {
  font-size: 12.5px; font-weight: 500; text-decoration: underline; word-break: break-all;
}
.msg-row.mine .msg-attach-file { color: #FFFFFF; }

/* ── 문서 첨부 썸네일 카드(SmViewer) ─────────────────────────────────────── */
.msg-attach-doc {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit;
  max-width: 280px;
}
.msg-attach-doc .doc-thumb {
  flex: none; width: 46px; height: 46px; object-fit: cover; border-radius: 6px;
  border: 1px solid #DDE1E9; background: #FFFFFF;
}
.msg-attach-doc .af-icon {
  flex: none; width: 46px; height: 46px; border-radius: 6px; border: 1px solid #DDE1E9;
  background: #F2F4F8; display: none; align-items: center; justify-content: center; font-size: 20px;
}
/* 썸네일 없는 카드(other) 또는 썸네일 로드 실패 시 아이콘 표시 */
.msg-attach-doc.no-thumb .af-icon,
.msg-attach-doc.thumb-failed .af-icon { display: flex; }
.msg-attach-doc.thumb-failed .doc-thumb { display: none; }
.msg-attach-doc .af-name {
  font-size: 12.5px; font-weight: 500; text-decoration: underline; word-break: break-all;
}
.msg-row.mine .msg-attach-doc { color: #FFFFFF; }
.msg-row.mine .msg-attach-doc .doc-thumb,
.msg-row.mine .msg-attach-doc .af-icon { border-color: rgba(255,255,255,0.5); }

/* 읽음/읽지않음 표시(XEP-0333) - 내가 보낸 1:1 메시지 하단 */
.msg-status { font-size: 10px; color: #8C95A8; margin-top: 2px; line-height: 1; }
.msg-status.read { color: #1565C0; font-weight: 600; }

/* 쪽지 모달: 음성입력/첨부 도구 */
.note-modal-tools { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; margin: 0 14px; border-bottom: 1px solid #EEF1F6; flex-wrap: wrap; }
.note-tool-btn { flex: none; width: 38px; height: 38px; border: 1px solid #E2E8F0; border-radius: 10px;
  background: #F7F9FC; color: #4D5566; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.note-tool-btn:hover { border-color: #1565C0; color: #1565C0; background: #EAF2FD; }
.note-tool-btn.active { background: #F03E3E; color: #FFFFFF; border-color: #F03E3E; animation: notemic 1s ease-in-out infinite; }
@keyframes notemic { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.note-mic-status { font-size: 11.5px; color: #F03E3E; font-weight: 600; }
.note-attach-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #1565C0;
  background: #E3EEFA; border-radius: 999px; padding: 3px 6px 3px 10px; max-width: 100%; overflow: hidden; }
.note-attach-chip button { border: none; background: transparent; color: #1565C0; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.note-attach { display: inline-block; margin-top: 4px; font-size: 11.5px; color: #1565C0; text-decoration: underline; }

/* ── 소식(피드) ─────────────────────────────────────────────────────────── */
.news-list { padding: 6px 8px 20px; overflow-y: auto; }
.news-item { background: #FFFFFF; border: 1px solid #DDE1E9; border-radius: 12px; padding: 12px 14px; margin: 8px 6px; }
.news-head { display: flex; align-items: center; gap: 8px; }
.news-author { font-size: 12.5px; font-weight: 600; color: #1A1D27; }
.news-time { font-size: 11px; color: #8C95A8; margin-left: 2px; }
.news-del { margin-left: auto; border: none; background: transparent; color: #B4BCCB; font-size: 16px; line-height: 1; cursor: pointer; }
.news-del:hover { color: #F03E3E; }
.news-body { font-size: 13px; color: #1A1D27; line-height: 1.6; margin-top: 8px; white-space: pre-wrap; word-break: break-word; }
.news-photo { display: block; margin-top: 10px; }
.news-photo img { display: block; width: 100%; max-width: 420px; height: auto; border-radius: 8px; border: 1px solid #DDE1E9; }

/* 자동 로그인 설정 + 로그인 게이트 */
.settings-menu-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; font-size: 12.5px; color: #1A1D27; cursor: pointer; }
.settings-menu-toggle input { width: 16px; height: 16px; cursor: pointer; accent-color: #1565C0; }
.login-gate { position: fixed; inset: 0; background: #F2F4F8; display: flex; align-items: center; justify-content: center; z-index: 50; }
.login-gate-card { background: #FFFFFF; border: 1px solid #DDE1E9; border-radius: 14px; padding: 32px 28px;
  text-align: center; display: flex; flex-direction: column; gap: 12px; min-width: 260px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.login-gate-title { font-size: 16px; font-weight: 700; color: #1A1D27; }
.login-gate-desc { font-size: 13px; color: #4D5566; }
.login-gate .btn-send { height: 40px; }

/* 로딩(불러오는 중) 공통 스타일 - 소식/쪽지 */
.loading-pane { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 48px 16px; color: #8C95A8; font-size: 12.5px; }
.loading-spinner { width: 24px; height: 24px; border: 3px solid #DDE1E9; border-top-color: #1565C0;
  border-radius: 50%; animation: loadspin .7s linear infinite; }
@keyframes loadspin { to { transform: rotate(360deg); } }

/* 모바일에서 입력창 포커스 시 iOS 자동 확대 방지(폰트 16px 이상이면 확대 안 함) */
@media (max-width: 768px) {
  input[type="text"], input[type="search"], input:not([type]), textarea,
  .compose-input, .modal-search, .modal-input, .note-modal-textarea, .friend-search-input {
    font-size: 16px;
  }
}

/* 소식 좋아요/댓글 */
.avatar-xs { width: 24px; height: 24px; font-size: 9px; }
.news-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #EEF1F7; }
.post-act { display: inline-flex; align-items: center; gap: 5px; border: none; background: transparent; color: #4D5566; font-size: 12.5px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.post-act:hover { background: #F2F4F8; }
.post-act.like.on { color: #F03E3E; }
.post-act .pa-ico { font-size: 14px; }
.news-comments { margin-top: 8px; border-top: 1px solid #EEF1F7; padding-top: 10px; }
.cmt-loading { font-size: 12px; color: #8C95A8; padding: 8px 0; text-align: center; }
.cmt-list { display: flex; flex-direction: column; gap: 9px; }
.cmt-item { display: flex; align-items: flex-start; gap: 8px; }
.cmt-body { flex: 1; min-width: 0; font-size: 12.5px; color: #1A1D27; line-height: 1.5; word-break: break-word; }
.cmt-author { font-weight: 600; margin-right: 4px; }
.cmt-del { border: none; background: transparent; color: #B4BCCB; font-size: 14px; cursor: pointer; line-height: 1; }
.cmt-del:hover { color: #F03E3E; }
.cmt-form { display: flex; gap: 6px; margin-top: 10px; }
.cmt-input { flex: 1; min-width: 0; height: 32px; border: 1px solid #DDE1E9; border-radius: 8px; padding: 0 10px; font-size: 12.5px; }
.cmt-input:focus { border-color: #1565C0; }
.cmt-send { flex: none; height: 32px; padding: 0 12px; border: none; border-radius: 8px; background: #1565C0; color: #FFFFFF; font-size: 12px; font-weight: 600; cursor: pointer; }
.cmt-send:hover { background: #0E4894; }

/* 소식 게시물 ... 메뉴 */
.news-head { position: relative; }
.post-menu-wrap { margin-left: auto; position: relative; }
.post-menu-btn { border: none; background: transparent; color: #8C95A8; font-size: 18px; line-height: 1;
  cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.post-menu-btn:hover { background: #F2F4F8; color: #1A1D27; }
.post-menu { position: absolute; top: 26px; right: 0; z-index: 15; min-width: 130px; background: #FFFFFF;
  border: 1px solid #DDE1E9; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); overflow: hidden; padding: 4px; }
.pm-item { display: block; width: 100%; text-align: left; border: none; background: transparent; cursor: pointer;
  font-size: 12.5px; color: #1A1D27; padding: 9px 10px; border-radius: 6px; }
.pm-item:hover { background: #F2F4F8; }
.pm-delete { color: #F03E3E; }

/* 숨긴 친구 관리 */
.hidden-users-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.hidden-user-item { display: flex; align-items: center; gap: 10px; padding: 9px 8px; }
.hidden-user-name { flex: 1; min-width: 0; font-size: 12.5px; color: #1A1D27; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden-user-unhide { flex: none; height: 28px; padding: 0 12px; border: 1px solid #DDE1E9; border-radius: 6px;
  background: #FFFFFF; color: #1565C0; font-size: 12px; font-weight: 600; cursor: pointer; }
.hidden-user-unhide:hover { border-color: #1565C0; background: rgba(21,101,192,0.06); }

/* 채팅목록 스와이프-나가기 피드백 */
.room-item { transition: transform .15s ease, background .15s; }
.room-item.swipe-armed { background: rgba(240,62,62,.12); }

/* 소식 다중 사진 슬라이드(캐러셀) */
.news-carousel { position: relative; margin-top: 10px; max-width: 420px; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 8px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: center; display: block; }
.carousel-slide img { width: 100%; height: auto; display: block; border: 1px solid #DDE1E9; }
.carousel-count { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #FFFFFF;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; pointer-events: none; }
/* 글쓰기 다중 사진 chip */
#postPhotoChip.post-photo-chips { display: flex; flex-wrap: wrap; gap: 6px; background: transparent; padding: 0; }
.post-photo-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #1565C0;
  background: #E3EEFA; border-radius: 999px; padding: 3px 6px 3px 10px; }
.post-photo-chip button { border: none; background: transparent; color: #1565C0; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }

/* 내 프로필/상태 */
.avatar-lg { width: 64px; height: 64px; font-size: 20px; background-size: cover; background-position: center; }
.profile-form { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.profile-photo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.pf-label { font-size: 11.5px; font-weight: 600; color: #4D5566; margin-top: 10px; }
.pf-input { height: 36px; border: 1px solid #DDE1E9; border-radius: 8px; padding: 0 10px; font-size: 13px; }
.pf-input:focus { border-color: #1565C0; }
.pf-status-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pf-status { height: 32px; padding: 0 14px; border: 1px solid #DDE1E9; border-radius: 999px; background: #FFFFFF; color: #4D5566; font-size: 12.5px; cursor: pointer; }
.pf-status.on { background: #1565C0; color: #FFFFFF; border-color: #1565C0; }
#myAvatar { background-size: cover; background-position: center; }

/* 내 프로필/상태: 새창처럼 전체 화면(모든 크기) + 하단 닫기 버튼 */
#profileModal { align-items: stretch; }
#profileModal .modal-card { width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
#profileModal .profile-form { width: 100%; max-width: 560px; margin: 0 auto; }
#profileModal .modal-foot { justify-content: flex-end; gap: 8px; }

/* ── 글쓰기 컴포즈 재설계(작게, 스크롤 방지, 상단 툴바, 썸네일 미리보기) ──── */
#postModal.modal { align-items: stretch; }
#postModal .modal-card {
  width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; border-radius: 0;
  display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: contain;
}
/* 넓은 화면에서는 내용을 가운데 열로 정렬(전체는 꽉 채우되 가독성 유지) */
@media (min-width: 769px) {
  #postModal .post-compose-tools, #postModal .post-compose-textarea, #postModal .post-photo-previews {
    max-width: 760px; margin-left: auto; margin-right: auto; width: 100%;
  }
}
.post-compose-tools { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #EEF1F7; }
.post-photo-icon { flex: none; width: 38px; height: 38px; border: 1px solid #DDE1E9; border-radius: 9px;
  background: #FFFFFF; color: #4D5566; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.post-photo-icon:hover { border-color: #1565C0; color: #1565C0; }
.post-compose-hint { flex: 1; min-width: 0; text-align: left; }
.post-compose-textarea { flex: 1 1 auto; height: auto; min-height: 180px; resize: none; border: none; outline: none;
  padding: 16px; font-size: 16px; line-height: 1.7; color: #1A1D27; width: 100%; overscroll-behavior: contain; }
.post-photo-previews { flex: none; display: flex; gap: 8px; padding: 4px 12px 12px; overflow-x: auto; overscroll-behavior: contain; }
.post-photo-thumb { position: relative; flex: none; width: 72px; height: 72px; }
.post-photo-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid #DDE1E9; display: block; }
.post-photo-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #FFFFFF; background: #1A1D27; color: #FFFFFF; font-size: 12px; line-height: 1; cursor: pointer; padding: 0; }

/* 모바일 포커스 확대(줌) 방지 - 모든 입력요소 16px 강제(클래스 폰트보다 우선) */
@media (max-width: 768px) {
  input, textarea, select { font-size: 16px !important; }
}

/* 친구 행 액션 버튼(채팅/정보/쪽지) */
.friend-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
.friend-act-btn { flex: none; width: 32px; height: 32px; border: none; background: transparent; color: #8C95A8;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.friend-act-btn:hover { background: #EEF1F7; color: #1565C0; }

/* 사용자 정보 페이지 */
.user-info-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 16px; }
.user-info-head { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; }
.user-info-avatar { width: 84px; height: 84px; border-radius: 50%; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-size: 26px; font-weight: 600; }
.user-info-name { font-size: 17px; font-weight: 700; color: #1A1D27; }
.user-info-status { font-size: 12.5px; color: #4D5566; }
.ui-row { display: flex; gap: 12px; padding: 11px 4px; border-bottom: 1px solid #EEF1F7; font-size: 13px; }
.ui-label { flex: none; width: 72px; color: #8C95A8; }
.ui-val { flex: 1; min-width: 0; color: #1A1D27; word-break: break-all; }

/* 사용자 정보 즐겨찾기 버튼 */
#userInfoFav.on { border-color: #F5A623; color: #B8860B; background: rgba(245,166,35,0.08); }

/* 알림 설정 */
.notif-form { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.notif-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; font-size: 13px; color: #1A1D27; border-bottom: 1px solid #EEF1F7; cursor: pointer; }
.notif-toggle input { width: 18px; height: 18px; accent-color: #1565C0; cursor: pointer; }
.notif-perm-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #FFF7E6; border: 1px solid #F5D58A; border-radius: 8px; margin-bottom: 8px; }
.notif-perm-msg { flex: 1; min-width: 0; font-size: 12px; color: #8A6D3B; }
.notif-perm-row .btn-send { height: 30px; padding: 0 12px; font-size: 12px; }
.notif-hint { font-size: 12px; color: #4D5566; padding: 8px 4px; }

/* 사용자 정보: 이름 옆 즐겨찾기 별 + 최근 글 (2026-08-24) */
.user-info-head-bar { gap: 8px; }
.user-info-head-bar .btn-send, .user-info-head-bar .btn-ghost { height: 30px; padding: 0 14px; font-size: 12.5px; }
.user-info-name { display: flex; align-items: center; gap: 2px; }
.ui-fav-star { flex: none; width: 26px; height: 26px; border: none; background: transparent; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: #C4CAD6; margin-right: 4px; }
.ui-fav-star svg { width: 20px; height: 20px; }
.ui-fav-star svg polygon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.ui-fav-star.on { color: #FFB300; }
.ui-fav-star.on svg polygon { fill: currentColor; stroke: currentColor; }
.user-info-recent { margin: 14px; border-top: 1px solid #EEF1F6; padding-top: 12px; }
.ui-recent-title { font-size: 12px; font-weight: 700; color: #8C95A8; margin-bottom: 8px; }
.ui-recent-card { display: flex; gap: 10px; align-items: flex-start; background: #F7F9FC; border: 1px solid #EEF1F6; border-radius: 10px; padding: 10px 12px; }
.ui-recent-thumb { flex: none; width: 44px; height: 44px; border-radius: 8px; background-size: cover; background-position: center; background-color: #E9EDF3; }
.ui-recent-main { flex: 1; min-width: 0; }
.ui-recent-text { font-size: 12.5px; color: #1A1D27; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ui-recent-date { font-size: 11px; color: #8C95A8; margin-top: 6px; }
.ui-recent-empty { font-size: 12px; color: #B4BCCB; padding: 4px 0; }
/* 사용자 정보: 받은/보낸 쪽지 탭 (2026-08-25) */
.user-info-notes { margin: 14px; border-top: 1px solid #EEF1F6; padding-top: 12px; }
.ui-notes-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.ui-notes-tab { flex: 1; height: 30px; border: 1px solid #E2E8F0; border-radius: 8px; background: #FFFFFF; color: #64748B; font-size: 12px; font-weight: 600; cursor: pointer; }
.ui-notes-tab.active { background: #1565C0; color: #FFFFFF; border-color: #1565C0; }
.ui-note-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #F1F4F9; }
.ui-note-item:last-child { border-bottom: none; }
.ui-note-text { flex: 1; min-width: 0; font-size: 12.5px; color: #1A1D27; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-note-att { flex: none; font-size: 12px; }
.ui-note-date { flex: none; font-size: 11px; color: #8C95A8; }
/* 파일함 + 쪽지 작성 (2026-08-25) */
.tab-compose-btn { margin-left: auto; flex: none; width: 32px; height: 32px; border: 1px solid #E2E8F0; border-radius: 8px; background: #FFFFFF; color: #1565C0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tab-compose-btn:hover { background: #EAF2FD; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #F1F4F9; }
.file-item-icon { flex: none; width: 34px; height: 34px; border-radius: 8px; background: #EEF2F8; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.file-item-name { font-size: 13px; color: #1565C0; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.file-item-name:hover { text-decoration: underline; }
.file-item-sub { font-size: 11.5px; color: #8C95A8; margin-top: 3px; display: block; }
.note-recipient-pick { padding: 0 14px 6px; }
.note-recipient-results { max-height: 190px; overflow-y: auto; margin-top: 6px; }
.note-recip-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.note-recip-item:hover { background: #F2F6FC; }
.note-recip-name { font-size: 13px; color: #1A1D27; }
/* 쪽지 작성 플로팅 버튼(하단 오른쪽) */
.note-compose-fab { position: fixed; right: 18px; bottom: 74px; width: 52px; height: 52px; border-radius: 999px; border: none; background: #1565C0; color: #FFFFFF; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(21,101,192,0.40); cursor: pointer; z-index: 30; }
.note-compose-fab:hover { background: #0E4894; }
/* 조직도 (2026-08-25) */
.org-tree { flex: 1; min-height: 0; overflow-y: auto; background: #FFFFFF; padding: 6px 0; }
.org-dept-row { display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid #F4F6FA; }
.org-dept-row:hover { background: #F5F8FD; }
.org-dept-ic { flex: none; color: #8C95A8; }
.org-dept-name { flex: 1; min-width: 0; font-size: 13.5px; color: #1A1D27; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-dept-count { flex: none; font-size: 12px; color: #1565C0; font-weight: 700; }
.org-users { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.org-users-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #EEF1F6; }
.org-back-btn { flex: none; border: none; background: transparent; color: #1565C0; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; }
.org-dept-title { font-size: 13.5px; font-weight: 700; color: #1A1D27; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-user-search { flex: none; margin: 10px 14px; height: 36px; border: 1px solid #E2E8F0; border-radius: 8px; padding: 0 12px; font-size: 13px; color: #1A1D27; outline: none; }
.org-user-search:focus { border-color: #1565C0; }
/* 조직도 폴더 펼침/감춤 (2026-08-25) */
.org-node { }
.org-children[hidden] { display: none; }
.org-toggle { flex: none; width: 24px; height: 24px; border: none; background: transparent; color: #E0A72E; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.org-toggle:hover { color: #C7902A; }
.org-dept-name { cursor: pointer; }


/* 하단 내비 웹메일 링크 + 9개 항목 */
a.bottom-nav-item, .bottom-nav-link { text-decoration: none; color: #8C95A8; }
a.bottom-nav-item.active, .bottom-nav-link.active { color: #1565C0; }
.bottom-nav-item { padding: 6px 2px; min-width: 0; font-size: 10px; }
.bottom-nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottom-nav-item svg { width: 20px; height: 20px; }


/* ══ 넓은 화면(웹) 배치 ══════════════════════════════════════════════════
   · 아래쪽 탭 막대를 왼쪽 세로 막대(36px)로 돌린다 - 좁은 화면(모바일)은 그대로 아래에 둔다.
   · 소식은 가운데를 다 쓰고 글마다 카드로 늘어놓는다(예전엔 478px 만 쓰고 오른쪽이 비었다).
   ══════════════════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
  .app-shell { padding-left: 36px; }

  .bottom-nav {
    position: fixed; left: 0; top: 0; bottom: 0; width: 36px; z-index: 30;
    flex-direction: column; align-items: center; gap: 1px;
    padding: 8px 0; overflow-y: auto; overflow-x: hidden;
    border-top: none; border-right: 1px solid #DDE1E9;
  }
  .bottom-nav::-webkit-scrollbar { width: 0 }
  .bottom-nav-item {
    flex: none; width: 30px; height: 30px; padding: 0; border-radius: 8px;
    justify-content: center; font-size: 0;
  }
  .bottom-nav-item:hover { background: #F2F4F8 }
  .bottom-nav-item.active { background: rgba(21,101,192,.10); color: #1565C0 }
  .bottom-nav-item > span:not(.nav-badge) { display: none }   /* 이름표는 풍선말로 */
  .bottom-nav-item svg { width: 17px; height: 17px }
  .bottom-nav-item .nav-badge {
    top: -1px; right: -1px; min-width: 13px; height: 13px; font-size: 8.5px; padding: 0 3px;
  }

  /* 소식 - 가운데를 다 쓰고 카드로 흘려 놓는다.
     격자(grid)로 두면 사진이 긴 글 옆이 통째로 비어 보여서, 단(column) 흐름으로 채운다. */
  .news-pane { display: block; overflow-y: auto }
  .news-list {
    display: block; column-width: 350px; column-gap: 12px;
    padding: 14px 16px 24px; overflow: visible;
  }
  .news-list > .news-item {
    break-inside: avoid; -webkit-column-break-inside: avoid;
    margin: 0 0 12px; display: inline-block; width: 100%;
  }
  /* 안내 문구(불러오는 중·글 없음)는 단을 나누지 않는다 */
  .news-list > :not(.news-item) { column-span: all; text-align: center; color: #8C95A8; padding: 20px 0 }
  /* 사진이 카드를 너무 길게 늘이지 않도록 */
  .news-item img { max-height: 420px; object-fit: contain }
}

/* 쪽지 글 칸 contenteditable · 그림(2026-09-17) */
.note-modal-editor { overflow-y: auto; max-height: 50vh; white-space: pre-wrap; word-break: break-word; }
.note-modal-editor:empty::before { content: attr(data-placeholder); color: #8C95A8; pointer-events: none; }
.note-modal-editor img, .win-editor img { max-width: 100%; height: auto; vertical-align: bottom; cursor: pointer; }
.note-item-html { white-space: normal; }
.note-item-html img { display: block; max-width: min(100%, 520px); height: auto; margin: 6px 0; border-radius: 6px; border: 1px solid #E4E8F0; }
/* 그림 크기 손잡이(img-resize.js — 웹메일 style.css 와 같은 모양) */
.img-rs-box { position: fixed; display: none; z-index: 1400; border: 2px solid #3366FF; box-sizing: border-box; pointer-events: none; }
.img-rs-box.on { display: block; }
.img-rs-handle { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; box-sizing: border-box; background: #fff;
  border: 2px solid #3366FF; border-radius: 3px; cursor: nwse-resize; pointer-events: auto; touch-action: none; }
.img-rs-size { position: absolute; right: 0; top: -24px; padding: 2px 6px; border-radius: 4px; background: #1A1D27; color: #fff;
  font-size: 11px; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums; }
