/*
 * SRISE Design Tokens
 * - 모든 화면은 이 변수만 사용한다 (색상/간격/글꼴을 화면마다 임의로 정하지 않는다).
 * - Dark Mode: <html data-theme="dark"> 또는 OS 설정(data-theme 미지정 시)을 따른다.
 */
:root {
  /*
   * Typography — Windows는 **맑은 고딕을 영문·숫자까지** 쓴다 (네이버웍스 PC와 같은 글꼴).
   * 예전에는 영문을 Segoe UI, 한글을 맑은 고딕으로 섞어 써서 한 줄 안에서 글꼴이 달라 보였다
   * (직원 테스트: "네이버웍스 글꼴이 더 보기 편하다"). macOS: Apple SD Gothic Neo.
   */
  --sr-font-sans:
    'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', 'Segoe UI', 'Noto Sans KR', system-ui,
    sans-serif;
  --sr-font-mono: 'Cascadia Mono', 'Consolas', 'D2Coding', ui-monospace, monospace;
  /*
   * 가장 작은 글자 12px (v0.43 대표 승인 초안 1번 — 예전 11px는 시각 · "읽음" · 안내 글자가 잘 안 보였다).
   * 화면에 읽을 글자를 12px보다 작게 쓰지 않는다. 숫자 동그라미(배지) 안의 숫자만 11px까지 쓴다(--sr-text-badge).
   */
  --sr-text-xs: 12px;
  --sr-text-badge: 11px;
  --sr-text-sm: 12px;
  --sr-text-md: 13px;
  --sr-text-base: 14px;
  --sr-text-lg: 16px;
  --sr-text-xl: 18px;
  --sr-text-2xl: 22px;
  --sr-leading: 1.5;
  --sr-weight-regular: 400;
  /* 예전 이름 — 몇 곳이 이 이름을 써서 굵기가 적용되지 않았다 (v0.43에서 정의) */
  --sr-weight-normal: 400;
  --sr-weight-medium: 500;
  --sr-weight-semibold: 600;
  --sr-weight-bold: 700;

  /* Spacing (4px grid) */
  --sr-space-1: 4px;
  --sr-space-2: 8px;
  --sr-space-3: 12px;
  --sr-space-4: 16px;
  --sr-space-5: 20px;
  --sr-space-6: 24px;
  --sr-space-8: 32px;
  --sr-space-10: 40px;

  /* Radius / Shadow / Motion */
  --sr-radius-sm: 4px;
  --sr-radius-md: 6px;
  --sr-radius-lg: 10px;
  --sr-radius-xl: 14px;
  --sr-radius-full: 999px;
  --sr-duration: 120ms;

  /* Layout */
  --sr-nav-width: 60px;
  --sr-list-width: 328px;
  --sr-header-height: 56px;
  /*
   * 오른쪽 아래 둥근 "+" 단추(46px, 바닥에서 16px)가 떠 있는 목록의 맨 아래 빈 공간 —
   * 끝까지 내렸을 때 마지막 줄의 시각 · 숫자가 단추에 가려지지 않게 (v0.43 대표 승인 초안 18번).
   */
  --sr-fab-clearance: 80px;
  /* 관리자·설정처럼 글을 읽는 화면의 최대 폭 (넓은 모니터에서 내용이 퍼지지 않도록) */
  --sr-admin-max-width: 1120px;

  /* Brand — 회사 로고(01_SRISE_Logo.ai) 원본 색. 임의로 바꾸지 않는다. */
  --sr-color-brand: #2f84b7;
  --sr-color-brand-dark: #24688f;

  /*
   * ── Light theme (default) ──
   * 대화 화면의 색은 직원들이 익숙한 네이버웍스 PC와 맞췄다 (대표 요청 · 2026-10).
   *   글자 #202124 · 보조 글자 #676E77 · 강조 #0C64E0
   *   상대 말풍선 #F1F3F9 · 내 말풍선 #C0EAFC · 대화 배경 흰색
   *   대화 목록 배경 #F9FAFC · 고른 대화방 #E1EBF9 · 입력칸 #F1F3F9
   *   왼쪽 주 메뉴 · 오른쪽 창 제목 줄 #51A7FF
   */
  --sr-color-bg: #f4f5f7;
  --sr-color-surface: #ffffff;
  --sr-color-surface-2: #f9fafc;
  --sr-color-surface-hover: #eef2f8;
  --sr-color-surface-active: #e1ebf9;
  /* 대화 화면(메시지가 오가는 곳)과 대화 목록 칸의 바탕 */
  --sr-color-conversation-bg: #ffffff;
  --sr-color-list-bg: #f9fafc;
  /* 입력칸 · 목록 검색칸처럼 "글을 넣는 곳"의 채움 색 (테두리 없이 회색 바탕으로 구분) */
  --sr-color-field-fill: #f1f3f9;
  --sr-color-field-fill-focus: #eaeef6;
  --sr-color-nav-bg: #51a7ff;
  --sr-color-nav-fg: rgba(255, 255, 255, 0.82);
  --sr-color-nav-fg-active: #ffffff;
  --sr-color-nav-active: rgba(255, 255, 255, 0.26);
  --sr-color-border: #e4e7ed;
  --sr-color-border-strong: #cdd2db;
  --sr-color-text: #202124;
  /*
   * 보조 글자 · 시각 · 안내 글자 (v0.43 대표 승인 초안 1번 — 한 단계 진하게).
   * 흰 바탕 대비 muted 7.6 : 1 · subtle 4.8 : 1 (예전 #676e77 · #8b929b는 subtle이 3.0 : 1이라 잘 안 보였다).
   */
  --sr-color-text-muted: #4b5563;
  --sr-color-text-subtle: #6b7280;
  --sr-color-text-inverse: #ffffff;
  --sr-color-primary: #0c64e0;
  --sr-color-primary-hover: #0a55c0;
  --sr-color-primary-soft: #e1ebf9;
  --sr-color-primary-text: #0c64e0;
  --sr-color-danger: #d92d20;
  --sr-color-danger-soft: #fdecea;
  /* 성공 · 오류를 글자로 쓸 때 (예전에는 정의가 없어 두 화면 모두 밝은 화면 색으로 보였다) */
  --sr-color-danger-text: #c0392b;
  --sr-color-success-text: #1a7f4b;
  --sr-color-warning: #b54708;
  --sr-color-warning-soft: #fef4e6;
  --sr-color-success: #067647;
  --sr-color-focus: rgba(12, 100, 224, 0.28);
  --sr-color-bubble-mine: #c0eafc;
  --sr-color-bubble-mine-text: #202124;
  --sr-color-bubble-other: #f1f3f9;
  --sr-color-bubble-other-text: #202124;
  /* 안 읽은 수 빨간 동그라미 (v0.43 초안 2번 — #e5484d는 흰 숫자 대비 3.9 : 1, #d92d20은 4.8 : 1) */
  --sr-color-unread: #d92d20;
  --sr-color-unread-soft: rgba(217, 45, 32, 0.2);
  /* 숫자를 꺼 둔(알림 끔) 대화방의 회색 동그라미 · 퇴사한 사람 사진 바탕 — 흰 글자 4.8 : 1 */
  --sr-color-badge-muted: #6b7280;
  --sr-color-avatar-departed: #6b7280;
  /*
   * 나를 부른 @멘션 — 노란 바탕 + 진한 글자 (v0.43 초안 11번). 예전에는 정의가 없어
   * 어두운 화면에서 노란 바탕에 흰 글자(1.04 : 1)로 보였다.
   */
  --sr-color-mention-me: #fff176;
  --sr-color-mention-me-text: #202124;
  /* "읽음 N" — 내 메시지는 파랑, 다른 사람 메시지는 회색 (네이버웍스와 같은 색) */
  --sr-color-read-count: #0c64e0;
  /* 다른 사람 메시지의 "읽음 N" — 보조 글자(muted)와 같은 진한 회색 (v0.43 검토: #6b7280은 대화방 배경색 위에서 4.5 : 1이 안 됐다) */
  --sr-color-read-count-other: #4b5563;
  /* "읽은 멤버" 같은 오른쪽 창의 제목 줄 */
  --sr-color-panel-header: #51a7ff;
  --sr-color-panel-header-text: #ffffff;
  --sr-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --sr-shadow-md: 0 4px 12px rgba(16, 24, 40, 0.1);
  --sr-shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.18);
  --sr-overlay: rgba(15, 23, 42, 0.45);

  /* Presence */
  --sr-presence-online: #12b76a;
  --sr-presence-away: #f5a524;
  --sr-presence-meeting: #7c3aed;
  --sr-presence-out: #0ea5e9;
  /* 휴가 = 분홍 (v0.43 초안 3번 — 예전 청록 #14b8a6은 작은 점에서 "온라인" 초록과 구별되지 않았다) */
  --sr-presence-vacation: #db2777;
  --sr-presence-dnd: #e5484d;
  --sr-presence-offline: #a3acba;

  /*
   * 파일 종류 색 (v0.42 대표 승인 초안 "안 B" — 확장자 글자 아이콘 바탕 · 대화방 파일 칸 왼쪽 띠 · 종류 이름 글자).
   * 작은 흰 글자도 잘 읽히게 흰 글자 대비 4.5 : 1 이상. 휴대폰(apps/mobile ui/theme.ts colors.fileType)과 같은 값 —
   * 바꾸면 두 곳을 함께 바꾼다 (mobile `v43-file-type` 시험이 같은지 본다). 어두운 화면에서도 같은 바탕을 쓴다.
   */
  --sr-file-excel: #1a7a43;
  --sr-file-word: #2b63c6;
  --sr-file-hwp: #0e7c86;
  --sr-file-powerpoint: #c4501c;
  --sr-file-pdf: #c42f2f;
  --sr-file-archive: #7a5d2e;
  --sr-file-text: #5e6b7a;
  --sr-file-image: #6a4fc4;
  --sr-file-video: #6a4fc4;
  --sr-file-other: #6b7685;

  color-scheme: light;
}

:root[data-theme='dark'] {
  --sr-color-bg: #0f141c;
  --sr-color-surface: #161c26;
  --sr-color-surface-2: #1b222e;
  --sr-color-surface-hover: #222a38;
  --sr-color-surface-active: #2a3446;
  --sr-color-conversation-bg: #161c26;
  --sr-color-list-bg: #131922;
  --sr-color-field-fill: #222a38;
  --sr-color-field-fill-focus: #283141;
  --sr-color-nav-bg: #0b0f15;
  --sr-color-nav-fg: #8a96a8;
  --sr-color-nav-fg-active: #ffffff;
  --sr-color-nav-active: #1f2837;
  --sr-color-border: #283141;
  --sr-color-border-strong: #384356;
  --sr-color-text: #e6eaf0;
  --sr-color-text-muted: #a3adbd;
  /* 어두운 바탕(고른 대화방 #2a3446 포함)에서도 4.5 : 1 이상 (예전 #768296은 3.2~4.4 : 1) */
  --sr-color-text-subtle: #94a0b2;
  --sr-color-primary: #4c8dff;
  --sr-color-primary-hover: #6aa0ff;
  --sr-color-primary-soft: #1b2a45;
  --sr-color-primary-text: #8fb6ff;
  --sr-color-danger: #f97066;
  --sr-color-danger-soft: #3a1d1b;
  --sr-color-danger-text: #f97066;
  --sr-color-success-text: #47cd89;
  --sr-color-warning: #fdb022;
  --sr-color-warning-soft: #33260f;
  --sr-color-success: #47cd89;
  --sr-color-focus: rgba(76, 141, 255, 0.45);
  --sr-color-bubble-mine: #23406e;
  --sr-color-bubble-mine-text: #eef3ff;
  --sr-color-bubble-other: #222a38;
  --sr-color-bubble-other-text: #e6eaf0;
  --sr-color-read-count: #8fb6ff;
  --sr-color-read-count-other: #a3adbd;
  /* 어두운 화면에서도 노란 바탕 + 진한 글자 (대비 11.4 : 1 — 예전 노랑 위 흰 글자는 1.04 : 1) */
  --sr-color-mention-me: #f5c84c;
  --sr-color-mention-me-text: #1d1600;
  --sr-color-panel-header: #2f6fbf;
  --sr-color-panel-header-text: #ffffff;
  --sr-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sr-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --sr-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
  --sr-overlay: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--sr-font-sans);
  font-size: var(--sr-text-base);
  line-height: var(--sr-leading);
  color: var(--sr-color-text);
  background: var(--sr-color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

:focus-visible {
  outline: 2px solid var(--sr-color-primary);
  outline-offset: 1px;
}

::selection {
  background: var(--sr-color-primary-soft);
}

/* 스크롤바 (Windows에서 기본 스크롤바가 두꺼워 업무용 UI에 맞게 얇게) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--sr-color-border-strong);
  border-radius: var(--sr-radius-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

.sr-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* ── Button ─────────────────────────────────────────── */
.sr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sr-space-2);
  height: 34px;
  padding: 0 var(--sr-space-4);
  border-radius: var(--sr-radius-md);
  border: 1px solid transparent;
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
  white-space: nowrap;
  transition:
    background var(--sr-duration),
    border-color var(--sr-duration),
    color var(--sr-duration);
}
.sr-btn--sm {
  height: 28px;
  padding: 0 var(--sr-space-3);
  font-size: var(--sr-text-sm);
}
.sr-btn--lg {
  height: 42px;
  padding: 0 var(--sr-space-5);
  font-size: var(--sr-text-base);
}
.sr-btn--block {
  width: 100%;
}
.sr-btn--primary {
  background: var(--sr-color-primary);
  color: var(--sr-color-text-inverse);
}
.sr-btn--primary:hover:not(:disabled) {
  background: var(--sr-color-primary-hover);
}
.sr-btn--secondary {
  background: var(--sr-color-surface);
  border-color: var(--sr-color-border-strong);
  color: var(--sr-color-text);
}
.sr-btn--secondary:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
}
.sr-btn--ghost {
  background: transparent;
  color: var(--sr-color-text-muted);
}
.sr-btn--ghost:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
.sr-btn--danger {
  background: var(--sr-color-danger);
  color: var(--sr-color-text-inverse);
}
.sr-btn:disabled {
  opacity: 0.55;
}

.sr-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-md);
  background: transparent;
  color: var(--sr-color-text-muted);
}
.sr-icon-btn:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
.sr-icon-btn--sm {
  width: 26px;
  height: 26px;
}

/* ── Text field ─────────────────────────────────────── */
.sr-field {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-1);
}
.sr-field__label {
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
  color: var(--sr-color-text-muted);
}
.sr-input {
  height: 38px;
  padding: 0 var(--sr-space-3);
  border: 1px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  font-size: var(--sr-text-base);
  outline: none;
  transition:
    border-color var(--sr-duration),
    box-shadow var(--sr-duration);
}
.sr-input:focus {
  border-color: var(--sr-color-primary);
  box-shadow: 0 0 0 3px var(--sr-color-focus);
}
.sr-input[aria-invalid='true'] {
  border-color: var(--sr-color-danger);
}
.sr-input--sm {
  height: 32px;
  font-size: var(--sr-text-md);
}
.sr-field__hint {
  font-size: var(--sr-text-sm);
  color: var(--sr-color-text-subtle);
}
.sr-field__error {
  font-size: var(--sr-text-sm);
  color: var(--sr-color-danger);
}

.sr-search {
  position: relative;
  display: flex;
  align-items: center;
}
.sr-search svg {
  position: absolute;
  left: 10px;
  color: var(--sr-color-text-subtle);
  pointer-events: none;
}
.sr-search .sr-input {
  width: 100%;
  padding-left: 32px;
}
/* 검색어 지우기 (x) — 아이콘과 달리 눌려야 하므로 pointer-events를 되살린다. */
.sr-search__clear {
  position: absolute;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-full);
  background: transparent;
  color: var(--sr-color-text-subtle);
  cursor: pointer;
}
.sr-search__clear:hover {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}

.sr-checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--sr-space-2);
  font-size: var(--sr-text-md);
  color: var(--sr-color-text-muted);
  cursor: pointer;
  user-select: none;
}
.sr-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--sr-color-primary);
}

/* ── Avatar / presence / badge ─────────────────────── */
.sr-avatar {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 동그란 사진 — 네이버웍스·모바일 앱과 같은 모양 (여러 명 방 사진 묶음도 동그라미다) */
  border-radius: var(--sr-radius-full);
  font-weight: var(--sr-weight-semibold);
  color: #fff;
  user-select: none;
}
/* 프로필 사진 — 동그라미를 꽉 채우도록 잘라서 넣는다 (세로/가로 긴 사진도 찌그러지지 않게). */
.sr-avatar__photo {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
/*
 * 상태 점 (v0.43 대표 승인 초안 3번) — 12px 점 + 바탕색 2px 테두리.
 * 테두리는 box-shadow로 그려 점 크기(색이 보이는 부분)를 줄이지 않는다. 진한 바탕(왼쪽 파란 메뉴 등)에 놓이면
 * 그 자리에서 --sr-presence-ring을 바탕색으로 바꾼다.
 */
.sr-presence-dot {
  position: relative;
  display: inline-block;
  flex: none;
  border-radius: var(--sr-radius-full);
  box-shadow: 0 0 0 2px var(--sr-presence-ring, var(--sr-color-surface));
}
/*
 * 사진 위의 상태 점 — 사진 오른쪽 아래에 겹쳐 놓는다.
 * 위의 .sr-presence-dot(position: relative)보다 뒤 · 더 구체적인 선택자로 두어야 한다 — 앞에 두면 relative가 이겨
 * 점이 이름 글자 옆으로 밀려났다("철수●", v0.43 검토 2026-11-08).
 */
.sr-avatar > .sr-avatar__presence {
  position: absolute;
  right: -1px;
  bottom: -1px;
}
.sr-presence--ONLINE {
  background: var(--sr-presence-online);
}
.sr-presence--AWAY {
  background: var(--sr-presence-away);
}
.sr-presence--MEETING {
  background: var(--sr-presence-meeting);
}
.sr-presence--OUT_OF_OFFICE {
  background: var(--sr-presence-out);
}
.sr-presence--VACATION {
  background: var(--sr-presence-vacation);
}
.sr-presence--DO_NOT_DISTURB {
  background: var(--sr-presence-dnd);
}
/* 방해금지는 가운데 흰 가로줄 — 빨강만으로 구별하지 않게 (색을 구별하기 어려운 사람도 알아본다). */
.sr-presence--DO_NOT_DISTURB::after {
  position: absolute;
  top: 50%;
  right: 2px;
  left: 2px;
  height: 2px;
  margin-top: -1px;
  border-radius: 1px;
  background: #fff;
  content: '';
}
.sr-presence--OFFLINE {
  background: var(--sr-presence-offline);
}

.sr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* v0.43 초안 1 · 2번: 12px 숫자가 들어가는 20px 동그라미 */
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-unread);
  color: #fff;
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-bold);
  line-height: 1;
}
.sr-badge--muted {
  background: var(--sr-color-badge-muted);
}

.sr-spinner {
  display: inline-block;
  border: 2px solid var(--sr-color-border-strong);
  border-top-color: var(--sr-color-primary);
  border-radius: var(--sr-radius-full);
  animation: sr-spin 0.8s linear infinite;
}
@keyframes sr-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Tooltip / Menu / Dialog (Radix) ───────────────── */
.sr-tooltip {
  z-index: 1000;
  padding: 5px 8px;
  border-radius: var(--sr-radius-sm);
  background: #111827;
  color: #fff;
  font-size: var(--sr-text-sm);
  box-shadow: var(--sr-shadow-md);
  max-width: 280px;
}

.sr-menu {
  z-index: 900;
  min-width: 180px;
  padding: var(--sr-space-1);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-lg);
}
.sr-menu__item {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  padding: 7px 10px;
  border-radius: var(--sr-radius-md);
  font-size: var(--sr-text-md);
  outline: none;
  cursor: pointer;
  user-select: none;
}
.sr-menu__item[data-highlighted] {
  background: var(--sr-color-surface-hover);
}
.sr-menu__item[data-disabled] {
  opacity: 0.5;
  cursor: default;
}
.sr-menu__item--danger {
  color: var(--sr-color-danger);
}
.sr-menu__label {
  padding: 6px 10px 4px;
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
  color: var(--sr-color-text-subtle);
}
.sr-menu__separator {
  height: 1px;
  margin: var(--sr-space-1) 0;
  background: var(--sr-color-border);
}

.sr-dialog__overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--sr-overlay);
}
.sr-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 801;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: var(--sr-space-6);
  border-radius: var(--sr-radius-xl);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-lg);
}
/* 입력 칸이 두 줄로 들어가는 폼용 (너무 좁으면 글자가 잘린다) */
.sr-dialog--form {
  width: min(620px, calc(100vw - 32px));
}
.sr-dialog--lg {
  display: flex;
  flex-direction: column;
  width: min(880px, calc(100vw - 48px));
  /* 조직도에서 사람을 고르는 창이라 높이가 넉넉해야 한다 (예전에는 두어 명만 보였다). */
  height: min(760px, calc(100vh - 64px));
  max-height: calc(100vh - 64px);
  overflow: hidden;
  padding: var(--sr-space-5) var(--sr-space-5) var(--sr-space-4);
}
.sr-dialog__title {
  margin: 0 0 var(--sr-space-2);
  font-size: var(--sr-text-lg);
  font-weight: var(--sr-weight-bold);
}
.sr-dialog__description {
  margin: 0 0 var(--sr-space-4);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  /* 확인 창의 안내는 여러 줄일 수 있다 (\n을 그대로 줄바꿈). */
  white-space: pre-line;
}
.sr-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sr-space-2);
  margin-top: var(--sr-space-5);
}

/* ── Switch / Segmented ────────────────────────────── */
.sr-switch {
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-border-strong);
  transition: background var(--sr-duration);
}
.sr-switch[data-state='checked'] {
  background: var(--sr-color-primary);
}
.sr-switch__thumb {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: var(--sr-radius-full);
  background: #fff;
  box-shadow: var(--sr-shadow-sm);
  transform: translateX(2px);
  transition: transform var(--sr-duration);
}
.sr-switch[data-state='checked'] .sr-switch__thumb {
  transform: translateX(18px);
}

.sr-segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-hover);
}
.sr-segmented__item {
  height: 28px;
  padding: 0 var(--sr-space-3);
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.sr-segmented__item[aria-checked='true'] {
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
  font-weight: var(--sr-weight-semibold);
  box-shadow: var(--sr-shadow-sm);
}

/* ── Tabs (밑줄형) ─────────────────────────────────── */
.sr-tabs {
  display: flex;
  align-items: stretch;
  gap: var(--sr-space-1);
  min-width: 0;
}
.sr-tabs__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 var(--sr-space-2);
  border: none;
  background: transparent;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  white-space: nowrap;
}
.sr-tabs__item:hover {
  color: var(--sr-color-text);
}
.sr-tabs__item[aria-selected='true'] {
  color: var(--sr-color-primary-text);
  font-weight: var(--sr-weight-semibold);
}
.sr-tabs__item[aria-selected='true']::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 0;
  left: 4px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--sr-color-primary);
}
.sr-tabs__count {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}
/* 탭 + 누를 수 있는 숫자 (대화 목록의 안 읽은 수 — v0.34). 숫자는 탭 글자 바로 오른쪽, 조금 위에 붙는다. */
.sr-tabs__slot {
  display: inline-flex;
  align-items: center;
}
.sr-tabs__slot .sr-tabs__item {
  padding-right: 3px;
}
.sr-tabs__badge {
  min-width: 16px;
  height: 16px;
  margin: 0 var(--sr-space-1) 0 0;
  padding: 0 4px;
  border: 1px solid transparent;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-unread);
  color: #fff;
  font-size: var(--sr-text-badge);
  font-weight: var(--sr-weight-bold);
  line-height: 14px;
  text-align: center;
  cursor: pointer;
  transform: translateY(-5px);
}
.sr-tabs__badge:hover {
  filter: brightness(0.92);
}
/* 눌린 상태("안 읽은 대화만" 켜짐): 흰 바탕 · 빨간 테두리 — 켜졌는지 한눈에 보이게. */
.sr-tabs__badge.is-pressed {
  border-color: var(--sr-color-unread);
  background: var(--sr-color-surface);
  color: var(--sr-color-unread);
  box-shadow: 0 0 0 2px var(--sr-color-unread-soft);
}

/* ── Fab (목록 위 원형 버튼) ───────────────────────── */
.sr-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary);
  color: #fff;
  box-shadow: var(--sr-shadow-md);
  transition:
    background var(--sr-duration),
    transform var(--sr-duration);
}
.sr-fab:hover:not(:disabled) {
  background: var(--sr-color-primary-hover);
  transform: translateY(-1px);
}
.sr-fab:disabled {
  opacity: 0.6;
}

/* ── Empty state / alert ───────────────────────────── */
.sr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sr-space-2);
  height: 100%;
  padding: var(--sr-space-8);
  color: var(--sr-color-text-subtle);
  text-align: center;
}
.sr-empty__title {
  margin: 0;
  color: var(--sr-color-text);
  font-size: var(--sr-text-lg);
  font-weight: var(--sr-weight-semibold);
}
/* 안내 글은 회색 바탕 화면에서도 잘 읽히게 muted (v0.43 — subtle은 회색 바탕에서 4.5 : 1이 안 된다) */
.sr-empty__desc {
  margin: 0;
  max-width: 320px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  line-height: 1.6;
  /* 안내 글의 줄바꿈(\n)은 그대로 — 초안처럼 뜻이 끊기는 곳에서 줄을 바꾼다 */
  white-space: pre-line;
  word-break: keep-all;
}
/* 그림 + 안내 + 바로 시작 단추 (v0.43 초안 19번) */
.sr-empty--illustrated {
  gap: var(--sr-space-3);
}
.sr-empty__art {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: var(--sr-space-1);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
}
.sr-empty--illustrated .sr-empty__title {
  font-size: var(--sr-text-xl);
  font-weight: var(--sr-weight-bold);
}
.sr-empty__action {
  margin-top: var(--sr-space-1);
}

.sr-alert {
  display: flex;
  gap: var(--sr-space-2);
  padding: var(--sr-space-3);
  border-radius: var(--sr-radius-md);
  font-size: var(--sr-text-md);
}
.sr-alert--error {
  background: var(--sr-color-danger-soft);
  color: var(--sr-color-danger);
}
.sr-alert--warning {
  background: var(--sr-color-warning-soft);
  color: var(--sr-color-warning);
}
.sr-alert--info {
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
}

/* ── 이모지 선택 ────────────────────────────────────── */
.sr-emoji {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  width: 320px;
  max-width: 100%;
}
.sr-emoji__search {
  flex: none;
}
.sr-emoji__scroll {
  max-height: 260px;
  overflow-y: auto;
}
.sr-emoji__group + .sr-emoji__group {
  margin-top: var(--sr-space-2);
}
.sr-emoji__label {
  margin: 0 0 4px;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}
.sr-emoji__grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
}
.sr-emoji__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  font-size: 19px;
  line-height: 1;
}
.sr-emoji__item:hover {
  background: var(--sr-color-surface-hover);
}
.sr-emoji__empty {
  margin: var(--sr-space-3) 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  text-align: center;
}

.sr-popover {
  z-index: 900;
  padding: var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-lg);
}
/* SRISE Messenger Desktop — 화면 스타일 (값은 반드시 design token 사용) */

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
}

.boot-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sr-space-4);
  height: 100%;
  padding: var(--sr-space-8);
}

/* ── Auth ─────────────────────────────────────────────── */
.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--sr-space-6);
  background:
    radial-gradient(circle at 20% 10%, var(--sr-color-primary-soft), transparent 45%),
    var(--sr-color-bg);
  overflow: auto;
}
.auth-card {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-4);
  width: min(400px, 100%);
  padding: var(--sr-space-8);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-xl);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-md);
}
.auth-card__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sr-space-1);
  margin-bottom: var(--sr-space-3);
  text-align: center;
}
.auth-card__logo {
  margin-bottom: var(--sr-space-2);
}
.auth-card__title {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-lg);
  font-weight: var(--sr-weight-semibold);
  letter-spacing: 0.02em;
}
.auth-card__subtitle,
.auth-card__help,
.auth-card__meta {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.auth-card__meta {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
  text-align: center;
}
/* 개인정보처리방침 (v0.39) — 로그인 카드 맨 아래 작은 밑줄 링크 */
.auth-card__legal {
  margin: 0;
  font-size: var(--sr-text-xs);
  text-align: center;
}
.auth-card__legal a {
  color: var(--sr-color-text-muted);
  text-decoration: underline;
}

/* ── Shell ────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sr-nav-width) var(--sr-list-width) minmax(0, 1fr);
  height: 100%;
}
.app-shell--no-list {
  grid-template-columns: var(--sr-nav-width) minmax(0, 1fr);
}
/*
 * 대화 목록 폭은 창 크기와 상관없이 기본 328px (v0.44 — v0.43 시안 6번에서 1,024~1,279px 창만 260px로 줄였더니
 * 방 이름이 다섯 글자 정도만 보였다 · 대표 확정 "A + B 합친 안"). 경계선(.list-resizer)을 끌어 260~480px로 바꾸고
 * 그 값은 features/shell/ListResizer가 이 틀의 --sr-list-width로 넣는다. 작은 창의 옆 창 겹쳐 열기(layout.ts)는 그대로.
 */
.app-shell {
  position: relative;
}
/* 목록과 대화 사이 경계선 손잡이 — 보이지 않는 6px 띠(대화 쪽으로 조금 더), 올리거나 끄는 동안 파란 줄. */
.list-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--sr-nav-width) + var(--sr-list-width) - 2px);
  width: 6px;
  z-index: 10;
  cursor: col-resize;
  touch-action: none;
  outline: none;
}
.list-resizer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1px;
  width: 2px;
  background: transparent;
  transition: background-color 0.12s ease;
}
.list-resizer:hover::after,
.list-resizer:focus-visible::after,
.list-resizer.is-dragging::after {
  background: var(--sr-color-primary);
}
.app-shell__list {
  min-width: 0;
  /*
   * grid 칸은 기본값이 min-height:auto 라서 **내용만큼 늘어난다.**
   * 그러면 안쪽 .panel(height:100%)도 같이 늘어나 .panel__body의 스크롤이 생기지 않고,
   * 목록이 길어지면 아래가 화면 밖으로 잘려 나간다 (조직도에서 실제로 재현되던 문제).
   * → 칸을 화면 높이에 가두고, 넘치는 부분은 안쪽 목록이 스크롤로 처리하게 한다.
   */
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--sr-color-border);
  background: var(--sr-color-list-bg);
}
.app-shell__main {
  /* 짧은 안내(.toast-host--shell)가 이 칸 기준으로 자리를 잡는다 */
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--sr-color-bg);
}
.app-shell__content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.nav-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sr-space-2);
  /* 창을 아주 낮게 줄여도 메뉴가 화면 밖으로 밀리지 않게 한다. */
  min-height: 0;
  overflow-y: auto;
  padding: var(--sr-space-3) 0;
  background: var(--sr-color-nav-bg);
}
.nav-rail__me {
  margin-bottom: var(--sr-space-2);
}
.nav-rail__avatar {
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--sr-radius-full);
}
/* 파란 메뉴 위의 내 상태 점 — 테두리를 메뉴 바탕색으로 */
.nav-rail__avatar .sr-avatar__presence {
  --sr-presence-ring: var(--sr-color-nav-bg);
}
.nav-rail__items {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sr-space-1);
}
.nav-rail__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-1);
}
/* 네이버웍스처럼 아이콘만 두고, 이름은 툴팁/스크린리더로 제공한다. */
.nav-rail__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--sr-radius-lg);
  background: transparent;
  color: var(--sr-color-nav-fg);
}
.nav-rail__item:hover:not(:disabled) {
  background: var(--sr-color-nav-active);
  color: var(--sr-color-nav-fg-active);
}
.nav-rail__item.is-active {
  background: var(--sr-color-nav-active);
  color: var(--sr-color-nav-fg-active);
}
.nav-rail__item:disabled {
  opacity: 0.45;
}
.nav-rail__badge {
  position: absolute;
  top: 0;
  right: 0;
}

.connection-banner {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  padding: 6px var(--sr-space-4);
  background: var(--sr-color-warning-soft);
  color: var(--sr-color-warning);
  font-size: var(--sr-text-md);
}

/* ── Panels (list column) ─────────────────────────────── */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--sr-header-height);
  padding: 0 var(--sr-space-3) 0 var(--sr-space-4);
  flex: none;
}
.panel__title {
  margin: 0;
  font-size: var(--sr-text-xl);
  font-weight: var(--sr-weight-bold);
}
.panel__search {
  padding: var(--sr-space-3) var(--sr-space-3) var(--sr-space-2);
  flex: none;
}
/* 목록 검색칸 — 테두리 없는 회색 칸 (입력칸과 같은 모양) */
.panel__search .sr-input {
  border-color: transparent;
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-field-fill);
}
.panel__search .sr-input:focus {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-surface);
  box-shadow: none;
}
/* 대화방 종류 탭 (전체 / 1:1 / 여러 명) */
.panel__tabs {
  padding: 0 var(--sr-space-2);
  border-bottom: 1px solid var(--sr-color-border);
  flex: none;
}
/* "안 읽은 대화만 보는 중" 줄 (탭의 빨간 숫자를 눌렀을 때 — v0.34) */
.panel__filter-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
  margin: var(--sr-space-2) var(--sr-space-3) 0;
  padding: 6px 10px;
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
  flex: none;
}
.panel__filter-note button {
  border: none;
  background: transparent;
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-sm);
  text-decoration: underline;
  cursor: pointer;
}
/* 정렬 등 목록 도구 줄 */
.panel__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sr-space-2) var(--sr-space-3) var(--sr-space-1);
  flex: none;
}
.panel__sort {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.panel__sort:hover {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
.panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* 맨 아래에 "+" 단추 높이만큼 빈 공간 — 마지막 대화방이 단추에 가려지지 않게 (v0.43 초안 18번) */
  padding: 0 var(--sr-space-2) var(--sr-fab-clearance);
}
/* 새 대화 버튼 — 네이버웍스처럼 목록 오른쪽 아래에 띄운다 */
.panel__fab {
  position: absolute;
  right: var(--sr-space-4);
  bottom: var(--sr-space-4);
  z-index: 2;
}
.menu-check.is-off {
  visibility: hidden;
}
.empty-state__logo {
  opacity: 0.85;
}

.room-item {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
  width: 100%;
  padding: 10px var(--sr-space-2);
  border: none;
  border-radius: var(--sr-radius-lg);
  background: transparent;
  text-align: left;
}
.room-item:hover {
  background: var(--sr-color-surface-hover);
}
.room-item.is-active {
  background: var(--sr-color-surface-active);
}
.room-item__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.room-item__top,
.room-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
}
.room-item__title {
  overflow: hidden;
  font-weight: var(--sr-weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-item__time {
  flex: none;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
/*
 * 마우스를 올린 줄(#eef2f8) · 고른 줄(#e1ebf9) 바탕에서는 회색(subtle)이 4.3 · 4.0 : 1이라 한 단계 진한 muted로
 * (v0.43 검토 — 흰 목록 바탕에서는 초안 그대로 subtle 4.6 : 1).
 */
.room-item:hover .room-item__time,
.room-item.is-active .room-item__time,
.room-item:hover .room-item__count,
.room-item.is-active .room-item__count {
  color: var(--sr-color-text-muted);
}
.room-item__preview {
  overflow: hidden;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-item__preview.is-error {
  color: var(--sr-color-danger);
}

/* ── Conversation ─────────────────────────────────────── */
.conversation {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* 네이버웍스처럼 흰 바탕 + 옅은 회색(상대)·하늘색(나) 말풍선 */
  background: var(--sr-color-conversation-bg);
}
.conversation__header {
  display: flex;
  align-items: center;
  height: var(--sr-header-height);
  padding: 0 var(--sr-space-4);
  border-bottom: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface);
  flex: none;
}
.conversation__peer {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
  min-width: 0;
  padding: 4px 8px 4px 4px;
  border: none;
  border-radius: var(--sr-radius-lg);
  background: transparent;
  text-align: left;
}
.conversation__peer:hover {
  background: var(--sr-color-surface-hover);
}
.conversation__titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.conversation__title {
  font-size: var(--sr-text-lg);
  font-weight: var(--sr-weight-bold);
}
.conversation__status {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* 대화 헤더 오른쪽 도구 모음 (검색·파일·공지·예약·Task) */
.conversation__tools {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.conversation__error {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sr-space-3);
}

.message-list {
  position: relative;
  flex: 1;
  min-height: 0;
}
/*
 * 브라우저 자체의 "스크롤 고정(scroll anchoring)"을 끈다 (v0.46 — 대표 보고 11-11, 최대화 화면 떨림).
 * 목록(Virtuoso)은 말풍선 높이가 바뀌면 스스로 위치를 보정한다. 브라우저도 화면에 보이는 한 줄을 기준으로 위치를
 * 다시 맞추면 두 보정이 겹쳐, 배율 화면의 소수점 높이에서 서로 몇 px씩 되밀며 줄이 위아래로 떨릴 수 있다.
 * 위치는 목록과 "맨 아래 따라가기"(MessageList.tsx)만 정한다.
 */
.message-list [data-virtuoso-scroller] {
  overflow-anchor: none;
}
.message-list--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sr-color-text-subtle);
}
.message-list__loading,
.message-list__start {
  display: flex;
  justify-content: center;
  padding: var(--sr-space-4);
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.message-list__spacer {
  height: var(--sr-space-3);
}

.day-divider,
.unread-divider {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
  padding: var(--sr-space-3) var(--sr-space-6);
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.day-divider::before,
.day-divider::after,
.unread-divider::before,
.unread-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--sr-color-border);
}
.unread-divider {
  color: var(--sr-color-primary-text);
  font-weight: var(--sr-weight-semibold);
}
.unread-divider::before,
.unread-divider::after {
  background: var(--sr-color-primary);
  opacity: 0.4;
}

.msg {
  display: flex;
  gap: var(--sr-space-2);
  padding: 2px var(--sr-space-5);
}
.msg--group-start {
  margin-top: var(--sr-space-2);
}
.msg--mine {
  justify-content: flex-end;
}
.msg__avatar {
  flex: none;
  width: 36px;
}
.msg__main {
  display: flex;
  flex-direction: column;
  max-width: min(72%, 720px);
  min-width: 0;
}
.msg--mine .msg__main {
  align-items: flex-end;
}
.msg__sender {
  margin-bottom: 3px;
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
}
.msg__sender-sub {
  color: var(--sr-color-text-subtle);
  font-weight: var(--sr-weight-regular);
}
.msg__line {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  /* 안쪽 내용(긴 미리보기 등)이 말풍선 칸을 넘어 화면 밖으로 밀려나지 않게 (직원 테스트 #10·#11) */
  max-width: 100%;
  min-width: 0;
}
.msg__bubble {
  min-width: 0;
  /*
   * 말풍선은 칸(msg__stack)보다 넓어지지 않는다 (직원 테스트 v27 #11).
   * 전달 카드·표처럼 줄바꿈하지 않는 내용은 최소 폭이 커서, 칸이 좁으면 말풍선이 칸 밖으로
   * 삐져나와 옆의 "읽음 N"·시각을 덮었다(내 메시지는 왼쪽, 남의 메시지는 오른쪽으로).
   * 넘치는 내용은 말풍선 안에서 줄이거나(말줄임) 가로 스크롤로 보여 준다.
   */
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--sr-color-bubble-other);
  color: var(--sr-color-bubble-other-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  user-select: text;
}
.msg--other.msg--group-start .msg__bubble {
  border-top-left-radius: 4px;
}
.msg--mine .msg__bubble {
  background: var(--sr-color-bubble-mine);
  color: var(--sr-color-bubble-mine-text);
}
.msg--mine.msg--group-start .msg__bubble {
  border-top-right-radius: 4px;
}
.msg__bubble.is-pending {
  opacity: 0.7;
}
.msg-meta {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
  white-space: nowrap;
}
.msg--other .msg-meta {
  align-items: flex-start;
}
/*
 * 대화방 배경색(모래 · 회청 …)을 고른 방에서는 시각 · 수정됨을 한 단계 진한 muted로 — subtle(#6b7280)은
 * 그 바탕에서 3.3 ~ 4.0 : 1이었다 (v0.43 검토, 휴대폰 말풍선 옆 글자와 같은 결정). 흰 바탕은 초안 그대로.
 */
.conversation__main[data-room-bg]:not([data-room-bg='white']) .msg-meta,
.conversation__main[data-room-bg]:not([data-room-bg='white']) .msg-meta__edited {
  color: var(--sr-color-text-muted);
}
/*
 * "읽음 N" — 누르면 읽은 멤버 창이 열린다 (네이버웍스와 같은 모양).
 * 내 메시지: "‹ 읽음 N" 파랑 / 다른 사람 메시지: "읽음 N ›" 회색.
 */
.msg-meta__read {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--sr-color-read-count-other);
  font: inherit;
  font-size: var(--sr-text-xs);
  line-height: 1.4;
  cursor: pointer;
}
.msg-meta__read.is-mine {
  color: var(--sr-color-read-count);
}
.msg-meta__read:hover {
  text-decoration: underline;
}
.msg-meta__read:focus-visible {
  outline: 2px solid var(--sr-color-primary);
  outline-offset: 1px;
}
.msg-meta--failed {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  color: var(--sr-color-danger);
}
.msg-action {
  display: inline-flex;
  padding: 3px;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: var(--sr-color-danger);
}
.msg-action:hover {
  background: var(--sr-color-danger-soft);
}
/*
 * 리액션 · 답장 · 메뉴 단추 칸 (20px × 3 + 사이 6px × 2). 단추가 없는 말풍선(보내는 중 · 실패 · 회수 ·
 * 선택 모드)도 같은 폭을 비워 둬 내 말풍선 오른쪽 끝이 늘 같은 줄에 선다 (v0.43).
 */
.msg__actions {
  display: flex;
  flex: none;
  align-items: flex-end;
  gap: 6px;
  width: 72px;
}
/* 수정·회수 메뉴 — 마우스를 올렸을 때만 보인다 (대화 화면이 버튼으로 어수선해지지 않게) */
.msg-action--menu {
  color: var(--sr-color-text-subtle);
  opacity: 0;
}
.msg-action--menu:hover,
.msg-action--menu[data-state='open'] {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
  opacity: 1;
}
.msg:hover .msg-action--menu,
.msg-action--menu:focus-visible {
  opacity: 1;
}
.msg-meta__edited {
  color: var(--sr-color-text-subtle);
}
/*
 * 회수된 메시지 — 네이버웍스처럼 **한 줄 안내만** 남긴다.
 * 말풍선 배경·테두리를 없애 여러 건이 이어져도 화면이 지저분해지지 않게 한다.
 */
.msg__bubble.is-withdrawn {
  padding: 2px 0;
  border: none;
  background: transparent;
  color: var(--sr-color-text-subtle);
  box-shadow: none;
}
.msg-withdrawn {
  font-style: italic;
}
.msg-link {
  color: var(--sr-color-primary-text);
  text-decoration: underline;
}
.msg-unsupported {
  display: block;
  margin-top: 4px;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}

/* ── 첨부 (이미지 / 파일 / 표) ─────────────────────────── */
.msg-image {
  margin: 0;
}
.msg-image__button {
  display: block;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-md);
  background: transparent;
  cursor: zoom-in;
}
.msg-image__button img {
  display: block;
  max-width: min(360px, 100%);
  max-height: 360px;
  border-radius: var(--sr-radius-md);
  object-fit: contain;
}
.msg-image__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  max-width: 100%;
  min-height: 120px;
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
}
.msg-image figcaption {
  margin-top: 4px;
  font-size: var(--sr-text-md);
}
/*
 * 사진·파일 설명 (v32) — 글 메시지와 같은 RichText로 그린다 (MessageCaption).
 * 줄바꿈 · 띄어쓰기는 글 말풍선과 같게, 띄어쓰기 없는 긴 주소도 말풍선 안에서 줄을 바꾼다
 * (말풍선 밖 — 전달 묶음 상세보기 창 — 에서도 같게 보이도록 여기서도 정해 둔다).
 */
.msg-caption {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.msg-files {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
}
.msg-files__caption {
  white-space: pre-wrap;
}
.msg-file {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  min-width: 220px;
  max-width: 320px;
  padding: 8px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  color: inherit;
  text-align: left;
}

/*
 * 파일 칸 왼쪽 종류 색 띠 4px (v0.42 대표 승인 초안 "안 B" — 엑셀 초록 · 워드 파랑 · 한글 청록 …, 색은 file-type.css).
 * 회수된 파일 칸(msg-file--deleted)에는 띠가 없다.
 */
.msg-file--kind {
  position: relative;
  overflow: hidden;
  padding-left: 12px;
}
.msg-file--kind::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--file-kind-color);
  content: '';
}
.msg-file__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.msg-file__name {
  overflow: hidden;
  font-size: var(--sr-text-md);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-file__size {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.msg-file__download {
  flex: none;
  color: var(--sr-color-text-subtle);
}
.msg-file--deleted,
.msg-file--error {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border-style: dashed;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  font-style: italic;
}
/*
 * 표 메시지 (v0.43 시안 17번 PC — 대표 승인 2026-11-08).
 * 말풍선은 대화 칸 폭 거의 끝까지(최대 약 960px), 칸 글자는 3줄까지 줄바꿈(칸 최대 360px — 넘치는 글은
 * 마우스를 올리면 전체 · "크게 보기"에서 다 보인다), 그래도 넓으면 진한 8px 가로 스크롤 막대 + 오른쪽 흐림.
 * 머리글 줄은 세로로 넘겨도 위에 남는다(sticky) — 그래서 칸 테두리는 collapse가 아니라 separate로 그린다.
 */
.msg--table .msg__main {
  max-width: 100%;
}
.msg--table .msg__bubble {
  max-width: min(100%, 960px);
}
.msg-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  /* 말풍선의 pre-wrap을 물려받지 않는다 (칸 안 글은 .msg-table__cell이 정한다) */
  white-space: normal;
}
.msg-table-frame {
  position: relative;
  min-width: 0;
}
/* 오른쪽으로 더 있으면 오른쪽 끝을 흐리게 (스크롤 막대 8px 위까지) */
.msg-table-frame.has-more-right::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 8px;
  width: 40px;
  border-radius: 0 var(--sr-radius-sm) 0 0;
  background: linear-gradient(90deg, transparent, var(--sr-color-surface) 85%);
  content: '';
  pointer-events: none;
}
.msg-table-scroll {
  max-width: 100%;
  max-height: 420px;
  overflow: auto;
  border-radius: var(--sr-radius-sm);
}
/* 진한 8px 스크롤 막대 — 옆에 더 있다는 것을 알 수 있게 (예전에는 연해서 몰랐다) */
.msg-table-scroll::-webkit-scrollbar,
.table-viewer__scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.msg-table-scroll::-webkit-scrollbar-track,
.table-viewer__scroll::-webkit-scrollbar-track {
  border-radius: 4px;
  background: var(--sr-color-surface-2);
}
.msg-table-scroll::-webkit-scrollbar-thumb,
.table-viewer__scroll::-webkit-scrollbar-thumb {
  border: 0;
  border-radius: 4px;
  background: var(--sr-color-text-subtle);
}
.msg-table-scroll::-webkit-scrollbar-corner,
.table-viewer__scroll::-webkit-scrollbar-corner {
  background: transparent;
}
.msg-table {
  border-collapse: separate;
  border-spacing: 0;
  border-top: 1px solid var(--sr-color-border);
  border-left: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
  font-size: var(--sr-text-md);
}
.msg-table th,
.msg-table td {
  padding: 5px 10px;
  border-right: 1px solid var(--sr-color-border);
  border-bottom: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface);
  text-align: left;
  vertical-align: top;
}
.msg-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--sr-color-surface-2);
  font-weight: var(--sr-weight-semibold);
}
/* 칸 글 — 줄바꿈 그대로, 최대 360px · 3줄 (최소 폭은 화면 코드가 칸마다 준다 — table-layout.ts) */
.msg-table__cell {
  display: -webkit-box;
  max-width: 360px;
  overflow: hidden;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
/* 짧은 글만 있는 칸은 줄을 바꾸지 않는다 (칸이 많은 표는 가로 스크롤 — table-layout.ts) */
.msg-table__cell.is-nowrap {
  white-space: pre;
}
/* "크게 보기" 창 — 창 크기, 머리글 줄 · 맨 왼쪽 칸 고정, 칸 글은 줄이지 않는다 */
.sr-dialog:has(> .table-viewer) {
  width: calc(100vw - 48px);
  height: calc(100vh - 48px);
  max-height: none;
}
.table-viewer {
  display: flex;
  flex: 1;
  min-height: 0;
}
.table-viewer__scroll {
  flex: 1;
  min-width: 0;
  overflow: auto;
  border-radius: var(--sr-radius-sm);
}
.msg-table--viewer .msg-table__cell {
  display: block;
  max-width: 480px;
}
.msg-table--viewer tr > :first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 4px 0 5px -3px rgba(0, 0, 0, 0.25);
}
.msg-table--viewer tbody tr > :first-child {
  background: var(--sr-color-surface);
  font-weight: var(--sr-weight-semibold);
}
.msg-table--viewer thead th {
  z-index: 2;
}
.msg-table--viewer thead th:first-child {
  z-index: 3;
}
.msg-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sr-space-2);
}
.msg-table-note {
  color: var(--sr-color-warning);
  font-size: var(--sr-text-xs);
}
.msg-table-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.msg-table-copy:hover {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
/*
 * 메시지 수정 창 — 입력창과 같은 "서식 층 + 투명 글자" 구조와 서식 버튼 (직원 테스트 #14).
 * 글자 위치를 맞추는 규칙은 .composer__mirror / .composer__input 을 그대로 쓴다.
 */
.edit-message__box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 6px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-surface);
}
.edit-message__box:focus-within {
  border-color: var(--sr-color-primary);
  box-shadow: 0 0 0 3px var(--sr-color-focus);
}
.edit-message__editor {
  min-height: 120px;
}
/* .composer__input 규칙(아래쪽)보다 우선하도록 두 class를 함께 쓴다. */
.composer__input.edit-message__input {
  min-height: 120px;
  max-height: 320px;
  overflow-y: auto;
}
.edit-message__toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-top: 4px;
  border-top: 1px solid var(--sr-color-border);
}
.edit-message__toolbar .composer__count {
  margin-left: auto;
}

.jump-to-bottom {
  position: absolute;
  bottom: var(--sr-space-4);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-md);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
  transform: translateX(-50%);
}

/* ── Composer ─────────────────────────────────────────── */
.composer {
  flex: none;
  padding: var(--sr-space-2) var(--sr-space-4) var(--sr-space-3);
  background: var(--sr-color-conversation-bg);
}
.composer--disabled {
  padding: var(--sr-space-4);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  text-align: center;
}
/*
 * 삭제(퇴사)된 구성원과의 대화 — 입력칸 자리가 회색으로 막힌다.
 * 네이버웍스와 같은 모양이라 직원들이 따로 배우지 않아도 뜻이 통한다.
 */
.composer--blocked {
  padding: var(--sr-space-4);
  background: var(--sr-color-surface-hover);
  text-align: center;
}
.composer__blocked-title {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
}
.composer__blocked-hint {
  margin: 4px 0 0;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}

/* 네이버웍스처럼 입력칸 아래에 도구 줄이 들어간 한 덩어리 상자 */
.composer__box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-1);
  padding: 10px 10px 6px;
  /* 테두리 없이 회색 바탕으로 구분한다 (네이버웍스 입력칸). 끌어다 놓을 때만 파란 테두리. */
  border: 1px solid transparent;
  border-radius: var(--sr-radius-xl);
  background: var(--sr-color-field-fill);
}
.composer__box.is-dragover {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-primary-soft);
}
/* 끌어다 놓기 안내 (파일을 끌고 오는 동안에만 보인다) */
.composer__dropzone {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
  pointer-events: none;
}
/* 보낼 파일 목록 */
.composer__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
  margin: 0 0 var(--sr-space-1);
  padding: 0;
  list-style: none;
}
.composer__attachment {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  max-width: 260px;
  padding: 6px 6px 6px 8px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
}
.composer__attachment-thumb {
  width: 34px;
  height: 34px;
  border-radius: var(--sr-radius-sm);
  object-fit: cover;
}
.composer__attachment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
}
.composer__attachment-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.composer__attachment-name {
  overflow: hidden;
  font-size: var(--sr-text-md);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer__attachment-size {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.composer__attachment-remove {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-full);
  background: transparent;
  color: var(--sr-color-text-muted);
}
.composer__attachment-remove:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
/* 첨부 줄의 "표" 칸 (v0.36) — 눌러서 미리보기 */
.composer__attachment-open {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.composer__attachment-open:focus-visible {
  outline: 2px solid var(--sr-color-primary);
  outline-offset: 2px;
  border-radius: var(--sr-radius-sm);
}
.composer__attachment--table .composer__attachment-icon {
  color: var(--sr-color-primary);
}

/* 표 붙여넣기 선택 */
.table-paste {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
}
.table-paste__preview {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
}
.table-paste__more,
.table-paste__hint {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.table-paste__more.is-warning {
  color: var(--sr-color-warning);
}
.composer__box:focus-within {
  background: var(--sr-color-field-fill-focus);
}
/*
 * 입력칸 = [뒤: 서식이 입혀진 글자 층] + [앞: 글자가 투명한 textarea]
 *
 * 두 층의 글자 위치가 1px도 어긋나면 안 되므로 글꼴·크기·자간·줄간격·여백·줄바꿈 규칙을
 * 똑같이 맞춘다. 굵게/기울임/취소선은 **글자 폭이 변하지 않는 방법**으로만 흉내 낸다
 * (아래 .md-draft-* 참고). 자세한 이유는 features/composer/draft-format.ts 주석에 있다.
 */
.composer__editor {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
}
.composer__mirror,
.composer__input {
  padding: 2px 2px 4px;
  border: none;
  font: inherit;
  letter-spacing: inherit;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  tab-size: 4;
  /*
   * 스크롤 막대 자리를 두 층 모두 늘 비워 둔다 (v0.34 #11). 긴 글로 textarea에 막대가 생기면 textarea만
   * 막대 폭(10px)만큼 좁아져 줄 바뀌는 자리가 뒤 층과 달라지고, 커서가 보이는 글자와 어긋난 곳에 그려졌다.
   */
  scrollbar-gutter: stable;
}
.composer__mirror {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--sr-color-text);
  pointer-events: none;
  user-select: none;
}
.composer__mirror-line.is-quote {
  color: var(--sr-color-text-muted);
}
.composer__input {
  flex: 1;
  min-height: 52px;
  max-height: 200px;
  outline: none;
  background: transparent;
  /* 글자는 뒤 층이 보여 준다. 커서와 선택 영역만 이 층에서 보인다. */
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--sr-color-text);
  resize: none;
}
.composer__input::placeholder {
  color: var(--sr-color-text-subtle);
  -webkit-text-fill-color: var(--sr-color-text-subtle);
}
/* 선택 영역이 불투명하면 뒤 층의 글자가 가려진다 → 반투명으로 둔다. */
.composer__input::selection {
  background: var(--sr-color-focus);
}

/*
 * 칸 입력칸 (v0.45 대표 확정 2026-11-09 "안 A" — 붙여넣은 자리에 표 · 사진).
 * 글만 있을 때(.composer__blocks)는 예전 입력칸 그대로 — 글 칸 하나가 높이 · 스크롤을 맡는다.
 * 표 · 사진이 들어오면(.is-multi) 칸들을 담은 상자가 스크롤되고, 글 칸은 글 길이만큼 늘어난다(칸 안 스크롤 없음).
 * 붙여넣은 표 · 사진이 보이도록 글만 있을 때(200px)보다 크게 — 창 높이의 45%까지 저절로 커지고, 그 이상은 상자 안 스크롤
 * (손잡이로 더 키운 높이가 있으면 그 높이).
 */
.composer__blocks {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.composer__blocks.is-multi {
  gap: 2px;
  min-height: var(--composer-input-height, 52px);
  max-height: max(200px, 45vh, var(--composer-input-height, 52px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.composer__blocks--edit.is-multi {
  min-height: 120px;
  max-height: 320px;
}
/* 글 칸: 한 줄부터 글 길이만큼 (예전 최소 · 최대 높이 규칙보다 우선) */
.composer__blocks.is-multi .composer__input {
  min-height: 0;
  max-height: none;
  overflow: hidden;
}
/*
 * 글 칸 상자는 글보다 작게 줄어들지 않는다 — 글이 늘면 다음 표 · 사진이 그만큼 내려가고, 넘치면 바깥 상자가 스크롤된다.
 * (v0.45.1 대표 보고 2026-11-10: 수정 창은 글 칸에 최소 높이 120px 규칙이 있어 세로 flex가 글 칸을 120px까지 줄였고,
 * 넘친 글은 뒤 층이 잘리고 사진이 그 위를 덮었다. 칸이 여럿일 때는 글 칸마다 120px를 두지 않는다 — 상자 최소 높이가 맡는다.)
 */
.composer__blocks.is-multi .composer__editor {
  flex: 1 0 auto;
  min-height: 0;
}
/* 표 · 사진 앞의 빈 글 칸은 커서가 없을 때 얇게 (누르면 한 줄로 펴져 그 자리에 쓸 수 있다) */
.composer__blocks.is-multi .composer__editor.is-gap:not(:focus-within) {
  height: 8px;
  overflow: hidden;
}
.composer__blocks.is-multi .composer__editor.is-gap:not(:focus-within) .composer__input {
  height: 8px !important;
  padding-top: 0;
  padding-bottom: 0;
}

/* 표 · 사진 칸 (시안: 흰 바탕 표 · 둥근 사진, 누르면 파란 테두리 + ⋯ · ✕) */
.composer-block {
  position: relative;
  align-self: flex-start;
  max-width: 100%;
  margin: 4px 2px;
  border-radius: 6px;
  outline: 2px solid transparent;
  outline-offset: 2px;
  cursor: default;
}
.composer-block:focus-visible,
.composer-block.is-selected {
  outline-color: #2f8af5;
}
.composer-block__tools {
  position: absolute;
  top: -12px;
  right: -10px;
  z-index: 1;
  display: none;
  gap: 4px;
}
.composer-block:hover .composer-block__tools,
.composer-block.is-selected .composer-block__tools,
.composer-block:focus-within .composer-block__tools {
  display: flex;
}
.composer-block__tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--sr-color-border-strong, #cfd5dc);
  border-radius: 12px;
  background: var(--sr-color-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  color: var(--sr-color-text);
  cursor: pointer;
}
.composer-block__tool:hover {
  background: var(--sr-color-surface-hover);
}
.composer-block__table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 6px;
  background: var(--sr-color-surface);
}
.composer-block__table {
  border-collapse: collapse;
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
  font-size: var(--sr-text-md);
}
.composer-block__table th,
.composer-block__table td {
  max-width: 280px;
  overflow: hidden;
  padding: 4px 10px;
  border: 1px solid var(--sr-color-border);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer-block__table th {
  background: var(--sr-color-surface-2);
  font-weight: var(--sr-weight-semibold);
}
.composer-block__more {
  margin: 4px 2px 0;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.composer-block__more.is-warning {
  color: var(--sr-color-warning);
}
.composer-block__image {
  position: relative;
  display: block;
}
.composer-block__image img {
  display: block;
  max-width: min(320px, 100%);
  max-height: 180px;
  border: 1px solid var(--sr-color-border);
  border-radius: 8px;
  object-fit: contain;
  background: var(--sr-color-surface);
}
.composer-block__image-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 80px;
  border-radius: 8px;
  background: var(--sr-color-surface);
}
.composer-block__badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--sr-radius-full);
  background: rgba(16, 24, 40, 0.72);
  color: #fff;
  font-size: var(--sr-text-xs);
}
.composer-block__badge.is-error {
  background: var(--sr-color-danger);
}
.composer-block__image[data-status='uploading'] img {
  opacity: 0.6;
}

/* 서식 표시 문자(**, ~~, `, >, -)는 흐리게 — 지우지 않는다(글자 수가 달라지면 커서가 밀린다). */
.md-draft-mark {
  color: var(--sr-color-text-subtle);
}
/* 굵게: 외곽선으로 흉내 낸다. font-weight를 바꾸면 글자 폭이 달라져 커서가 어긋난다. */
.md-draft-b {
  -webkit-text-stroke: 0.4px currentcolor;
}
/* 기울임: 기울이기만 한다(폭 그대로). 줄바꿈을 원문과 맞추려고 조각을 잘게 나눈다. */
.md-draft-i {
  display: inline-block;
  transform: skewX(-11deg);
}
/* 취소선·배경은 글자 폭에 영향을 주지 않는다. */
.md-draft-s {
  text-decoration: line-through;
}
.md-draft-c {
  border-radius: 3px;
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-primary-text);
}
.composer__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
  /* 아래 @container — 입력창 폭으로 도구 줄을 판단한다 (따로 띄운 좁은 대화방 창 포함) */
  container-type: inline-size;
}
.composer__tools {
  display: flex;
  align-items: center;
  gap: 2px;
  /* 보통 폭에서는 줄을 넘기지 않는다 — "보내기"는 늘 같은 줄 오른쪽 끝에 (v0.43 시안 6번) */
  min-width: 0;
  overflow: hidden;
}
/*
 * 좁은 입력창(따로 띄운 대화방 창 — 최소 360px)에서는 도구가 잘려 보이지 않게(예약 전송 · 반복 메시지)
 * 두 줄로 넘긴다. "보내기"는 오른쪽 아래 그대로 (v0.43 검토).
 */
@container (max-width: 560px) {
  .composer__tools {
    flex-wrap: wrap;
    overflow: visible;
  }
}
.composer__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--sr-space-2);
}
.composer__count {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.composer__count.is-error {
  color: var(--sr-color-danger);
  font-weight: var(--sr-weight-semibold);
}

/* ── Org ──────────────────────────────────────────────── */
.org-tree {
  padding-bottom: var(--sr-space-2);
  border-bottom: 1px solid var(--sr-color-border);
  margin-bottom: var(--sr-space-2);
}
.org-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.org-tree__label--company {
  font-weight: var(--sr-weight-semibold);
}
.org-tree__company-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sr-space-2);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.org-tree__row {
  display: flex;
  align-items: center;
  border-radius: var(--sr-radius-md);
}
.org-tree__row:hover {
  background: var(--sr-color-surface-hover);
}
.org-tree__row.is-active {
  background: var(--sr-color-surface-active);
}
.org-tree__toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--sr-color-text-subtle);
}
.org-tree__label {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 var(--sr-space-2) 0 2px;
  border: none;
  background: transparent;
  font-size: var(--sr-text-md);
  text-align: left;
}
.org-tree__count {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
/* 명단 머리줄 — 지금 보고 있는 부서와 인원 수 */
.org-users__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
  padding: var(--sr-space-2) var(--sr-space-3) var(--sr-space-1);
}
.org-users__scope {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
}
.org-users__reset {
  padding: 2px 8px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-full);
  background: transparent;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.org-users__reset:hover {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
.user-row {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
  width: 100%;
  padding: 8px var(--sr-space-2);
  border: none;
  border-radius: var(--sr-radius-lg);
  background: transparent;
  text-align: left;
}
.user-row:hover {
  background: var(--sr-color-surface-hover);
}
.user-row.is-active {
  background: var(--sr-color-surface-active);
}
.user-row__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-row__name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: var(--sr-weight-semibold);
}
.user-row__position {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-regular);
}
.user-row__me {
  padding: 0 5px;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-xs);
}
.user-row__sub {
  overflow: hidden;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sr-space-6);
  height: 100%;
  padding: var(--sr-space-10) var(--sr-space-6);
  overflow-y: auto;
}
.profile__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sr-space-2);
  width: min(420px, 100%);
  padding: var(--sr-space-8) var(--sr-space-6);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-xl);
  background: var(--sr-color-surface);
  text-align: center;
}
.profile__name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: var(--sr-space-2) 0 0;
  font-size: var(--sr-text-2xl);
}
.profile__position {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-base);
  font-weight: var(--sr-weight-regular);
}
.profile__dept,
.profile__status,
.profile__lastseen {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.profile__lastseen {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.profile__card .sr-btn {
  margin-top: var(--sr-space-3);
  min-width: 180px;
}
.profile__details {
  width: min(420px, 100%);
  margin: 0;
  padding: var(--sr-space-2) var(--sr-space-5);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-xl);
  background: var(--sr-color-surface);
}
.profile__details > div {
  display: flex;
  justify-content: space-between;
  gap: var(--sr-space-4);
  padding: var(--sr-space-3) 0;
  border-bottom: 1px solid var(--sr-color-border);
}
.profile__details > div:last-child {
  border-bottom: none;
}
.profile__details dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--sr-color-text-muted);
}
.profile__details dd {
  margin: 0;
  user-select: text;
}

/* ── Settings ─────────────────────────────────────────── */
.settings {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--sr-space-6) var(--sr-space-8) 0;
  overflow: hidden;
}
.settings__title {
  flex: none;
  margin: 0 0 var(--sr-space-5);
  font-size: var(--sr-text-2xl);
}
/*
 * 왼쪽 목차 + 오른쪽 내용 (v0.43 시안 12번). 내용만 스크롤한다 — 목차는 늘 보인다.
 * 1024px 창(메뉴 60px)에서도 내용 칸이 700px 넘게 남는다.
 */
.settings__layout {
  display: flex;
  flex: 1;
  gap: var(--sr-space-6);
  min-height: 0;
}
.settings__nav {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 2px;
  width: 168px;
  padding-bottom: var(--sr-space-6);
  overflow-y: auto;
}
.settings__nav-item {
  padding: 9px 12px;
  border: none;
  border-radius: var(--sr-radius-md);
  background: transparent;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-base);
  text-align: left;
  cursor: pointer;
}
.settings__nav-item:hover {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
.settings__nav-item.is-active {
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-weight: var(--sr-weight-semibold);
}
.settings__content {
  /* 목차가 각 부분의 자리(offsetTop)를 이 칸 기준으로 잰다 */
  position: relative;
  flex: 1;
  min-width: 0;
  padding-bottom: var(--sr-space-10);
  overflow-y: auto;
}
/* 마지막 부분(앱 정보)도 목차를 누르면 맨 위로 올라올 수 있게 */
.settings__group:last-child {
  min-height: 100%;
}
.settings__section {
  max-width: 880px;
  margin-bottom: var(--sr-space-5);
  padding: var(--sr-space-5);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-xl);
  background: var(--sr-color-surface);
}
.settings__section-title {
  margin: 0 0 var(--sr-space-4);
  font-size: var(--sr-text-lg);
}
/* 목차로 옮겨 온 제목 — 마우스로 누른 때는 테두리를 그리지 않고, 키보드일 때만 */
.settings__section-title:focus:not(:focus-visible) {
  outline: none;
}
.settings__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-6);
  padding: var(--sr-space-3) 0;
  border-bottom: 1px solid var(--sr-color-border);
}
.settings__note {
  margin: var(--sr-space-2) 0 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  line-height: 1.5;
}
.settings__row:last-child {
  border-bottom: none;
}
.settings__label {
  font-weight: var(--sr-weight-semibold);
}
.settings__desc {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.settings__info {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: var(--sr-space-2) var(--sr-space-4);
  margin: 0 0 var(--sr-space-3);
}
.settings__info dt {
  color: var(--sr-color-text-muted);
}
.settings__info dd {
  margin: 0;
  user-select: text;
}
.settings__link {
  color: var(--sr-color-primary-text);
  text-decoration: underline;
}
.settings__narrow {
  max-width: 380px;
}
.settings__footer {
  max-width: 880px;
}
.session-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.session-list__item {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
  padding: var(--sr-space-3) 0;
  border-bottom: 1px solid var(--sr-color-border);
}
.session-list__item:last-child {
  border-bottom: none;
}
.session-list__icon {
  color: var(--sr-color-text-muted);
}
.session-list__body {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.session-list__name {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  font-weight: var(--sr-weight-semibold);
}
.session-list__current {
  padding: 1px 6px;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-xs);
}

/* ── Toast ────────────────────────────────────────────── */
/*
 * 위쪽 가운데, 머리글(56px) 바로 아래 (v0.43 시안 20번 — 예전 오른쪽 아래 자리는 "보내기" 단추를 가렸다).
 * 기본은 창 전체 기준(fixed), 메인 화면에서는 오른쪽 본문(.app-shell__main) 기준(--shell).
 * 안내 사이의 빈 곳은 눌림을 막지 않는다(pointer-events) — 아래 대화 · 머리글 단추를 그대로 누를 수 있다.
 */
.toast-host {
  position: fixed;
  top: calc(var(--sr-header-height) + var(--sr-space-2));
  left: 50%;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sr-space-2);
  width: max-content;
  max-width: calc(100% - 2 * var(--sr-space-4));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast-host--shell {
  position: absolute;
}
.toast-host .toast {
  pointer-events: auto;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
  max-width: 420px;
  padding: 10px 12px 10px 14px;
  border-radius: var(--sr-radius-lg);
  background: #1f2937;
  color: #fff;
  box-shadow: var(--sr-shadow-lg);
  font-size: var(--sr-text-md);
}
.toast--error {
  background: var(--sr-color-danger);
}
.toast button {
  display: inline-flex;
  padding: 2px;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.8;
}

/* ── 그룹 대화 ─────────────────────────────────────────── */
.room-item__count {
  color: var(--sr-color-text-subtle);
  font-weight: var(--sr-weight-regular);
  font-size: var(--sr-text-sm);
}

/* 대화방 구성 변경 안내 (초대/나가기/이름 변경) */
.system-notice {
  display: flex;
  justify-content: center;
  padding: var(--sr-space-2) var(--sr-space-6);
}
.system-notice > span {
  max-width: 70%;
  padding: 4px var(--sr-space-3);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-2);
  border: 1px solid var(--sr-color-border);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  text-align: center;
}

/* ── 대화 상대 선택 (조직도: 왼쪽 부서 트리 + 오른쪽 멤버 목록) ── */
.org-picker {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sr-space-3);
  min-height: 0;
}
.org-picker__search {
  flex: none;
}
.org-picker__panes {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  flex: 1;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
}
.org-picker__tree {
  /* grid 칸 안에서 스스로 줄어들 수 있어야 스크롤이 생긴다 (min-height 없으면 내용만큼 늘어난다) */
  min-height: 0;
  overflow-y: auto;
  padding: var(--sr-space-2) var(--sr-space-1);
  border-right: 1px solid var(--sr-color-border);
  border-bottom: none;
  margin-bottom: 0;
  background: var(--sr-color-surface-2);
  /* 스크롤 막대 자리를 미리 비워 두어, 스크롤이 생겨도 칸 너비가 흔들리지 않는다 */
  scrollbar-gutter: stable;
}
.org-picker__members {
  display: flex;
  flex-direction: column;
  min-width: 0;
  /*
   * grid 칸의 기본 최소 높이는 "내용 전체"다. 이 값을 0으로 풀어 주지 않으면
   * 목록이 칸 밖으로 넘쳐 잘리기만 하고 아래 .org-picker__list 에 스크롤이 생기지 않는다.
   * (구성원이 많을 때 아래로 내려가지 않던 문제)
   */
  min-height: 0;
}
.org-picker__scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-3);
  padding: var(--sr-space-2) var(--sr-space-3);
  border-bottom: 1px solid var(--sr-color-border);
  font-weight: var(--sr-weight-semibold);
}
.org-picker__columns,
.org-picker__row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--sr-space-2);
  padding: 0 var(--sr-space-3);
}
.org-picker__columns {
  padding-top: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.org-picker__columns > span:first-child {
  padding-left: 68px;
}
.org-picker__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.org-picker__row {
  grid-template-columns: 22px 30px minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 0.9fr);
  padding-top: 6px;
  padding-bottom: 6px;
  cursor: pointer;
}
.org-picker__row:hover {
  background: var(--sr-color-surface-hover);
}
.org-picker__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: var(--sr-text-base);
}
.org-picker__rank,
.org-picker__cell {
  overflow: hidden;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.org-picker__empty {
  padding: var(--sr-space-8);
  margin: 0;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-md);
  text-align: center;
}
.org-picker__selected {
  display: flex;
  align-items: flex-start;
  gap: var(--sr-space-3);
  flex: none;
  max-height: 84px;
  overflow-y: auto;
}
.org-picker__selected-count {
  flex: none;
  padding-top: 3px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
}
.org-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-1);
}
.org-picker__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 10px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-sm);
}
.org-picker__chip button {
  display: inline-flex;
  padding: 2px;
  border: none;
  border-radius: var(--sr-radius-full);
  background: transparent;
  color: inherit;
}
.org-picker__chip button:hover {
  background: var(--sr-color-surface);
}
.new-chat__name {
  flex: none;
}

/* 참여자 관리 */
/* 대화방 이름 — 이름표 · 칸 · 변경 단추를 한 줄에 작게 (v0.35 대표 요청) */
.room-members__rename {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
}
.room-members__rename-label {
  flex: none;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
}
.room-members__rename .room-members__rename-field {
  flex: 0 1 240px;
  min-width: 0;
}
/* 참여자 검색 — 목록 바로 위 */
.room-members__search {
  margin-bottom: var(--sr-space-2);
}
/* 찾은 사람 수가 들어갈 자리만큼 글자를 비켜 둔다 (지우기 x 왼쪽) */
.room-members__search .sr-input {
  padding-right: 96px;
}
.room-members__search-count {
  position: absolute;
  right: 32px;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
  white-space: nowrap;
  pointer-events: none;
}
.room-members__empty {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: var(--sr-space-6) var(--sr-space-4);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  text-align: center;
}
.room-members__empty span {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.room-members__actions {
  display: flex;
  gap: var(--sr-space-2);
  margin: var(--sr-space-3) 0;
}
.room-members__list {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-1);
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.room-members__row {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  padding: var(--sr-space-2);
  border-radius: var(--sr-radius-md);
}
.room-members__row:hover {
  background: var(--sr-color-surface-hover);
}
.room-members__name {
  flex: 1;
  font-size: var(--sr-text-base);
}
.room-members__me {
  color: var(--sr-color-text-subtle);
}
.room-members__role {
  margin-left: var(--sr-space-2);
  padding: 1px var(--sr-space-2);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-medium);
}

/* ── 관리자 화면 ───────────────────────────────────────── */
.admin {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.admin__header {
  flex: none;
  border-bottom: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface);
}
/* 넓은 모니터에서 내용이 좌우로 퍼지지 않도록 한 줄 폭을 제한한다. */
.admin__header-inner {
  width: 100%;
  /*
   * 안쪽 글자 폭 = 아래 내용(.admin__section)의 폭 — 좌우 여백을 더해 둬야 제목 "관리자"와 표의 왼쪽 끝이
   * 같은 줄에 선다 (v0.43 — 예전에는 제목만 24px 오른쪽에 있었다).
   */
  max-width: calc(var(--sr-admin-max-width) + 2 * var(--sr-space-6));
  margin: 0 auto;
  padding: var(--sr-space-4) var(--sr-space-6) 0;
}
.admin__title {
  margin: 0 0 var(--sr-space-2);
  font-size: var(--sr-text-xl);
  font-weight: var(--sr-weight-bold);
}
.admin__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--sr-space-5) var(--sr-space-6) var(--sr-space-8);
}
.admin__section {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-4);
  width: 100%;
  max-width: var(--sr-admin-max-width);
  margin: 0 auto;
}
.admin__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-3);
}
.admin__hint {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
/* 구성원 검색 (v27) — "구성원 추가" 단추 바로 왼쪽 */
.admin__hint-result {
  color: var(--sr-color-text);
  font-weight: 600;
}
.admin__toolbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
}
.admin__user-search {
  width: 280px;
}
.admin__table td.admin__empty {
  padding: var(--sr-space-6) var(--sr-space-4);
  color: var(--sr-color-text-muted);
  text-align: center;
}
.admin__link {
  border: none;
  background: transparent;
  color: var(--sr-color-primary-text);
  text-decoration: underline;
}
.admin__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--sr-color-surface);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  font-size: var(--sr-text-md);
  overflow: hidden;
}
.admin__table th,
.admin__table td {
  padding: 10px var(--sr-space-3);
  text-align: left;
  border-bottom: 1px solid var(--sr-color-border);
  vertical-align: middle;
}
/* 이름·권한·상태는 내용만큼만, 부서/로그인 ID가 남는 폭을 가져간다. */
.admin__table col.admin__col--name {
  width: 15%;
}
.admin__table col.admin__col--id {
  width: 22%;
}
.admin__table col.admin__col--dept {
  width: 21%;
}
.admin__table col.admin__col--role {
  width: 10%;
}
/* 퇴사자는 상태 칸 아래 개인정보 삭제 안내가 붙는다 (v0.39) — 부서 칸에서 조금 넓혔다 (v0.43 두 줄에 들어가게 더). */
.admin__table col.admin__col--status {
  width: 17%;
}
.admin__table td.admin__cell--wrap {
  overflow-wrap: anywhere;
}
/* 로그인 ID — 낱말 중간에서 줄을 바꾸지 않고 한 줄 말줄임 (전체는 title) */
.admin__table td.admin__cell--ellipsis {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin__table th {
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
  font-weight: var(--sr-weight-semibold);
  white-space: nowrap;
}
.admin__table tr:last-child td {
  border-bottom: none;
}
.admin__muted {
  color: var(--sr-color-text-muted);
}
.admin__me {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-xs);
}
.admin__badge {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 8px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  white-space: nowrap;
}
.admin__badge--ok {
  background: rgba(6, 118, 71, 0.12);
  color: var(--sr-color-success);
}
.admin__badge--warn {
  background: var(--sr-color-warning-soft);
  color: var(--sr-color-warning);
}
/*
 * 퇴사자 개인정보 자동 삭제 안내 (v0.39) — 상태 칸 아래 작은 글. 칸이 좁아 줄을 바꿔 보여 주되
 * (낱말 · 날짜 안에서는 끊지 않음) **두 줄까지만** — 퇴사자 줄만 두 배로 높아지지 않게 (v0.43). 전체는 title.
 */
.admin__privacy-note {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  line-height: 1.4;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.admin__privacy-date {
  white-space: nowrap;
}
.admin__privacy-note--done {
  color: var(--sr-color-text-subtle);
}
.admin__actions {
  display: flex;
  gap: var(--sr-space-1);
  justify-content: flex-end;
  white-space: nowrap;
}
/*
 * 표 칸(td)에 붙이면 칸 자체를 flex로 바꾸지 않는다.
 * flex가 되면 표의 칸이 아니게 되어, 버튼 수가 줄마다 다를 때(빈 칸 · OTP 초기화 등) 표 밖으로 밀려난다.
 */
td.admin__actions {
  display: table-cell;
  text-align: right;
}
td.admin__actions > * + * {
  margin-left: var(--sr-space-1);
}
/* 구성원 줄 "⋯" 메뉴 (v0.43 시안 9번) — "수정" 옆 같은 높이의 테두리 단추 */
.admin__more {
  border: 1px solid var(--sr-color-border-strong);
  vertical-align: middle;
}
.admin__menu-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* 아직 누를 수 없는 메뉴 항목의 이유 (예: 영구 삭제 — 퇴사 1주일 뒤부터) */
.admin__menu-hint {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.admin__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sr-space-4);
}
.admin__card {
  padding: var(--sr-space-4);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-surface);
}
.admin__card-title {
  margin: 0 0 var(--sr-space-3);
  font-size: var(--sr-text-base);
  font-weight: var(--sr-weight-bold);
}
.admin__stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-3);
  padding: 5px 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.admin__stat strong {
  color: var(--sr-color-text);
}
.admin__meter {
  height: 6px;
  margin: var(--sr-space-2) 0;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-hover);
  overflow: hidden;
}
.admin__meter span {
  display: block;
  height: 100%;
  background: var(--sr-color-primary);
}
/* 서버 디스크 80% 이상 주의 · 90% 이상 위험 (v0.43 — features/admin/disk-usage.ts) */
.admin__meter--warning span {
  background: var(--sr-color-warning);
}
.admin__meter--danger span {
  background: var(--sr-color-danger);
}

/* 발급된 임시 비밀번호 안내 */
.admin__issued {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2) var(--sr-space-3);
}
.admin__issued-name {
  font-weight: var(--sr-weight-semibold);
}
.admin__issued-code {
  padding: 4px 10px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface);
  font-family: var(--sr-font-mono, monospace);
  font-size: var(--sr-text-base);
  letter-spacing: 0.04em;
  user-select: all;
}
.admin__issued-note {
  flex-basis: 100%;
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.admin__issued-actions {
  display: flex;
  gap: var(--sr-space-2);
  margin-left: auto;
}

/* 조직 관리 */
.admin__org {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: var(--sr-space-4);
  align-items: start;
}
.admin__org-tree {
  padding: var(--sr-space-2);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-surface);
}
.admin__org-node {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  width: 100%;
  padding: 6px var(--sr-space-2);
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: inherit;
  font-size: var(--sr-text-md);
  text-align: left;
  cursor: pointer;
}
.admin__org-node:hover {
  background: var(--sr-color-surface-hover);
}
.admin__org-node.is-selected {
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-weight: var(--sr-weight-medium);
}
.admin__org-node--company {
  font-weight: var(--sr-weight-semibold);
}
.admin__org-count {
  margin-left: auto;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.admin__org-detail {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
  padding: var(--sr-space-4);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-surface);
}
.admin__org-detail-title {
  margin: 0;
  font-size: var(--sr-text-base);
  font-weight: var(--sr-weight-bold);
}
.admin__org-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
}

/* 구성원 추가/수정 폼 */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
}
.admin-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sr-space-3);
}
/* grid 자식은 기본 min-width가 auto라서 입력칸이 칸 밖으로 밀려 잘린다. */
.admin-form__row > * {
  min-width: 0;
}
.admin-form__fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  margin: 0;
  padding: var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
}
.admin-form__legend {
  padding: 0 var(--sr-space-1);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
}
.admin-form__choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-4);
}
.admin-form__login-id {
  display: flex;
  align-items: flex-end;
  gap: var(--sr-space-2);
}
.admin-form__login-id .sr-field {
  flex: 1;
}
.admin-form__domain {
  padding-bottom: 10px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  white-space: nowrap;
}

/* ── 통합 검색 ─────────────────────────────────────────── */
.search-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.search-panel__header {
  flex: none;
  border-bottom: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface);
}
.search-panel__header-inner {
  width: 100%;
  max-width: var(--sr-admin-max-width);
  margin: 0 auto;
  padding: var(--sr-space-4) var(--sr-space-6) 0;
}
.search-panel__title {
  margin: 0 0 var(--sr-space-2);
  font-size: var(--sr-text-xl);
  font-weight: var(--sr-weight-bold);
}
.search-panel__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sr-space-3);
  min-height: 0;
  width: 100%;
  max-width: var(--sr-admin-max-width);
  margin: 0 auto;
  padding: var(--sr-space-5) var(--sr-space-6) var(--sr-space-8);
  overflow-y: auto;
}
.search-panel__form {
  display: flex;
  gap: var(--sr-space-2);
}
.search-panel__input {
  flex: 1;
}
.search-panel__hint {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.search-panel__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-3);
  align-items: flex-end;
}
.search-panel__filter {
  min-width: 150px;
  max-width: 260px;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
}
.search-results__count {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.search-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 10px var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  text-align: left;
}
.search-result:hover {
  background: var(--sr-color-surface-hover);
}
/* 누를 곳이 없는 결과 (업무 검색) — 마우스를 올려도 강조하지 않는다. */
.search-result--static:hover {
  background: var(--sr-color-surface);
}
.search-result--static .search-result__text {
  white-space: normal;
}
.search-result__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.search-result__room {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  font-weight: var(--sr-weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result__body {
  display: flex;
  align-items: baseline;
  gap: var(--sr-space-2);
  min-width: 0;
  font-size: var(--sr-text-md);
}
.search-result__sender {
  flex: none;
  font-weight: var(--sr-weight-semibold);
}
.search-result__kind {
  flex: none;
  padding: 1px 6px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.search-result__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/*
 * 글자만 보이던 곳의 메시지 미리보기 (v0.43 시안 8번 — lib/MessagePreview.tsx):
 * 서식 표시 없이 굵게 · 취소선은 그대로, 표는 [표] 칩 + 첫 줄 칸 + 흐린 "4줄 × 9칸".
 */
.preview-chip {
  display: inline-block;
  margin-right: 4px;
  padding: 0 7px;
  border: 1px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-full);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-regular);
  line-height: 1.5;
  vertical-align: 1px;
}
.preview-size {
  color: var(--sr-color-text-subtle);
}
/* 검색어가 맞은 표 본문 줄 — 요약 아래 한 줄 (넘치면 말줄임) */
.preview-table__match {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-code {
  padding: 0 4px;
  border-radius: var(--sr-radius-sm);
  /* 밝은 · 어두운 화면 모두 보이는 토큰 (v0.43 검토) */
  background: var(--sr-color-surface-hover);
  font-family: var(--sr-font-mono, ui-monospace, Consolas, monospace);
  font-size: 0.92em;
}
/* 대화방 ⋯ 메뉴의 알림 선택지 — 고른 것은 ✓ + 파란 글자 (v0.43 시안 10번, 예전에는 흐린 "못 누름" 모양) */
.menu-choice.is-selected {
  color: var(--sr-color-primary);
  font-weight: var(--sr-weight-bold);
}
.menu-choice__check {
  flex: none;
  color: var(--sr-color-primary);
}
.menu-choice__spacer {
  display: inline-block;
  flex: none;
  width: 14px;
}
.search-hit {
  padding: 0 1px;
  border-radius: 2px;
  background: var(--sr-color-warning-soft);
  color: inherit;
  font-weight: var(--sr-weight-semibold);
}
.search-files__col--meta {
  width: 16%;
}
.search-files__col--size {
  width: 10%;
}
.search-files__name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--sr-color-primary-text);
  text-align: left;
}
.search-files__name:disabled {
  color: var(--sr-color-text);
  cursor: default;
}
.search-files__name:hover:not(:disabled) {
  text-decoration: underline;
}
.search-files__ext {
  flex: none;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
  text-transform: uppercase;
}
/* 파일 찾기 표의 종류 이름 ("엑셀" — v0.42, 색은 file-type.css) */
.search-files__kind {
  flex: none;
  margin-left: 6px;
  font-size: var(--sr-text-xs);
}
.admin__files-toggle {
  align-self: flex-end;
  padding-bottom: 8px;
}

/* 원본 위치(앞뒤 대화) 보기 */
.context-view {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sr-space-1);
  min-height: 0;
  overflow-y: auto;
  padding: var(--sr-space-2);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
}
.context-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px var(--sr-space-2);
  border-radius: var(--sr-radius-sm);
}
.context-row.is-mine {
  background: var(--sr-color-bubble-mine);
}
.context-row.is-target {
  outline: 2px solid var(--sr-color-primary);
  background: var(--sr-color-surface);
}
.context-row__meta {
  display: flex;
  align-items: baseline;
  gap: var(--sr-space-2);
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.context-row__meta strong {
  color: var(--sr-color-text);
  font-size: var(--sr-text-md);
}
.context-row__text {
  font-size: var(--sr-text-md);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.context-row__edited {
  margin-left: 6px;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}

/* ── 답장 · 반응 · 멘션 · 고정 ─────────────────────────── */
.msg__stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.msg--mine .msg__stack {
  align-items: flex-end;
}
/*
 * 답장 원문 인용 — 말풍선 **안 위쪽** (네이버웍스와 같은 모양).
 * [사진] 이름 / 원문 첫 줄  ──(가는 줄)──  답장 내용
 *
 * 말풍선 폭 = max(답장 글 폭, 인용(사진 · 이름 · 원문 첫 줄) 폭), 최대 폭(.msg__main)에서 멈춘다
 * (v0.34 #17 — 대표 요청, 네이버웍스와 같다). 예전에는 인용을 폭 계산에서 뺐는데(contain: inline-size)
 * 바닥 폭(min-width: min(260px, 100%))의 100%가 **본문 폭으로 줄어든 칸**을 기준으로 잡혀 아무 일도
 * 하지 않았다 → "cs맞네" 같은 짧은 답장에서 인용이 "승목" · 글자 하나로 찌그러졌다.
 * 이제 인용도 폭 계산에 들어가고, 최대 폭을 넘는 원문은 한 줄 말줄임(…)으로 자른다
 * (.msg__line · .msg__stack · .msg__bubble · .msg-reply__who 모두 min-width: 0 — 칸 밖으로 밀려나지 않는다,
 * 직원 테스트 #10·#11). 원문은 서버가 첫 줄만 보내므로 여러 줄 원문이 최대 폭까지 늘어나지 않는다.
 */
.msg__bubble.has-reply {
  display: flex;
  flex-direction: column;
}
.msg-reply {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 8px;
  margin: -2px -12px 8px;
  padding: 2px 12px 9px;
  border: none;
  border-bottom: 1px solid rgb(0 0 0 / 8%);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  /* 말풍선 줄바꿈 규칙(pre-wrap)을 이어받지 않는다 — 인용은 늘 한 줄 */
  white-space: nowrap;
}
button.msg-reply {
  cursor: pointer;
}
button.msg-reply:hover .msg-reply__text {
  text-decoration: underline;
}
.msg-reply__avatar-empty {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgb(0 0 0 / 8%);
}
.msg-reply__who {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.msg-reply__sender {
  overflow: hidden;
  color: var(--sr-color-text);
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.msg-reply__text {
  overflow: hidden;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-reply__text.is-deleted {
  font-style: italic;
}
/* 이모지 반응 */
.msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.msg-reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface);
  font-size: var(--sr-text-sm);
  line-height: 1.4;
}
.msg-reaction:hover {
  background: var(--sr-color-surface-hover);
}
.msg-reaction.is-mine {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
}
.msg-reaction__count {
  font-weight: var(--sr-weight-semibold);
}
/*
 * 고정 메시지 막대 — 첫 줄 + "외 N줄 · 펼치기 ▾", 펼치면 원래 줄바꿈대로 (v0.43 시안 7번).
 * 예전에는 한 줄(nowrap)로 그려 여러 줄 공지가 " - "로 이어 붙여졌다.
 */
.pinned-bar {
  flex: none;
  border-bottom: 1px solid var(--sr-color-border);
  background: var(--sr-color-warning-soft);
  color: var(--sr-color-text);
  font-size: var(--sr-text-md);
}
.pinned-bar__row {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  padding: 7px var(--sr-space-4);
}
.pinned-bar__icon {
  flex: none;
}
.pinned-bar__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pinned-bar__first {
  font-weight: var(--sr-weight-semibold);
}
.pinned-bar.is-expanded .pinned-bar__text {
  white-space: normal;
}
.pinned-bar__more {
  color: var(--sr-color-text-muted);
}
.pinned-bar__toggle {
  flex: none;
  padding: 2px 6px;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  white-space: nowrap;
  cursor: pointer;
}
.pinned-bar__toggle:hover {
  /* 밝은 · 어두운 화면 모두 보이는 토큰 (v0.43 검토 — 검은 6%는 어두운 화면에서 안 보였다) */
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
/* 펼친 나머지 줄 — 아이콘 다음 글자 줄에 맞추고, 아주 긴 공지는 이 칸 안에서 스크롤한다 (대화를 다 가리지 않게) */
.pinned-bar__body {
  max-height: 40vh;
  padding: 6px var(--sr-space-4) var(--sr-space-2) 38px;
  overflow-y: auto;
  border-top: 1px solid var(--sr-color-border);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.pinned-bar__body .md-list {
  margin: 0;
}
.pinned-bar__close {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: var(--sr-color-text-muted);
}
.pinned-bar__close:hover {
  background: var(--sr-color-surface-hover);
}
/* 답장 작성 바 */
.composer__reply {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  margin-bottom: var(--sr-space-1);
  padding: 6px 8px;
  border-left: 3px solid var(--sr-color-primary);
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-2);
  font-size: var(--sr-text-md);
}
.composer__reply-body {
  display: flex;
  flex: 1;
  gap: var(--sr-space-2);
  min-width: 0;
}
.composer__reply-text {
  overflow: hidden;
  color: var(--sr-color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* @ 자동완성 */
.composer__mentions {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 5;
  width: min(340px, 100%);
  /* v0.34 #18: 방 사람이 모두 들어가므로(큰 방 38명) 목록 안에서 스크롤한다. 창이 낮으면 대화 화면 반까지만. */
  max-height: min(300px, 50vh);
  margin: 0;
  padding: var(--sr-space-1);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-lg);
  list-style: none;
  overflow-y: auto;
}
/* 묶음 제목 ("대화 상대" · "부서") */
.composer__mention-section {
  padding: 6px 10px 2px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}
.composer__mention-section:not(:first-child) {
  margin-top: 4px;
  border-top: 1px solid var(--sr-color-border);
}
.composer__mention {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  width: 100%;
  min-width: 0;
  padding: 5px 10px;
  border: none;
  border-radius: var(--sr-radius-md);
  background: transparent;
  text-align: left;
}
.composer__mention.is-active,
.composer__mention:hover {
  background: var(--sr-color-surface-hover);
}
/* @전체 · 부서 동그라미 (사람은 프로필 사진) */
.composer__mention-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  /* 동그라미 안 "전체 · 부서" 꾸밈 글자 (읽는 이름은 옆에 있다) — 숫자 동그라미와 같은 가장 작은 크기 */
  font-size: var(--sr-text-badge);
  font-weight: var(--sr-weight-semibold);
}
.composer__mention-name {
  flex: 0 1 auto;
  max-width: 70%;
  overflow: hidden;
  font-weight: var(--sr-weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer__mention-desc {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 본문 안의 @멘션 */
.msg-mention {
  padding: 0 2px;
  border-radius: 3px;
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-weight: var(--sr-weight-semibold);
}
/* 방 목록의 "나를 언급함" 표시 */
.room-item__mention {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-unread);
  color: #fff;
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-bold);
}

/* ── 전달(Forward) · 메시지 선택 ─────────────────────────── */

/* 전달받은 메시지 표시 (말풍선 위) */
.msg-forwarded {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}

/* 메시지 선택 모드 */
.msg--selecting {
  cursor: pointer;
  border-radius: var(--sr-radius-md);
}
.msg--selecting:hover {
  background: var(--sr-color-surface-hover);
}
.msg--selecting.is-selected {
  background: var(--sr-color-primary-soft);
}
.msg__select {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  /* 손이 빗나가지 않도록 네모 주변까지 누를 수 있게 넉넉히 잡는다 */
  min-width: 36px;
  padding-right: var(--sr-space-2);
  cursor: pointer;
}
.msg__select .sr-checkbox {
  padding: 6px;
}
.msg__select .sr-checkbox input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* 선택 모드에서 입력창 자리에 뜨는 줄 */
.selection-bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-3);
  padding: var(--sr-space-3) var(--sr-space-4);
  border-top: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface);
}
.selection-bar__count {
  flex: none;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.selection-bar__actions {
  display: flex;
  gap: var(--sr-space-2);
}

/* 전달 대화상자 */
.forward {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
  min-height: 0;
}
.forward__preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 120px;
  margin: 0;
  padding: var(--sr-space-2) var(--sr-space-3);
  overflow-y: auto;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-2);
  list-style: none;
  font-size: var(--sr-text-sm);
}
.forward__preview li {
  display: flex;
  gap: var(--sr-space-2);
  min-width: 0;
}
.forward__preview-sender {
  flex: none;
  color: var(--sr-color-primary-text);
  font-weight: var(--sr-weight-semibold);
}
.forward__preview-text {
  overflow: hidden;
  color: var(--sr-color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forward__preview-more {
  color: var(--sr-color-text-muted);
}
.forward__tabs {
  display: flex;
  gap: var(--sr-space-1);
  border-bottom: 1px solid var(--sr-color-border);
}
.forward__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px var(--sr-space-3);
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
}
.forward__tab.is-active {
  border-bottom-color: var(--sr-color-primary);
  color: var(--sr-color-primary-text);
}
.forward__tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary);
  color: #fff;
  font-size: var(--sr-text-xs);
}
.forward__rooms {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  min-height: 0;
}
.forward__search {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  color: var(--sr-color-text-muted);
}
.forward__search input {
  flex: 1;
}
.forward__room-list {
  display: flex;
  flex-direction: column;
  max-height: 260px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.forward__room-list > li {
  padding: 2px 0;
}
.forward__room {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  min-width: 0;
}
.forward__room-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forward__room-sub {
  margin-left: 6px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.forward__room-tag {
  flex: none;
  padding: 1px 6px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.forward__empty {
  padding: var(--sr-space-4);
  color: var(--sr-color-text-muted);
  text-align: center;
}
/*
 * 맨 위 "나에게 보내기" 한 줄 (v0.40, 승인 초안 "안 A") — 다른 줄과 같은 체크 모양,
 * 옅은 파란 바탕 · 굵은 글자 · "나" 표시로 구분하고 아래에 가는 선을 둔다.
 */
.forward__room-list > li.forward__self-item,
.forward__self-item {
  margin-bottom: 4px;
  padding: 0 0 4px;
  border-bottom: 1px solid var(--sr-color-border);
}
/* 사람 탭(조직도 목록) 안에서는 다른 줄과 같은 좌우 여백 */
.forward__self-item--org {
  padding: 4px var(--sr-space-2);
}
.forward__self {
  padding: 4px 6px;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-primary-soft);
}
.forward__self-name {
  overflow: hidden;
  color: var(--sr-color-text);
  font-weight: var(--sr-weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forward__self-badge {
  flex: none;
  padding: 1px 7px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary);
  color: #fff;
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}
.forward__self-sub {
  overflow: hidden;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 첨부 파일 저장 (저장 → 폴더 열기) ────────────────────── */
.msg-save {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  white-space: nowrap;
}
.msg-save:hover:not(:disabled) {
  border-color: var(--sr-color-primary);
  color: var(--sr-color-primary-text);
}
.msg-save:disabled {
  opacity: 0.6;
}
.msg-image__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

/* 이미지 크게 보기 */
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sr-space-6);
  background: rgba(0, 0, 0, 0.75);
}
.image-viewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--sr-radius-md);
  object-fit: contain;
}
.image-viewer__close {
  position: absolute;
  top: var(--sr-space-4);
  right: var(--sr-space-4);
  display: inline-flex;
  padding: 6px;
  border: none;
  border-radius: var(--sr-radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.image-viewer__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ── 개인 이모티콘 (/약어) ─────────────────────────────────── */
.msg-emoticon {
  display: block;
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
}
.msg-emoticon--missing {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-style: italic;
}

/* 입력창 위 이모티콘 자동완성 */
.composer__emoticons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-1);
  max-height: 180px;
  margin: 0 0 var(--sr-space-1);
  padding: var(--sr-space-2);
  overflow-y: auto;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  list-style: none;
}
.composer__emoticon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 72px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: var(--sr-radius-sm);
  background: transparent;
}
.composer__emoticon.is-active,
.composer__emoticon:hover {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-primary-soft);
}
.composer__emoticon-name {
  overflow: hidden;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 설정 > 내 이모티콘 */
.emoticons {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
}
.emoticons__hint {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.emoticons__hint code {
  padding: 1px 5px;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-2);
}
.emoticons__section {
  margin: var(--sr-space-3) 0 0;
  padding-top: var(--sr-space-3);
  border-top: 1px solid var(--sr-color-border);
  font-size: var(--sr-text-md);
}
.emoticons__add {
  display: flex;
  align-items: flex-end;
  gap: var(--sr-space-2);
}
.emoticons__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.emoticons__field-label {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.emoticons__input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.emoticons__slash {
  color: var(--sr-color-text-muted);
  font-weight: var(--sr-weight-semibold);
}
.emoticons__error {
  margin: 0;
  color: var(--sr-color-danger);
  font-size: var(--sr-text-sm);
}
.emoticons__empty {
  margin: 0;
  color: var(--sr-color-text-muted);
}
.emoticons__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.emoticons__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 96px;
  padding: var(--sr-space-2);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
}
.emoticons__shortcut {
  overflow: hidden;
  font-size: var(--sr-text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.emoticons__actions {
  display: flex;
  gap: 4px;
}
.emoticons__action {
  display: inline-flex;
  padding: 3px;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: var(--sr-color-text-muted);
}
.emoticons__action:hover {
  background: var(--sr-color-surface-hover);
}
.emoticons__action--danger:hover {
  color: var(--sr-color-danger);
}

/* ── 멘션 강조 · 내 멘션 모아보기 ─────────────────────────── */
/*
 * 나를 부른 멘션은 네이버웍스처럼 노란 배경으로 더 눈에 띄게 표시한다.
 * 글자 색도 토큰으로 — 어두운 화면에서 노란 바탕에 흰 글자(1.04 : 1)로 보이던 오류 (v0.43 초안 11번).
 */
.msg-mention.is-me {
  padding: 0 3px;
  border-radius: 3px;
  background: var(--sr-color-mention-me);
  color: var(--sr-color-mention-me-text);
  font-weight: var(--sr-weight-semibold);
}

.mentions-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
  height: 100%;
  padding: var(--sr-space-5);
  overflow-y: auto;
}
.mentions-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-3);
}
.mentions-panel__title {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  margin: 0;
  font-size: var(--sr-text-xl);
}
.mentions-panel__list {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.mention-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  text-align: left;
}
.mention-card:hover {
  background: var(--sr-color-surface-hover);
}
.mention-card.is-unread {
  border-left: 3px solid var(--sr-color-primary);
}
.mention-card__top {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  font-size: var(--sr-text-sm);
}
.mention-card__room {
  font-weight: var(--sr-weight-semibold);
}
.mention-card__kind {
  padding: 1px 6px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-xs);
}
.mention-card__time {
  margin-left: auto;
  color: var(--sr-color-text-muted);
}
.mention-card__sender {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.mention-card__body {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.mentions-panel__more {
  display: flex;
  justify-content: center;
}

/* ── 예약 메시지 · 나중에 알림 ─────────────────────────────── */
.conversation__tool-badge {
  position: relative;
  display: inline-flex;
}
.conversation__tool-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary);
}

.time-choice {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
}
.time-choice__presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
}
.time-choice__preset {
  padding: 6px 12px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface);
  font-size: var(--sr-text-md);
}
.time-choice__preset:hover:not(:disabled) {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
}
/* 이미 지난 "오늘 …" 항목 */
.time-choice__preset.is-past {
  color: var(--sr-color-text-subtle);
  cursor: not-allowed;
  text-decoration: line-through;
}
.time-choice__custom {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  font-size: var(--sr-text-sm);
}
.time-choice__section {
  font-weight: var(--sr-weight-bold);
}
.time-choice__error {
  margin: 0;
  color: var(--sr-color-danger);
  font-size: var(--sr-text-sm);
}
/* 고른 시각 한 줄 (v0.41 안 A) — "11월 3일 (화) 오후 1:00에 보냅니다" */
.time-choice__summary {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  padding: 10px 12px;
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-text);
  font-size: var(--sr-text-md);
}
.time-choice__summary b {
  color: var(--sr-color-primary-text);
}
.time-choice__summary.is-invalid {
  background: var(--sr-color-danger-soft);
  color: var(--sr-color-danger);
}
/* 창이 낮아 스크롤이 생겨도 취소 / 예약(예약 수정은 저장) 단추는 늘 보인다 (예전 날짜 판이 확인 단추를 가렸다 — 대표 보고). */
.time-choice__body > .sr-dialog__footer,
.sr-dialog > .scheduled-edit__footer {
  position: sticky;
  bottom: calc(-1 * var(--sr-space-6));
  z-index: 1;
  margin: var(--sr-space-4) 0 calc(-1 * var(--sr-space-6));
  padding: var(--sr-space-3) 0 var(--sr-space-6);
  background: var(--sr-color-surface);
}

/* 날짜 · 시각 직접 선택 (v0.41 대표 승인 초안 안 A): 왼쪽 달력 · 오른쪽 오전/오후 · 시 · 분 */
.time-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-5);
  padding: var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
}
.time-picker__calendar {
  width: 270px;
  font-size: var(--sr-text-sm);
}
.time-picker__month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-weight: var(--sr-weight-bold);
}
.time-picker__month-nav {
  display: inline-flex;
  gap: 2px;
}
.time-picker__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: var(--sr-color-text-muted);
  cursor: pointer;
}
.time-picker__nav:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
.time-picker__nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.time-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.time-picker__weekday {
  height: 24px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  line-height: 24px;
}
.time-picker__day {
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: var(--sr-color-text);
  font: inherit;
  cursor: pointer;
}
.time-picker__weekday.is-sun,
.time-picker__day.is-sun {
  color: var(--sr-color-danger);
}
.time-picker__weekday.is-sat,
.time-picker__day.is-sat {
  color: var(--sr-color-primary-text);
}
.time-picker__day:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
}
.time-picker__day.is-today {
  box-shadow: inset 0 0 0 1.5px var(--sr-color-text-subtle);
}
.time-picker__day.is-selected,
.time-picker__day.is-selected:hover {
  background: var(--sr-color-primary);
  color: var(--sr-color-text-inverse);
  font-weight: var(--sr-weight-bold);
}
.time-picker__day:disabled {
  color: var(--sr-color-text-subtle);
  opacity: 0.55;
  cursor: default;
}
.time-picker__clock {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 220px;
}
.time-picker__meridiem {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-md);
}
.time-picker__meridiem button {
  padding: 6px 16px;
  border: 0;
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
  font: inherit;
  font-size: var(--sr-text-md);
  cursor: pointer;
}
.time-picker__meridiem button + button {
  border-left: 1px solid var(--sr-color-border-strong);
}
.time-picker__meridiem button.is-on {
  background: var(--sr-color-primary);
  color: var(--sr-color-text-inverse);
  font-weight: var(--sr-weight-bold);
}
.time-picker__hm {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
}
.time-picker__spin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.time-picker__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
  cursor: pointer;
}
.time-picker__step:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
.time-picker__num {
  width: 62px;
  height: 46px;
  border: 1.5px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
  font: inherit;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: var(--sr-weight-bold);
  text-align: center;
}
.time-picker__num:focus {
  border-color: var(--sr-color-primary);
  box-shadow: 0 0 0 3px var(--sr-color-focus);
  outline: none;
}
.time-picker__colon {
  margin-bottom: 18px;
  color: var(--sr-color-text-muted);
  font-size: 24px;
  font-weight: var(--sr-weight-bold);
}
.time-picker__unit {
  margin-top: 2px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.time-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.time-picker__chip {
  padding: 4px 10px;
  border: 1px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
  font: inherit;
  font-size: var(--sr-text-sm);
  cursor: pointer;
}
.time-picker__chip:hover:not(:disabled) {
  border-color: var(--sr-color-primary);
  color: var(--sr-color-primary-text);
}
.time-picker__chip.is-on {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
}
.time-picker__hint {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  line-height: 1.55;
}

.scheduled__empty {
  margin: 0;
  color: var(--sr-color-text-muted);
}
.scheduled__list {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  max-height: 340px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.scheduled__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
}
.scheduled__head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.scheduled__failed {
  padding: 1px 6px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-danger-soft, #fde8e8);
  color: var(--sr-color-danger);
  font-size: var(--sr-text-xs);
}
.scheduled__body {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.scheduled__actions,
.reminder-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
  margin-top: 4px;
}
/* 예약 메시지 대기중 / 발송 완료 탭 · 누르면 수정 (v27, 카카오톡식) */
.scheduled__tabs {
  margin-bottom: var(--sr-space-3);
}
.scheduled__item--button {
  width: 100%;
  background: var(--sr-color-surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.scheduled__item--button:hover:not(:disabled) {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-surface-hover);
}
.scheduled__item--button:disabled {
  cursor: default;
  opacity: 0.75;
}
.scheduled__item--button.is-failed {
  border-color: var(--sr-color-danger);
}
.scheduled__chevron {
  margin-left: auto;
  color: var(--sr-color-text-subtle);
}
.scheduled__badge {
  padding: 1px 6px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-warning-soft);
  color: var(--sr-color-text);
  font-size: var(--sr-text-xs);
}
.scheduled__sent-icon {
  color: var(--sr-color-success);
}
.scheduled__reason {
  color: var(--sr-color-danger);
  font-size: var(--sr-text-sm);
}
.scheduled-edit {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
}
.scheduled-edit__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--sr-text-sm);
}
.scheduled-edit__text {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}
.scheduled-edit__note {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
/*
 * 위험한 작업(예약 삭제 · 대화방 나가기)은 왼쪽 빨간 글자 단추 (v0.43 시안 9번 — 대표 승인 2026-11-08).
 * 파란 "저장" · "닫기" 옆의 꽉 찬 빨간 단추는 눈에 너무 띄고 실수로 누르기 쉬웠다. 확인 창은 그대로 뜬다.
 */
.sr-btn.btn-danger-text {
  margin-right: auto;
  color: var(--sr-color-danger);
}
.sr-btn.btn-danger-text:hover:not(:disabled) {
  background: var(--sr-color-danger-soft);
  color: var(--sr-color-danger);
}
.scheduled-edit__footer {
  align-items: center;
}
.scheduled-edit__spacer {
  flex: 1;
}
/* 사진 · 파일 예약의 첨부 (v0.35) — 목록은 작은 그림 4장 + "+N", 파일은 이름 · 크기 */
.scheduled-attach {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.scheduled-attach__photos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.scheduled-attach__thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-subtle);
}
.scheduled-attach.is-detailed .scheduled-attach__thumb {
  width: 72px;
  height: 72px;
}
.scheduled-attach__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scheduled-attach__more {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.scheduled-attach__file {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.scheduled-attach__name {
  overflow: hidden;
  color: var(--sr-color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scheduled-attach__size {
  flex: none;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.time-choice__attach {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}

/* 대화창 흔들기 (v27, 네이트온 방식) — 상대가 흔들면 앱 화면이 0.6초 좌우로 흔들린다 */
@keyframes sr-nudge-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  15%,
  45%,
  75% {
    transform: translateX(-10px);
  }
  30%,
  60%,
  90% {
    transform: translateX(10px);
  }
}
.app-shell.is-nudged {
  animation: sr-nudge-shake 0.6s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  /* 움직임을 줄인 PC에서는 흔드는 대신 테두리를 잠깐 깜빡인다 */
  .app-shell.is-nudged {
    animation: none;
    outline: 3px solid var(--sr-color-warning);
    outline-offset: -3px;
  }
}

/* ── 대화방 상단 고정 (폴더 줄은 v27 #14에서 뺐다 — 대표 요청) ─────────── */
.room-item__favorite {
  display: inline-flex;
  margin-left: 4px;
  color: var(--sr-color-brand);
  vertical-align: -1px;
}

/*
 * 상단 고정 버튼.
 * 평소에는 숨어 있다가 마우스를 올리거나 키보드로 옮겨 오면 나타난다.
 * 이미 고정한 방은 언제나 보이게 해서 "여기를 다시 누르면 풀린다"가 드러나게 한다.
 */
.room-item__pin {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-md);
  opacity: 0;
  background: transparent;
  color: var(--sr-color-text-subtle);
  transition:
    opacity 0.12s ease,
    color 0.12s ease;
}
.room-item:hover .room-item__pin,
.room-item__pin:focus-visible,
.room-item.is-pinned .room-item__pin {
  opacity: 1;
}
.room-item.is-pinned .room-item__pin {
  color: var(--sr-color-brand);
}
.room-item__pin:hover {
  background: var(--sr-color-surface-active);
  color: var(--sr-color-text);
}
.room-item__muted {
  margin-left: 4px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}

.admin-section {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
}
.admin-section__hint {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.admin-section__row {
  display: flex;
  align-items: flex-end;
  gap: var(--sr-space-2);
}

/* ── 관리자: 공휴일·알림 시간 ─────────────────────────────── */
.calendar-admin__policy,
.calendar-admin__holidays {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
  padding: var(--sr-space-4);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
}
.calendar-admin__now {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sr-space-2) var(--sr-space-3);
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-2);
  font-size: var(--sr-text-sm);
}
.calendar-admin__now span {
  color: var(--sr-color-text-muted);
}
.calendar-admin__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sr-space-3);
}
.calendar-admin__label {
  align-self: center;
  font-weight: var(--sr-weight-semibold);
}
.calendar-admin__warn {
  align-self: center;
  color: var(--sr-color-warning);
  font-size: var(--sr-text-sm);
}
/* 휴대폰 알림 내용 보기 설명 (v0.39) */
.calendar-admin__note {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.calendar-admin__days {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
  margin: 0;
  padding: 0;
  border: none;
}
.calendar-admin__days legend {
  width: 100%;
  margin-bottom: 4px;
}
.calendar-admin__year {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
}
.calendar-admin__year-title {
  margin: 0;
  font-size: var(--sr-text-lg);
}
.calendar-admin__past td {
  color: var(--sr-color-text-muted);
}

/* ── 업무(Task) ───────────────────────────────────────────── */
.tasks-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
  height: 100%;
  padding: var(--sr-space-5);
  overflow-y: auto;
}
.tasks-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-3);
}
.tasks-panel__title {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  margin: 0;
  font-size: var(--sr-text-xl);
}
.tasks-panel__search {
  width: 100%;
}
.tasks-panel__search-note {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.tasks-panel__list {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.task-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
}
.task-card.is-overdue {
  border-left: 3px solid var(--sr-color-danger);
}
.task-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
}
.task-card__status {
  padding: 1px 8px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.task-card__status.is-in_progress {
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
}
.task-card__status.is-done {
  background: #e6f4ea;
  color: #1e7b34;
}
.task-card__title {
  font-weight: var(--sr-weight-semibold);
}
/* 끝난 업무를 골라 치울 때 — 체크 칸을 오른쪽 위에 둔다 */
.task-card--pickable {
  position: relative;
  padding-right: 44px;
}
.task-card__pick {
  position: absolute;
  top: var(--sr-space-3);
  right: var(--sr-space-3);
}
.tasks-panel__clearbar {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
  padding: var(--sr-space-2) var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
}
.tasks-panel__clearbar-count {
  margin-right: auto;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.task-card__due {
  margin-left: auto;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.task-card.is-overdue .task-card__due {
  color: var(--sr-color-danger);
}
.task-card__desc {
  margin: 0;
  color: var(--sr-color-text-muted);
  white-space: pre-wrap;
}
.task-card__meta {
  display: flex;
  gap: var(--sr-space-3);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.task-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
  margin-top: 2px;
}
.task-card__source-removed {
  align-self: center;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}

.task-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sr-space-3);
  min-height: 0;
  /* 창이 낮은 노트북에서는 폼 전체가 스크롤된다 (담당자 칸이 뭉개지지 않도록). */
  overflow-y: auto;
}
.task-form__source {
  margin: 0;
  padding: var(--sr-space-2);
  overflow: hidden;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-form__field {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}
.task-form__label {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.task-form__textarea {
  height: auto;
  padding: 8px 10px;
  resize: vertical;
}
.task-form__row {
  display: flex;
  gap: var(--sr-space-3);
}
/* 마감일 지우기 (기한 없는 업무) */
.task-form__due-toggle {
  align-self: flex-start;
  padding: 0;
  border: none;
  background: none;
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-sm);
  cursor: pointer;
}
.task-form__due-toggle:hover:not(:disabled) {
  text-decoration: underline;
}
.task-form__due-none {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.task-form__required {
  padding: 1px 6px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}
/*
 * 담당자 고르는 칸은 남는 높이를 **전부** 쓴다.
 * 예전에는 조직도가 너무 납작해서 사람 두어 명밖에 안 보였다.
 */
.task-form__assignees {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sr-space-2);
  min-height: 260px;
}
.task-form__assignee-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-3);
}
.task-form__mine-note {
  margin: 0;
  padding: var(--sr-space-3);
  border: 1px dashed var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}

/* ── Markdown 서식 ────────────────────────────────────────── */
.composer__format {
  display: inline-flex;
  gap: 1px;
  padding-right: var(--sr-space-2);
  margin-right: var(--sr-space-1);
  border-right: 1px solid var(--sr-color-border);
}
.md-code {
  padding: 1px 5px;
  border-radius: var(--sr-radius-sm);
  background: rgba(0, 0, 0, 0.06);
  font-family: var(--sr-font-mono, ui-monospace, Consolas, monospace);
  font-size: 0.92em;
}
.msg--mine .md-code {
  background: rgba(255, 255, 255, 0.28);
}
.md-codeblock {
  max-width: 100%;
  margin: 4px 0;
  padding: 8px 10px;
  overflow-x: auto;
  border-radius: var(--sr-radius-sm);
  background: rgba(0, 0, 0, 0.06);
  font-family: var(--sr-font-mono, ui-monospace, Consolas, monospace);
  font-size: 0.92em;
  white-space: pre;
}
.msg--mine .md-codeblock {
  background: rgba(255, 255, 255, 0.24);
}
.md-quote {
  margin: 4px 0;
  padding: 2px 0 2px 10px;
  border-left: 3px solid currentColor;
  opacity: 0.85;
}
.md-list {
  margin: 4px 0;
  padding-left: 20px;
}
.md-list li {
  list-style: disc;
}

/* ── 묶어서 전달 (FORWARD_BUNDLE) ───────────────────────────
   여러 건이 말풍선 하나로 도착한다. 카드 안에서 앞 3건만 미리 보여주고,
   "메시지 상세보기"를 누르면 별도 창에서 원문을 본다 (네이버웍스와 같은 방식). */
.fwd-bundle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* 칸이 220px보다 좁으면 칸에 맞춘다 — 카드가 말풍선 밖으로 나가 "읽음 N"을 덮지 않게 (v27 #11). */
  min-width: min(220px, 100%);
  max-width: 420px;
}
.fwd-bundle__head {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}
/*
 * 내 말풍선도 옅은 하늘색이라(네이버웍스 색) 보조 글자는 남의 말풍선과 같은 회색으로 둔다.
 * 예전 진한 파랑 말풍선 시절의 흰 글자가 남아 "전달"·" : "·"외 N건"이 거의 보이지 않았다 (v27 #11).
 */
.fwd-bundle__sep {
  color: var(--sr-color-text-muted);
}
.fwd-bundle__title {
  font-weight: var(--sr-weight-semibold);
}
.fwd-bundle__lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--sr-text-sm);
}
.fwd-bundle__lines li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fwd-bundle__sender {
  font-weight: var(--sr-weight-semibold);
}
.fwd-bundle__more {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.fwd-bundle__open {
  margin-top: 4px;
  padding: 7px 10px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
  /* 카드가 좁아져 줄이 바뀌어도 "메시지 / 상세보기"처럼 낱말 단위로 나눈다. */
  word-break: keep-all;
  cursor: pointer;
}
.fwd-bundle__open:hover {
  background: var(--sr-color-surface-hover);
}

/* 전달받은 원문 목록. 스크롤은 떠 있는 창(.float-window__body)이 맡는다. */
.fwd-detail {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-4);
  padding: var(--sr-space-3) var(--sr-space-4) var(--sr-space-4);
}
.fwd-detail__item {
  display: flex;
  gap: var(--sr-space-2);
}
.fwd-detail__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.fwd-detail__head {
  display: flex;
  align-items: baseline;
  gap: var(--sr-space-2);
}
.fwd-detail__sender {
  font-weight: var(--sr-weight-semibold);
}
.fwd-detail__time {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.fwd-detail__content {
  padding: var(--sr-space-2) var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.forward__bundle {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.forward__bundle-hint {
  margin: 0 0 0 26px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}

/* 선택 줄의 "묶어서 전달" (네이버웍스와 같은 자리) */
.selection-bar__bundle {
  /* 왼쪽 "N건 선택됨" 옆에 붙고, 오른쪽 버튼 묶음은 끝으로 밀어낸다 */
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--sr-space-2);
  padding: 6px 8px;
  border-radius: var(--sr-radius-md);
  color: var(--sr-color-text);
  font-size: var(--sr-text-md);
  cursor: pointer;
  user-select: none;
}
.selection-bar__bundle:hover {
  background: var(--sr-color-surface-hover);
}
.selection-bar__bundle input {
  width: 18px;
  height: 18px;
  accent-color: var(--sr-color-primary);
  cursor: pointer;
}
.selection-bar__hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}

/* ─── 대화방 곁 패널 (대화 내 검색 · 파일) ─────────────────────────────── */

/*
 * 대화 본문과 곁 패널을 좌우로 나눈다.
 * min-height: 0 이 없으면 안쪽 목록이 자기 내용만큼 늘어나 스크롤이 생기지 않는다.
 */
.conversation__split {
  /* 작은 화면에서 옆 창이 이 칸 기준으로 겹쳐 열린다 (.room-panel--overlay) */
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
}
.conversation__main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.room-panel {
  display: flex;
  flex: none;
  flex-direction: column;
  width: 340px;
  min-height: 0;
  border-left: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface);
}
/*
 * 작은 노트북 화면(1024~1279px)에서는 옆 창을 대화 위에 겹쳐(그림자) 연다 — 대화 폭을 지켜
 * 말풍선이 한 글자씩 내려가지 않게 (v0.43 시안 6번). 바깥을 누르거나 Esc로 닫힌다 (RoomSidePanel).
 * 떠 있는 창(.float-window 40) · 읽은 멤버 창(45)보다는 아래에 둔다.
 */
.room-panel--overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  width: min(340px, calc(100% - 48px));
  box-shadow: var(--sr-shadow-lg);
}
.room-panel__header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
  padding: var(--sr-space-2) var(--sr-space-3);
  border-bottom: 1px solid var(--sr-color-border);
}
.room-panel__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sr-space-3);
  min-height: 0;
  padding: var(--sr-space-3);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.room-panel__form {
  display: flex;
  gap: var(--sr-space-2);
}
.room-panel__input {
  flex: 1;
  min-width: 0;
}
.room-panel__filters {
  display: flex;
  gap: var(--sr-space-2);
}
.room-panel__filter {
  flex: 1;
  min-width: 0;
}
.room-panel__hint {
  margin: 0;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.room-panel__results {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
}

/* 이 대화방의 파일 목록 */
.room-files {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.room-files__item {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  padding: var(--sr-space-2);
  border-radius: var(--sr-radius-md);
}
.room-files__item:hover {
  background: var(--sr-color-surface-hover);
}
.room-files__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.room-files__name {
  overflow: hidden;
  font-size: var(--sr-text-md);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.room-files__meta {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.room-files__actions {
  display: flex;
  flex: none;
  gap: 4px;
}

/* 검색 결과에서 찾아간 메시지를 잠시 강조한다 */
.msg.is-found .msg__bubble {
  animation: sr-found 2.4s ease-out;
}
@keyframes sr-found {
  0%,
  60% {
    box-shadow: 0 0 0 2px var(--sr-color-primary);
  }
  100% {
    box-shadow: 0 0 0 2px transparent;
  }
}
@media (prefers-reduced-motion: reduce) {
  .msg.is-found .msg__bubble {
    animation: none;
    box-shadow: 0 0 0 2px var(--sr-color-primary);
  }
}

/* ─── 리액션 (SRISE 캐릭터 스티커) ───────────────────────────────────── */

.srise-sticker {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.srise-sticker svg {
  width: 100%;
  height: 100%;
}
/* 고르는 줄 */
.srise-sticker-row {
  display: flex;
  gap: 2px;
}
.srise-sticker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: none;
  border-radius: var(--sr-radius-full);
  background: transparent;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.12s ease;
}
.srise-sticker-btn:hover {
  background: var(--sr-color-surface-hover);
  transform: scale(1.14);
}
.srise-sticker-btn.is-mine {
  background: var(--sr-color-primary-soft);
}
.srise-sticker-btn:focus-visible {
  outline: 2px solid var(--sr-color-primary);
  outline-offset: 1px;
}
/* 반응 고르는 창: 캐릭터 줄 + (접어 둔) 이모지 */
.reaction-picker {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  padding: var(--sr-space-1);
}
.reaction-picker__more > summary {
  padding: 4px 6px;
  border-radius: var(--sr-radius-md);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  cursor: pointer;
  list-style: none;
}
.reaction-picker__more > summary::-webkit-details-marker {
  display: none;
}
.reaction-picker__more > summary::before {
  content: '＋ ';
}
.reaction-picker__more[open] > summary::before {
  content: '－ ';
}
.reaction-picker__more > summary:hover {
  background: var(--sr-color-surface-hover);
}

/* ─── 통합 검색: 대화방별 묶음 결과 (대화방 목록 자리) ─────────────────── */

.search-groups {
  flex: 1;
  min-height: 0;
  /* 통합 검색 결과도 같은 자리에 "+" 단추가 떠 있다 — 마지막 묶음이 가려지지 않게 (v0.43 초안 18번) */
  padding: var(--sr-space-2) 0 var(--sr-fab-clearance);
  overflow-y: auto;
  scrollbar-gutter: stable;
  transition: opacity var(--sr-duration);
}
/* 새 검색 결과를 기다리는 중 (v0.35) — 목록은 그대로 두고(누를 수 있게) 살짝만 흐리게.
   빨리 오면 깜빡이지 않도록 조금 늦게 흐려진다. 자리를 바꾸지 않으므로 누르던 줄이 움직이지 않는다. */
.search-groups.is-refreshing {
  opacity: 0.7;
  transition-delay: 200ms;
}
.search-groups__state {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: var(--sr-space-6) var(--sr-space-4);
}
.search-groups__section + .search-groups__section {
  margin-top: var(--sr-space-3);
}
.search-groups__title {
  margin: 0;
  padding: var(--sr-space-2) var(--sr-space-4) var(--sr-space-1);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
}
.search-group {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
  width: 100%;
  padding: var(--sr-space-2) var(--sr-space-4);
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.search-group:hover {
  background: var(--sr-color-surface-hover);
}
.search-group__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.search-group__name {
  overflow: hidden;
  color: var(--sr-color-text);
  font-size: var(--sr-text-base);
  font-weight: var(--sr-weight-semibold);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.search-group__caption {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.search-group__chevron {
  flex: none;
  color: var(--sr-color-text-subtle);
}

/* ─── 대화 위에 떠 있는 작은 창 (검색 결과 · 전달받은 원문) ───────────────── */

/*
 * 모달이 아니다. 뒤쪽 대화를 눌러도 닫히지 않고, 결과를 눌러 이동해도 그대로 남는다
 * (네이버웍스와 같은 동작). 그래서 Dialog가 아니라 떠 있는 상자로 만든다.
 * 닫는 방법은 제목 줄의 **창 끄기(×)** 하나이고, **창 내리기(−)** 는 본문만 접는다.
 */
.float-window {
  position: fixed;
  top: calc(var(--sr-header-height) + 24px);
  left: 50%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  max-height: min(560px, calc(100vh - var(--sr-header-height) - 80px));
  overflow: hidden;
  border: 1px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-lg, 0 12px 32px rgb(0 0 0 / 22%));
}
.float-window.is-minimized {
  max-height: none;
}
.float-window__header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
  padding: 6px 6px 6px 14px;
  background: var(--sr-color-primary);
  color: #fff;
}
.float-window__title {
  overflow: hidden;
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.float-window__buttons {
  display: flex;
  flex: none;
  gap: 2px;
}
.float-window__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.float-window__button:hover {
  background: rgb(255 255 255 / 20%);
}
.float-window__button--close:hover {
  background: var(--sr-color-danger, #d33);
}
.float-window__button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}
.float-window__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.float-window__footer {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--sr-space-2);
  padding: var(--sr-space-2) var(--sr-space-3);
  border-top: 1px solid var(--sr-color-border);
}

.hits-window__body {
  padding: var(--sr-space-1) 0;
}
.hits-window__empty,
.hits-window__hint {
  margin: 0;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.hits-window__empty {
  padding: var(--sr-space-4);
  text-align: center;
}
.hits-window__hint {
  flex: 1;
  line-height: 1.35;
}
.hits-row {
  display: flex;
  gap: var(--sr-space-2);
  width: 100%;
  padding: var(--sr-space-2) var(--sr-space-3);
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.hits-row:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
}
.hits-row:disabled {
  cursor: default;
  opacity: 0.6;
}
/* 방금 눌러서 이동한 항목 — 어디까지 봤는지 알 수 있게 남겨 둔다. */
.hits-row.is-visited {
  background: var(--sr-color-primary-soft);
}
.hits-row__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.hits-row__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sr-space-2);
}
.hits-row__sender {
  overflow: hidden;
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hits-row__time {
  flex: none;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.hits-row__text {
  display: -webkit-box;
  overflow: hidden;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.hits-row__meta {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}

/* 전달받은 원문 창의 안내 문구 */
.fwd-detail__note {
  margin: 0;
  padding: var(--sr-space-3) var(--sr-space-4) 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}

/* ─── 관리자: 전체 백업 내보내기 ─────────────────────────────────────── */

.admin-backup__warning {
  display: flex;
  align-items: flex-start;
  gap: var(--sr-space-2);
}
.admin-backup__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-3);
}
.admin-backup__status {
  font-weight: var(--sr-weight-semibold);
}
.admin-backup__status.is-ready {
  color: var(--sr-color-success-text);
}
.admin-backup__status.is-failed {
  color: var(--sr-color-danger-text);
}
.admin-backup__status.is-deleted {
  color: var(--sr-color-text-subtle);
}
/* 진행률 막대 */
.admin-backup__progress {
  position: relative;
  display: block;
  margin-top: 4px;
  overflow: hidden;
  height: 14px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-hover);
}
.admin-backup__bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--sr-color-primary);
  transition: width 0.3s ease;
}
.admin-backup__step {
  position: relative;
  display: block;
  padding: 0 6px;
  color: var(--sr-color-text);
  font-size: var(--sr-text-xs);
  line-height: 14px;
  white-space: nowrap;
}
.admin-backup__error {
  display: block;
  margin-top: 2px;
  color: var(--sr-color-danger-text);
  font-size: var(--sr-text-sm);
}

/* 백업 범위 · 매달 자동 묶음 (v0.48 대표 결정 11-13 — 백업 A · B) */
.admin-backup__range {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
}
.admin-backup__range-title,
.admin-backup__subtitle {
  font-weight: var(--sr-weight-semibold);
}
.admin-backup__subtitle {
  margin: var(--sr-space-4) 0 0;
  font-size: var(--sr-text-md);
}
.admin-backup__choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
}
.admin-backup__choice-note {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.admin-backup__estimate {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.admin-backup__estimate.is-error {
  color: var(--sr-color-danger-text);
}

/* ─── 관리자 표: 여러 개 골라 한 번에 처리하기 ─────────────────────────── */

.admin__col--check {
  width: 36px;
  text-align: center;
}
.admin__col--check input {
  width: 16px;
  height: 16px;
  accent-color: var(--sr-color-primary);
  cursor: pointer;
}
.admin__table tr.is-selected {
  background: var(--sr-color-primary-soft);
}
/* 고른 항목 수와 일괄 작업 버튼 줄 */
.admin__bulkbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-3);
  padding: var(--sr-space-2) var(--sr-space-3);
  border: 1px solid var(--sr-color-primary);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-primary-soft);
  font-size: var(--sr-text-md);
}
.admin__bulkbar-actions {
  display: flex;
  gap: var(--sr-space-2);
}
/* 관리자 파일 관리 페이지 (v0.46.1 — 100건씩 1~5페이지) */
.admin__pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sr-space-1);
}
.admin__pager-page {
  min-width: 32px;
  height: 30px;
  padding: 0 var(--sr-space-2);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
  font: inherit;
  font-size: var(--sr-text-md);
  cursor: pointer;
}
.admin__pager-page:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
}
.admin__pager-page.is-current {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-primary);
  color: var(--sr-color-text-inverse);
  font-weight: 600;
  cursor: default;
}
.admin__pager-page:focus-visible {
  outline: 2px solid var(--sr-color-focus);
  outline-offset: 1px;
}

/* ── 프로필 카드 (이름·사진을 누르면 뜨는 작은 창) ───────────────────── */
.profile-card {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-4);
}
.profile-card__head {
  display: flex;
  align-items: center;
  gap: var(--sr-space-4);
}
.profile-card__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.profile-card__name {
  margin: 0;
  font-size: var(--sr-text-lg);
  font-weight: var(--sr-weight-semibold);
}
.profile-card__me {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-normal);
}
.profile-card__rank {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.profile-card__presence {
  display: flex;
  align-items: center;
  margin: 0;
  gap: 5px;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}

/* 바로 할 수 있는 일 (메시지 · 환경설정) — 네이버웍스처럼 큰 아이콘 버튼으로 둔다 */
.profile-card__actions {
  display: flex;
  justify-content: center;
  padding: var(--sr-space-3) 0;
  border-top: 1px solid var(--sr-color-border);
  border-bottom: 1px solid var(--sr-color-border);
  gap: var(--sr-space-6);
}
.profile-card__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 86px;
  padding: var(--sr-space-2);
  border: none;
  border-radius: var(--sr-radius-md);
  gap: 5px;
  background: transparent;
  color: var(--sr-color-brand);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}
.profile-card__action:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
}
.profile-card__action:disabled {
  opacity: 0.5;
}

.profile-card__details {
  display: flex;
  flex-direction: column;
  margin: 0;
  gap: var(--sr-space-3);
}
.profile-card__details > div {
  display: grid;
  align-items: start;
  grid-template-columns: 56px 1fr;
  gap: var(--sr-space-3);
}
.profile-card__details dt {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
}
.profile-card__details dd {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: var(--sr-text-sm);
  word-break: break-all;
}
.profile-card__company {
  font-weight: var(--sr-weight-semibold);
}
/* 아직 등록하지 않은 값 (내선번호·전화번호) */
.profile-card__unset {
  color: var(--sr-color-text-subtle);
}

/* 말풍선의 보낸 사람 이름·사진을 누를 수 있게 한다 */
.msg__avatar-btn {
  display: block;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
}
.msg__avatar-btn:hover {
  opacity: 0.85;
}
.msg__sender-btn {
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
}
.msg__sender-btn:hover {
  text-decoration: underline;
}

/* ── 프로필 사진 설정 ─────────────────────────────────────── */
.profile-photo {
  display: flex;
  align-items: center;
  gap: var(--sr-space-4);
}
.profile-photo__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}
.profile-photo__actions {
  display: flex;
  margin-top: var(--sr-space-2);
  gap: var(--sr-space-2);
}

/* ── 접속 보안: 로그인 2단계 (Google OTP) ──────────────────── */
.auth-card--wide {
  width: min(640px, 100%);
}
.auth-card__text {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
  line-height: 1.6;
}
.auth-card__account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.auth-card__account strong {
  margin-left: var(--sr-space-1);
  margin-right: auto;
  color: var(--sr-color-text);
  overflow-wrap: anywhere;
}
.auth-card__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sr-space-2);
}
.auth-card__link {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-md);
  text-decoration: underline;
  cursor: pointer;
}
.auth-card__link:disabled {
  color: var(--sr-color-text-subtle);
  cursor: default;
}
.auth-card__loading {
  display: flex;
  justify-content: center;
  padding: var(--sr-space-6) 0;
}
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.countdown.is-urgent {
  color: var(--sr-color-danger);
  font-weight: var(--sr-weight-semibold);
}
.otp-field .sr-input {
  font-family: var(--sr-font-mono);
  font-size: var(--sr-text-xl);
  letter-spacing: 0.3em;
}
.recovery-field .sr-input {
  font-family: var(--sr-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Google OTP 등록 안내 (1 설치 → 2 QR → 3 번호) */
.otp-setup {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.otp-setup__step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: var(--sr-space-3);
}
.otp-setup__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-weight: var(--sr-weight-bold);
  font-size: var(--sr-text-md);
}
.otp-setup__body {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  min-width: 0;
  font-size: var(--sr-text-md);
}
.otp-setup__desc {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  line-height: 1.5;
}
.otp-setup__qr-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sr-space-4);
}
/* 어두운 화면에서도 휴대폰이 읽을 수 있게 QR 뒤는 항상 흰색이다. */
.otp-setup__qr {
  flex: none;
  padding: 6px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: #ffffff;
}
.otp-setup__manual {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sr-space-2);
  min-width: 220px;
}
.otp-setup__key {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 4px var(--sr-space-2);
  margin: 0;
  font-size: var(--sr-text-sm);
}
.otp-setup__key dt {
  color: var(--sr-color-text-muted);
}
.otp-setup__key dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
  margin: 0;
  overflow-wrap: anywhere;
}
.otp-setup__secret {
  padding: 2px 6px;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-2);
  font-family: var(--sr-font-mono);
  letter-spacing: 0.04em;
  user-select: all;
}
.otp-setup__submit {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sr-space-2);
}
.otp-setup__submit .sr-field {
  flex: 1;
  min-width: 180px;
}

/* 복구 코드 (한 번만 보여 준다) */
.recovery-codes {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
}
.recovery-codes__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px var(--sr-space-6);
  margin: 0;
  padding: var(--sr-space-3) var(--sr-space-3) var(--sr-space-3) var(--sr-space-8);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.recovery-codes__list code {
  color: var(--sr-color-text);
  font-family: var(--sr-font-mono);
  font-size: var(--sr-text-base);
  letter-spacing: 0.06em;
  user-select: all;
}
.recovery-codes__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
}

/* ── 접속 보안: 설정 → 보안 ───────────────────────────────── */
.security-settings {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
}
.security-settings .settings__info {
  grid-template-columns: 120px 1fr;
}
.security-settings__why {
  margin: 0;
}
.security-settings__on {
  color: var(--sr-color-success);
  font-weight: var(--sr-weight-semibold);
}
.security-settings__off {
  color: var(--sr-color-warning);
  font-weight: var(--sr-weight-semibold);
}
.security-settings__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
}
.security-settings__permits {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ── 접속 보안: 보안 알림방 ────────────────────────────────── */
.system-notice > span {
  white-space: pre-line;
}
.security-alert-row {
  display: flex;
  justify-content: center;
  padding: var(--sr-space-2) var(--sr-space-6);
}
.security-alert {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  width: min(560px, 100%);
  padding: var(--sr-space-3) var(--sr-space-4);
  border: 1px solid var(--sr-color-border);
  border-left-width: 4px;
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-sm);
  font-size: var(--sr-text-md);
}
.security-alert--critical {
  border-left-color: var(--sr-color-danger);
}
.security-alert--warning {
  border-left-color: var(--sr-color-warning);
}
.security-alert--info {
  border-left-color: var(--sr-color-border-strong);
}
.security-alert__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.security-alert__icon {
  flex: none;
  color: var(--sr-color-text-muted);
}
.security-alert--critical .security-alert__icon {
  color: var(--sr-color-danger);
}
.security-alert--warning .security-alert__icon {
  color: var(--sr-color-warning);
}
.security-alert__severity {
  padding: 1px 7px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}
.security-alert--critical .security-alert__severity {
  background: var(--sr-color-danger-soft);
  color: var(--sr-color-danger);
}
.security-alert--warning .security-alert__severity {
  background: var(--sr-color-warning-soft);
  color: var(--sr-color-warning);
}
.security-alert__title {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.security-alert__time {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
  white-space: nowrap;
}
/* 항목 이름 칸은 가장 긴 이름(예: "Google OTP")에 맞춰 모든 줄이 같은 너비로 맞춰진다. */
.security-alert__lines {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px var(--sr-space-3);
  margin: 0;
}
.security-alert__line {
  display: contents;
}
.security-alert__line dt {
  color: var(--sr-color-text-muted);
  white-space: nowrap;
}
.security-alert__line dd {
  margin: 0;
  overflow-wrap: anywhere;
  user-select: text;
}
/* 경고마다 빨간 버튼이 늘어서지 않게 테두리 버튼으로 두고 아이콘만 빨갛게 한다 (누르면 확인 창이 뜬다). */
.security-alert__block svg {
  color: var(--sr-color-danger);
}
.security-alert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
  padding-top: var(--sr-space-1);
}

/* ── 접속 보안: 관리자 → 접속 보안 ─────────────────────────── */
.security-admin__section {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
  padding: var(--sr-space-4);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
}
.security-admin__section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
}
.security-admin__section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: var(--sr-text-lg);
}
.security-admin__section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
}
.security-admin__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-3);
}
.security-admin__row--form {
  align-items: flex-end;
}
.security-admin__row-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 240px;
}
.security-admin__row-text > span {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.security-admin__grow {
  flex: 1;
  min-width: 200px;
}
.security-admin__on {
  color: var(--sr-color-success);
  font-size: var(--sr-text-sm);
}
.security-admin__off {
  color: var(--sr-color-danger);
  font-size: var(--sr-text-sm);
}
.security-admin__readonly,
.security-admin__note {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.security-admin__form-box {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
  padding: var(--sr-space-3);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
}
.security-admin__field {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
}
.security-admin__picked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
  padding: 6px var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  font-size: var(--sr-text-md);
}
.security-admin__picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 520px;
}
.security-admin__options {
  display: flex;
  flex-direction: column;
  max-height: 260px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  list-style: none;
  overflow-y: auto;
}
.security-admin__option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
  width: 100%;
  padding: 6px var(--sr-space-2);
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: var(--sr-color-text);
  font-size: var(--sr-text-md);
  text-align: left;
  cursor: pointer;
}
.security-admin__option:hover,
.security-admin__option:focus-visible {
  background: var(--sr-color-surface-hover);
}
.security-admin__option-empty {
  padding: 6px var(--sr-space-2);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.security-admin__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.security-admin__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
  font-size: var(--sr-text-sm);
  cursor: pointer;
}
.security-admin__chip.is-selected {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-weight: var(--sr-weight-semibold);
}
span.security-admin__chip {
  cursor: default;
}
.security-admin__chip-remove {
  display: inline-flex;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.security-admin__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.security-admin__small {
  font-size: var(--sr-text-sm);
}
.security-admin__inline-badge {
  margin-left: 6px;
}
.security-admin__ip {
  font-family: var(--sr-font-mono);
  font-size: var(--sr-text-sm);
  user-select: all;
}
.security-admin__badge--danger {
  background: var(--sr-color-danger-soft);
  color: var(--sr-color-danger);
}
.security-admin__badge--info {
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
}
.security-admin__todo {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.security-admin__ready {
  color: var(--sr-color-success);
  font-size: var(--sr-text-sm);
}
.security-admin__more {
  display: flex;
  justify-content: center;
}
.security-admin__attribution {
  margin: 0;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.security-admin__attribution .admin__link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  font-size: inherit;
  cursor: pointer;
}
.security-admin__select-field {
  width: min(420px, 100%);
}
.security-admin__nowrap {
  white-space: nowrap;
}
.security-admin__cidr-field {
  width: min(280px, 100%);
}

/* ── 읽은 멤버 창 (네이버웍스와 같은 모양 — 직원 테스트 #2) ───────────── */
.read-members {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  width: min(430px, 100vw);
  border-left: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface);
  box-shadow: -6px 0 18px rgb(16 24 40 / 12%);
}
.read-members__header {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: var(--sr-color-panel-header);
  color: var(--sr-color-panel-header-text);
}
.read-members__title {
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
}
.read-members__close {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: inherit;
  opacity: 0.9;
  cursor: pointer;
  transform: translateY(-50%);
}
.read-members__close:hover {
  background: rgb(255 255 255 / 20%);
  opacity: 1;
}
.read-members__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 24px 22px 16px;
}
.read-members__tabs {
  display: flex;
  flex: none;
  gap: 4px;
  padding-left: 2px;
}
.read-members__tab {
  position: relative;
  bottom: -1px;
  min-width: 96px;
  padding: 9px 18px;
  border: 1px solid var(--sr-color-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
  font: inherit;
  font-size: var(--sr-text-md);
  cursor: pointer;
}
.read-members__tab.is-active {
  z-index: 1;
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
}
.read-members__list {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  border: 1px solid var(--sr-color-border);
  border-radius: 0 8px 8px 8px;
  list-style: none;
  scrollbar-gutter: stable;
}
.read-members__empty {
  padding: 40px 16px;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-md);
  text-align: center;
}
.read-members__row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.read-members__row:hover {
  background: var(--sr-color-surface-hover);
}
.read-members__who {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.read-members__name {
  overflow: hidden;
  color: var(--sr-color-text);
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.read-members__sub {
  overflow: hidden;
  font-size: var(--sr-text-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.read-members__rank {
  color: var(--sr-color-read-count);
}
.read-members__dept {
  color: var(--sr-color-read-count-other);
}
.read-members__state {
  flex: none;
  font-size: var(--sr-text-sm);
}
.read-members__state.is-read {
  color: var(--sr-color-read-count);
}
.read-members__state.is-unread {
  color: var(--sr-color-text-subtle);
}

/* ── 기기 승인 (2026-10-07): 로그인 대기 화면 · 보안 알림 카드 · 관리자 → 보안 ───────── */
.device-approval__facts {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: var(--sr-space-2) var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  font-size: var(--sr-text-md);
}
.device-approval__facts > div {
  display: flex;
  gap: var(--sr-space-2);
}
.device-approval__facts dt {
  flex: none;
  width: 56px;
  color: var(--sr-color-text-muted);
}
.device-approval__facts dd {
  margin: 0;
  color: var(--sr-color-text);
  overflow-wrap: anywhere;
}
.device-approval__waiting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}
.device-approval__waiting .countdown {
  margin-left: auto;
}
.device-approval-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
  padding-top: var(--sr-space-1);
}
.device-approval-actions__hint {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.device-approval-actions__status {
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
}
.device-approval-actions__status.is-approved {
  color: var(--sr-color-success);
}
.device-approval-actions__status.is-rejected,
.device-approval-actions__status.is-revoked,
.device-approval-actions__status.is-error {
  color: var(--sr-color-danger);
}
/* 끝난 요청 — 결정할 일이 없으므로 흐리게 */
.device-approval-actions__status.is-expired,
.device-approval-actions__status.is-new {
  color: var(--sr-color-text-muted);
  font-weight: var(--sr-weight-regular);
}
/* 지금 요청이 온 곳 — 승인 판단의 핵심이라 단추 줄 맨 앞에 한 줄로 */
.device-approval-actions__where {
  flex-basis: 100%;
  font-size: var(--sr-text-md);
}
.device-approval-actions__where strong {
  font-weight: var(--sr-weight-semibold);
}
.device-approval__tools {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
}
.office-network__current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
  padding: 6px var(--sr-space-3);
  border: 1px dashed var(--sr-color-border-strong);
  border-radius: var(--sr-radius-md);
  font-size: var(--sr-text-md);
}
.anywhere-access__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.anywhere-access__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
  padding: 6px var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  font-size: var(--sr-text-md);
}
.anywhere-access__item .admin__muted {
  margin-right: auto;
}

/* ─── v30: 업무 알림으로 찾아간 업무 · 수정 이력 · 관리자 권한 · 검색 필터 ─────────────── */

/* 업무 알림을 눌러 찾아간 업무 — 검색 결과로 찾아간 메시지와 같은 강조 */
.task-card.is-focused {
  animation: sr-found 2.4s ease-out;
  border-color: var(--sr-color-primary);
}

/* "수정됨" — 누를 수 있을 때(수정 이력 보기)는 밑줄이 생기는 단추 */
.msg-meta__edited--button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--sr-color-text-subtle);
  font: inherit;
  cursor: pointer;
}
.msg-meta__edited--button:hover,
.msg-meta__edited--button:focus-visible {
  color: var(--sr-color-primary);
  text-decoration: underline;
}

.edit-history {
  max-height: min(60vh, 520px);
  overflow-y: auto;
}
.edit-history__empty {
  margin: 0;
  color: var(--sr-color-text-muted);
}
.edit-history__list {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.edit-history__item {
  padding: var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
}
.edit-history__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
  margin-bottom: var(--sr-space-2);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.edit-history__pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: var(--sr-space-2);
}
.edit-history__arrow {
  margin-top: 22px;
  color: var(--sr-color-text-subtle);
}
.edit-history__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.edit-history__text p {
  margin: 0;
  padding: 6px var(--sr-space-2);
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--sr-text-md);
}
.edit-history__text--old p {
  color: var(--sr-color-text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--sr-color-text-subtle);
}
.edit-history__label {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
/* 첨부를 바꾼 수정 (v0.34) — 뺀 첨부 · 더한 첨부 */
.edit-history__files {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: var(--sr-space-2);
}
.edit-history__file {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  font-size: var(--sr-text-sm);
}
.edit-history__file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.edit-history__file-gone {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}

/* 관리자 → 구성원 수정: 권한(역할) 목록 */
.admin-roles {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
}
.admin-roles__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-roles__desc {
  margin: 0 0 0 26px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.admin-roles__fixed {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  font-size: var(--sr-text-md);
}

/* 관리자 → 메시지 설정 */
.admin-message-policy__title {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  margin: 0;
  font-size: var(--sr-text-lg);
}
.admin-message-policy__choices {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
}
.admin-message-policy__desc {
  margin: 0 0 0 26px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}

/* 통합 검색: 기간 직접 선택 · 나를 멘션한 메시지만 */
.search-panel__dates {
  display: flex;
  align-items: flex-end;
  gap: var(--sr-space-1);
}
.search-panel__dates .sr-input {
  width: 140px;
}
.search-panel__toggle {
  align-self: flex-end;
  padding-bottom: 6px;
}

/*
 * 글 · 표 · 사진 섞은 메시지 (RICH_TEXT — v0.45 대표 확정 2026-11-09 "안 A"): 한 말풍선 안에 넣은 순서대로.
 * 글은 글 메시지 · 표는 표 메시지(넓은 표 · 스크롤 막대) · 사진은 사진 메시지와 같은 모양 (시안 2 왼쪽).
 */
.msg-rich {
  display: flex;
  flex-direction: column;
  /* v0.46 (대표 보고 11-10 · 안 B): 칸 사이 6 → 4px — 입력창에서 쓴 것과 비슷한 간격 */
  gap: 4px;
  min-width: 0;
}
/*
 * 섞은 메시지 안의 표 아래 "크게 보기 · Excel로 복사" (v0.46 — 대표 보고 2026-11-10, 메인 결정 "안 B").
 * 표와 다음 글 사이가 입력창보다 훨씬 벌어졌다 (단추 줄 24px + 위아래 간격). 단추 줄은 표 아래에 두되
 * 테두리 없는 작은 글자 단추로 줄여(16px) 오른쪽에 붙이고 위아래 간격도 줄인다 → 표 끝에서 다음 글까지 34 → 22px.
 * 표만 보낸 말풍선(TABLE)은 예전 그대로 둥근 단추.
 */
.msg-rich .msg-table-wrap {
  gap: 2px;
}
.msg-rich .msg-table-actions {
  gap: 0;
}
.msg-rich .msg-table-copy {
  gap: 3px;
  padding: 0 4px;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  line-height: 16px;
}
.msg-rich .msg-table-copy svg {
  width: 12px;
  height: 12px;
}
.msg-rich .msg-table-copy + .msg-table-copy::before {
  margin-right: 3px;
  color: var(--sr-color-text-subtle);
  content: '·';
}
.msg-rich .msg-table-copy:hover {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
.msg-rich__text,
.msg-rich__table,
.msg-rich__image {
  min-width: 0;
}
.msg-rich__image .msg-image__button.is-pending {
  cursor: default;
}
/* v26 — images (작업 영역별로 파일을 나눠 병합 충돌을 막는다). */

/* ── 사진 묶음(앨범) — 함께 보낸 사진을 말풍선 하나에 격자로 (직원 테스트 #16) ─────── */
.msg-album {
  margin: 0;
}
.msg-album__grid {
  display: grid;
  grid-template-columns: repeat(var(--album-columns, 3), minmax(0, 1fr));
  gap: 2px;
  width: 300px;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--sr-radius-md);
}
.msg-album__cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: none;
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-subtle);
  cursor: zoom-in;
}
.msg-album__cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.12s ease;
}
.msg-album__cell:hover img {
  filter: brightness(0.9);
}
.msg-album__cell:focus-visible {
  outline: 2px solid var(--sr-color-primary);
  outline-offset: -2px;
}
/* 회수·삭제된 사진은 자리만 남긴다 (순서가 바뀌어 보이지 않게). */
.msg-album__cell--deleted {
  padding: 4px;
  outline: 1px dashed var(--sr-color-border-strong, var(--sr-color-border));
  outline-offset: -1px;
  font-size: var(--sr-text-xs);
  font-style: italic;
  text-align: center;
  cursor: default;
}
.msg-album figcaption {
  max-width: 300px;
  margin-top: 4px;
  font-size: var(--sr-text-md);
}

/* 메시지 메뉴 — 하위 메뉴(회수 ▸)가 열려 있는 동안 상위 항목을 눌린 모양으로 둔다. */
.sr-menu__item[data-state='open'] {
  background: var(--sr-color-surface-hover);
}
/* 누를 수 없는 항목 아래에 붙는 짧은 안내 ("사진 위에서 오른쪽 클릭하세요"). */
.msg-menu-hint {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.msg-menu-hint small {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}

/* ── 사진 한 장 크게 보기 (전달 묶음 상세보기 안 사진) ─────────────── */
.image-viewer .sr-spinner {
  border-color: rgb(255 255 255 / 30%);
  border-top-color: #fff;
}
.image-viewer__message {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e5e7eb;
  font-size: var(--sr-text-md);
}

/* ── 사진 보기 창 (직원 테스트 #15 — 네이버웍스의 사진 보기 창과 같은 모양) ─────────── */
/*
 * 화면 전체를 덮는다. 저장 메뉴(sr-menu, 900)·확인 창(800)·알림(1100)보다는 아래에 둬서
 * 창 위에 그것들이 보이게 하고, 떠 있는 창(40~60)들보다는 위에 둔다.
 */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  outline: none;
}
.photo-viewer__titlebar {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 48px;
  background: #1c1c1f;
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
}
.photo-viewer__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-viewer__close {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  padding: 5px;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: #d1d5db;
  transform: translateY(-50%);
}
.photo-viewer__close:hover {
  background: rgb(255 255 255 / 14%);
  color: #fff;
}
.photo-viewer__body {
  position: relative;
  flex: 1;
  min-height: 0;
}
/*
 * 사진이 놓이는 곳. 화면보다 크게 보면 스크롤(휠·끌기)로 옮긴다.
 * 가운데 정렬을 margin:auto로 하는 이유: place-items:center로 가운데에 두면 화면보다 큰 사진의
 * 왼쪽·위쪽이 스크롤로도 닿지 않는 곳으로 잘려 나간다.
 */
.photo-viewer__stage {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: auto;
  overscroll-behavior: contain;
  user-select: none;
}
.photo-viewer__stage.is-pannable {
  cursor: grab;
}
.photo-viewer__stage.is-dragging {
  cursor: grabbing;
}
.photo-viewer__canvas {
  position: relative;
  flex: none;
  margin: auto;
}
.photo-viewer__canvas img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  max-width: none;
  transform-origin: center;
}
.photo-viewer__canvas img.is-loading {
  visibility: hidden;
}
.photo-viewer__message {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e5e7eb;
  font-size: var(--sr-text-md);
  transform: translate(-50%, -50%);
}
.photo-viewer .sr-spinner {
  border-color: rgb(255 255 255 / 30%);
  border-top-color: #fff;
}

/* ‹ › 둥근 넘기기 버튼 */
.photo-viewer__nav {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgb(58 58 62 / 85%);
  color: #fff;
  transform: translateY(-50%);
  transition: background 0.12s ease;
}
.photo-viewer__nav:hover:not(:disabled) {
  background: rgb(82 82 88 / 95%);
}
.photo-viewer__nav:disabled {
  cursor: progress;
}
.photo-viewer__nav--prev {
  left: 28px;
}
.photo-viewer__nav--next {
  right: 28px;
}
.photo-viewer__nav:focus-visible,
.photo-viewer__tool:focus-visible,
.photo-viewer__action:focus-visible,
.photo-viewer__close:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* 가운데 아래 떠 있는 도구 줄 (맞춤 · 축소 · 배율 · 확대 · 회전 · 복사) */
.photo-viewer__toolbar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 10px;
  border-radius: var(--sr-radius-full);
  background: rgb(64 64 68 / 88%);
  box-shadow: 0 6px 18px rgb(0 0 0 / 35%);
  transform: translateX(-50%);
}
.photo-viewer__tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  border: none;
  border-radius: var(--sr-radius-md);
  background: transparent;
  color: #fff;
}
.photo-viewer__tool:hover:not(:disabled) {
  background: rgb(255 255 255 / 14%);
}
.photo-viewer__tool:disabled {
  opacity: 0.4;
}
.photo-viewer__zoom {
  min-width: 46px;
  color: #d1d5db;
  font-size: var(--sr-text-sm);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* 아래 줄: 왼쪽 파일 정보 · 오른쪽 전달 | 저장 | 메시지로 이동 */
.photo-viewer__bottombar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-4);
  height: 48px;
  padding: 0 8px 0 16px;
  background: #1c1c1f;
}
.photo-viewer__info {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.photo-viewer__name {
  overflow: hidden;
  font-size: var(--sr-text-md);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-viewer__meta {
  flex: none;
  color: #9ca3af;
  font-size: var(--sr-text-xs);
}
.photo-viewer__actions {
  display: flex;
  flex: none;
  align-items: center;
}
.photo-viewer__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 16px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: var(--sr-text-md);
}
.photo-viewer__action + .photo-viewer__action {
  border-left: 1px solid rgb(255 255 255 / 18%);
}
.photo-viewer__action:hover:not(:disabled) {
  color: #93c5fd;
}
.photo-viewer__action:disabled {
  opacity: 0.6;
}

/* 좁은 창에서는 파일 정보를 줄여 버튼이 밀려나지 않게 한다. */
@media (max-width: 720px) {
  .photo-viewer__meta {
    display: none;
  }
  .photo-viewer__nav {
    width: 44px;
    height: 44px;
  }
  .photo-viewer__nav--prev {
    left: 10px;
  }
  .photo-viewer__nav--next {
    right: 10px;
  }
}

/* "이미지가 복사 되었습니다." — 사진 가운데에 잠깐 (v0.35, 네이버웍스와 같다). 누르는 것을 막지 않는다. */
.photo-viewer__copied {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  padding: 8px 16px;
  border-radius: var(--sr-radius-md);
  background: rgb(0 0 0 / 72%);
  color: #fff;
  font-size: var(--sr-text-base);
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: photo-viewer-copied 1.6s ease forwards;
}
@keyframes photo-viewer-copied {
  0% {
    opacity: 0;
  }
  10%,
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo-viewer__copied {
    animation: none;
  }
}
/* v26 — rooms (작업 영역별로 파일을 나눠 병합 충돌을 막는다). */

/* ── 대화방 사진 (RoomAvatar) ─────────────────────────────── */

/*
 * 여러 명 방: 참여자 사진을 한 동그라미 안에 최대 4칸으로 나눠 담는다 (네이버웍스 모양).
 * 칸 사이 1px은 바탕색이 비쳐 보이는 틈이다 — 사진끼리 붙어 한 장처럼 보이지 않게.
 * 칸 크기는 minmax(0, 1fr)로 고정한다. 그냥 1fr이면 칸보다 큰 사진(가운데 정렬 후 잘라 냄)이 칸을 넓혀 버린다.
 */
.room-avatar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  flex: none;
  gap: 1px;
  overflow: hidden;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface);
}
.room-avatar__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
/* 칸 안의 사진은 네모로 채운다 (둥근 모서리는 바깥 동그라미가 만든다). */
.room-avatar__cell .sr-avatar {
  border-radius: 0;
}
.room-avatar__cell--full {
  grid-area: 1 / 1 / 3 / 3;
}
.room-avatar__cell--left {
  grid-area: 1 / 1 / 3 / 2;
}
.room-avatar__cell--right {
  grid-area: 1 / 2 / 3 / 3;
}
.room-avatar__cell--top-left {
  grid-area: 1 / 1 / 2 / 2;
}
.room-avatar__cell--top-right {
  grid-area: 1 / 2 / 2 / 3;
}
.room-avatar__cell--bottom-left {
  grid-area: 2 / 1 / 3 / 2;
}
.room-avatar__cell--bottom-right {
  grid-area: 2 / 2 / 3 / 3;
}

/* 공지 채널 · 보안 알림방 · (참여자가 없는) 여러 명 방 아이콘 */
.room-avatar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
}
.room-avatar__icon--notice {
  background: var(--sr-color-warning-soft);
  color: var(--sr-color-warning);
}
.room-avatar__icon--security {
  background: var(--sr-color-danger-soft);
  color: var(--sr-color-danger);
}

/* ── 대화 목록: 사진을 누르면 프로필 · 참여자 ─────────────── */
.room-item__avatar-btn {
  display: inline-flex;
  flex: none;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-full);
  background: transparent;
  cursor: pointer;
}
.room-item__avatar-btn:hover {
  opacity: 0.85;
}

/* ── 숨긴 대화방 창 ──────────────────────────────────────── */
.hidden-rooms {
  display: flex;
  flex-direction: column;
  max-height: 360px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  gap: var(--sr-space-1);
  list-style: none;
}
.hidden-rooms__row {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  padding: var(--sr-space-1) var(--sr-space-2) var(--sr-space-1) 0;
  border-radius: var(--sr-radius-md);
}
.hidden-rooms__row:hover {
  background: var(--sr-color-surface-hover);
}
.hidden-rooms__open {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  padding: var(--sr-space-1) var(--sr-space-2);
  border: none;
  border-radius: var(--sr-radius-md);
  gap: var(--sr-space-3);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.hidden-rooms__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.hidden-rooms__title {
  overflow: hidden;
  font-weight: var(--sr-weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hidden-rooms__time {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}

/* ── 참여자 창: 이름·사진을 누르면 프로필 카드 ───────────────── */
.room-members__who {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: none;
  gap: var(--sr-space-2);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.room-members__who .room-members__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.room-members__line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-members__who:hover .room-members__line {
  text-decoration: underline;
}
/* 네이버웍스 멤버 목록처럼 "직책/직급 부서"를 이름 아래 작게 적는다 */
.room-members__sub {
  overflow: hidden;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-members__rank {
  color: var(--sr-color-primary-text);
}

/* ── 설정: 내 연락처 ──────────────────────────────────────── */
.my-contact {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
}
.my-contact__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sr-space-3);
  max-width: 560px;
}
.my-contact__footer {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
}
.my-contact__saved {
  color: var(--sr-color-success);
  font-size: var(--sr-text-sm);
}

/* ── 참여자 초대: "이전 대화 공개" (v29, 방장 · 방 관리자만) ─────── */
.room-members__history {
  display: flex;
  flex: none;
  flex-direction: column;
  padding: var(--sr-space-2) var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  gap: 2px;
  background: var(--sr-color-surface-2);
}
.room-members__history .sr-checkbox {
  color: var(--sr-color-text);
  font-weight: var(--sr-weight-semibold);
}
.room-members__history-hint {
  margin: 0;
  padding-left: calc(16px + var(--sr-space-2));
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}

/* ── 방 관리자 · 방장 · 대화방 사진 (v30) ──────────────────────── */
/* 방장 표시는 방 관리자와 구분되게 따뜻한 색으로 (둘 다 파란색이면 누가 방장인지 한눈에 안 보인다). */
.room-members__role--owner {
  background: var(--sr-color-warning-soft);
  color: var(--sr-color-warning);
}
/* 대화 목록 · 머리글의 대화방 사진 — 참여자 사진 묶음과 같은 자리 크기 */
.room-avatar__photo {
  display: inline-flex;
  flex: none;
}
.room-members__photo {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
  margin-bottom: var(--sr-space-3);
  padding: var(--sr-space-2) var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
}
.room-members__photo-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.room-members__photo-title {
  font-weight: var(--sr-weight-semibold);
}
.room-members__photo-hint {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.room-members__photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-2);
  margin-top: var(--sr-space-1);
}
/* v26 — conversation (작업 영역별로 파일을 나눠 병합 충돌을 막는다). */

/* 대화 맨 위 찾기 줄 (Ctrl+F) — 네이버웍스처럼 대화방 이름 바로 아래에 붙는다. */
.find-bar {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--sr-space-1);
  padding: 6px var(--sr-space-4);
  border-bottom: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface);
}
.find-bar__field {
  flex: 1;
  min-width: 0;
}
/* 결과 위치("3/12")가 바뀌어도 단추가 좌우로 흔들리지 않게 자리를 고정한다. */
.find-bar__status {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  min-width: 72px;
  padding: 0 var(--sr-space-1);
}
.find-bar__count {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.find-bar__count--empty {
  color: var(--sr-color-text-subtle);
}
.find-bar__count--error {
  color: var(--sr-color-danger);
}

/* ── 대화창 배경 색 (배경 바꾸기 — 직원 테스트 v27 #5) ─────────────────────
 * 팔레트는 여기 한 곳에서만 정한다. 서버에는 색 이름(키)만 저장되므로 색을 다듬어도 저장된 값은 그대로다.
 * 키 목록: @srise/contracts ROOM_BACKGROUND_COLORS · 이름: features/chat/room-background.ts
 * 휴대폰 앱은 apps/mobile/src/ui/theme.ts의 roomBackgrounds (같은 키 · 밝은 화면 색과 같은 값).
 * 고른 방의 대화창(.conversation__main[data-room-bg])에서 메시지가 오가는 칸에만 칠한다 — 입력창은 그대로.
 */
:root {
  --room-bg-white: #ffffff;
  --room-bg-sand: #ede8e1;
  --room-bg-sage: #dfe8dc;
  --room-bg-lavender: #e3e0f0;
  --room-bg-rose: #f0dfe2;
  --room-bg-sky: #dbe5ef;
  --room-bg-slate: #ccd7e4;
  --room-bg-mauve: #e2d5e0;
}
/* 어두운 화면: 같은 색 느낌을 아주 어둡게 (말풍선·글자가 묻히지 않게 말풍선보다 어둡게 둔다). */
:root[data-theme='dark'] {
  --room-bg-white: var(--sr-color-conversation-bg);
  --room-bg-sand: #201d19;
  --room-bg-sage: #18211b;
  --room-bg-lavender: #1d1b2a;
  --room-bg-rose: #261b20;
  --room-bg-sky: #16202b;
  --room-bg-slate: #1b2534;
  --room-bg-mauve: #231a24;
}
.conversation__main[data-room-bg='white'] .message-list {
  background: var(--room-bg-white);
}
.conversation__main[data-room-bg='sand'] .message-list {
  background: var(--room-bg-sand);
}
.conversation__main[data-room-bg='sage'] .message-list {
  background: var(--room-bg-sage);
}
.conversation__main[data-room-bg='lavender'] .message-list {
  background: var(--room-bg-lavender);
}
.conversation__main[data-room-bg='rose'] .message-list {
  background: var(--room-bg-rose);
}
.conversation__main[data-room-bg='sky'] .message-list {
  background: var(--room-bg-sky);
}
.conversation__main[data-room-bg='slate'] .message-list {
  background: var(--room-bg-slate);
}
.conversation__main[data-room-bg='mauve'] .message-list {
  background: var(--room-bg-mauve);
}
/*
 * 색 바탕 위에서도 말풍선·글자가 또렷하게 (흰색은 기본 모양 그대로).
 *  - 남의 말풍선은 흰색으로 (회색 말풍선은 색 바탕에 묻힌다)
 *  - 말풍선 가장자리에 옅은 그림자 (내 하늘색 말풍선이 하늘색 계열 바탕에서도 보이게)
 *  - 시각 같은 흐린 글자는 한 단계 진하게, 구분선은 바탕에 맞춰 반투명으로
 */
.conversation__main[data-room-bg]:not([data-room-bg='white']) .message-list {
  --sr-color-bubble-other: #ffffff;
  --sr-color-text-subtle: var(--sr-color-text-muted);
  --sr-color-border: rgb(32 33 36 / 12%);
}
.conversation__main[data-room-bg]:not([data-room-bg='white']) .msg__bubble:not(.is-withdrawn) {
  box-shadow: 0 1px 2px rgb(16 24 40 / 10%);
}
:root[data-theme='dark']
  .conversation__main[data-room-bg]:not([data-room-bg='white'])
  .message-list {
  --sr-color-bubble-other: #2b3444;
  --sr-color-border: rgb(255 255 255 / 12%);
}

/* 배경 바꾸기 창 — 네이버웍스처럼 파란 제목 줄 + 색 2줄 × 4칸 */
.sr-dialog:has(.room-bg-dialog) {
  width: min(360px, calc(100vw - 32px));
  padding-top: 0;
  overflow: hidden;
}
.room-bg-dialog__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  /* 대화상자 안쪽 여백을 넘어 위·양옆 끝까지 채운다 */
  margin: 0 calc(-1 * var(--sr-space-6)) var(--sr-space-5);
  background: var(--sr-color-panel-header);
  color: var(--sr-color-panel-header-text);
  font-size: var(--sr-text-base);
  font-weight: var(--sr-weight-semibold);
}
.room-bg-dialog__close {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transform: translateY(-50%);
}
.room-bg-dialog__close:hover {
  background: rgb(255 255 255 / 20%);
}
.room-bg-dialog__swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.room-bg-swatch {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 0;
  /* 흰색 칸도 보이도록 옅은 테두리를 둔다. 고르면 파란 테두리. */
  border: 1px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-md);
  color: var(--sr-color-primary);
  cursor: pointer;
}
.room-bg-swatch:hover {
  border-color: var(--sr-color-primary);
}
.room-bg-swatch.is-selected {
  border-color: var(--sr-color-primary);
  box-shadow: 0 0 0 2px var(--sr-color-primary);
}
.room-bg-swatch:focus-visible {
  outline: 2px solid var(--sr-color-focus);
  outline-offset: 2px;
}
.room-bg-swatch[data-room-bg='white'] {
  background: var(--room-bg-white);
}
.room-bg-swatch[data-room-bg='sand'] {
  background: var(--room-bg-sand);
}
.room-bg-swatch[data-room-bg='sage'] {
  background: var(--room-bg-sage);
}
.room-bg-swatch[data-room-bg='lavender'] {
  background: var(--room-bg-lavender);
}
.room-bg-swatch[data-room-bg='rose'] {
  background: var(--room-bg-rose);
}
.room-bg-swatch[data-room-bg='sky'] {
  background: var(--room-bg-sky);
}
.room-bg-swatch[data-room-bg='slate'] {
  background: var(--room-bg-slate);
}
.room-bg-swatch[data-room-bg='mauve'] {
  background: var(--room-bg-mauve);
}

/* ── 입력창 높이 조절 (네이버웍스처럼 경계의 "…"를 위아래로 끈다 — 직원 테스트 v27 #13) ─────
 * 높이는 ComposerDock이 --composer-input-height로 넘긴다. 입력칸의 최소 높이만 바꾸므로
 * 글이 더 길면 지금처럼 입력칸 안에서 스크롤된다. (최소 높이는 최대 높이보다 우선한다)
 */
.composer-dock {
  display: flex;
  flex: none;
  flex-direction: column;
  background: var(--sr-color-conversation-bg);
}
/* 손잡이가 위 여백 자리를 대신한다 (입력 영역이 손잡이만큼 커지지 않게). */
.composer-dock .composer {
  padding-top: 0;
}
.composer-dock .composer__input {
  min-height: var(--composer-input-height, 52px);
}
.composer-resizer {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 10px;
  border-top: 1px solid var(--sr-color-border);
  color: var(--sr-color-text-subtle);
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
}
.composer-resizer:hover,
.composer-resizer:active {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
}
.composer-resizer:focus-visible {
  outline: 2px solid var(--sr-color-focus);
  outline-offset: -2px;
}
/*
 * 퇴사 구성원 표시 · 정리 카드 · 영구 삭제 확인 창 (v0.41 — 대표 승인 초안 "안 A").
 * 색은 모두 공용 토큰(tokens.css)만 쓴다 — 어두운 화면에서도 같은 뜻으로 보인다.
 */

/* 이름 뒤 회색 말 — "홍길동 (퇴사)" · "홍길동(삭제된 구성원)" */
.departed-suffix {
  color: var(--sr-color-text-subtle);
  font-weight: var(--sr-weight-semibold);
}
/* 목록 · 참여자 · 보낸 사람 이름 뒤 작은 회색 "퇴사" 표 */
.departed-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
  line-height: 1.6;
  vertical-align: 1px;
}
/* 대화 목록에서 퇴사자 방 이름은 흐리게 */
.room-item__title.is-departed {
  color: var(--sr-color-text-subtle);
}

/* 입력칸 자리 회색 칸 — "퇴사한 구성원입니다. 메시지를 보낼 수 없습니다." (네이버웍스 "삭제된 구성원입니다."와 같은 자리) */
.composer--departed {
  padding: var(--sr-space-3) var(--sr-space-4);
  border-top: 1px solid var(--sr-color-border);
}
.composer--departed .composer__departed-box {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 var(--sr-space-3);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-md);
}

/* 막 퇴사한 사람에게 보내다 막힘 — "⛔ 퇴사한 구성원이라 보내지 못했습니다" (다시 보내기 없음) */
.msg-meta--departed {
  color: var(--sr-color-danger);
  font-size: var(--sr-text-xs);
}

/* ── "관리자 알림" 방의 정리 카드 ─────────────────────────── */
.departed-card {
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-sm);
  font-size: var(--sr-text-md);
}
.departed-card__head {
  padding: 9px 14px;
  background: var(--sr-color-text-muted);
  color: var(--sr-color-surface);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
}
.departed-card__body {
  padding: 12px 14px;
  line-height: 1.65;
}
.departed-card__question {
  margin: 0;
  overflow-wrap: anywhere;
}
.departed-card__bullets {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.departed-card__people {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.departed-card__people li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
  padding-top: 6px;
  border-top: 1px solid var(--sr-color-border);
}
.departed-card__person {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.departed-card__people li > :not(.departed-card__person) {
  flex: none;
  white-space: nowrap;
}
.departed-card__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 14px 12px;
}
.departed-card__state {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
}

/* ── 영구 삭제 확인 창 ─────────────────────────────────────── */
.departed-confirm__title {
  margin: 0 0 8px;
  color: var(--sr-color-danger);
  font-size: var(--sr-text-lg);
}
.departed-confirm__list {
  margin: 0 0 10px;
  padding-left: 18px;
  line-height: 1.7;
}
.departed-confirm__warn {
  margin: 0 0 10px;
  color: var(--sr-color-danger);
  font-weight: var(--sr-weight-bold);
}
.departed-confirm__blocked {
  margin: 0 0 10px;
  color: var(--sr-color-text-muted);
}
.departed-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
/*
 * 이모지 그림 (v0.46 대표 확정 시안 A · Fluent Emoji 3D — 2026-11-11). 그리는 코드는 lib/emoji-image.tsx.
 *
 * 그림은 이모지 글자를 품은 칸의 배경이다 — 칸 안의 글자는 투명하게 남겨 복사 · 고른 부분 복사 · 찾기가 글자 그대로 된다.
 *  - 글 속: 18px (본문 14px — 대표 확정 14 → 18px)
 *  - 이모지만 1~3개 보낸 메시지: 36px, 말풍선 없이 (.msg-jumbo)
 *  - 반응 단추: 18px · 고르기 판: 19px (판 크기는 그대로)
 *  - 입력창 서식 층: 1.3em — 입력칸(textarea)의 "이모지 자리" 글꼴 폭과 같아야 커서가 어긋나지 않는다 (아래 @font-face)
 * 목록 밖의 이모지는 예전처럼 기기 글꼴로 보인다.
 */
.emoji-img {
  display: inline-block;
  width: 18px;
  height: 18px;
  overflow: hidden;
  /* 14px 글 줄(21px)의 가운데쯤 — 글자 바닥선보다 조금 아래까지 */
  vertical-align: -4px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
}
/* 글자는 남겨 두되 보이지 않게 (컬러 이모지 글꼴은 color: transparent가 듣지 않는다) */
.emoji-img__char {
  opacity: 0;
}
/* 고른 부분이 그림 위에도 보이게 */
.emoji-img::selection,
.emoji-img__char::selection {
  background: var(--sr-color-focus);
}

/* 이모지만 1~3개 보낸 메시지 — 36px, 말풍선 바탕 없이 (메뉴 · 반응 · 시각은 그대로) */
.msg__bubble.is-jumbo {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.conversation__main[data-room-bg] .msg__bubble.is-jumbo:not(.is-withdrawn) {
  box-shadow: none;
}
/*
 * 답장으로 보낸 크게 보이기 — 인용은 위에 작은 말풍선, 그 아래 36px 이모지 (휴대폰 · 이모티콘 답장과 같은 모양).
 * 말풍선 안에서 인용과 본문을 가르던 가는 줄 대신 인용 자체가 말풍선 바탕을 가진다.
 */
.msg__bubble.is-jumbo.has-reply {
  align-items: flex-start;
}
.msg--mine .msg__bubble.is-jumbo.has-reply {
  align-items: flex-end;
}
.msg__bubble.is-jumbo .msg-reply {
  align-self: stretch;
  margin: 0 0 4px;
  padding: 8px 12px;
  border-bottom: none;
  border-radius: 14px;
  background: var(--sr-color-bubble-other);
  color: var(--sr-color-bubble-other-text);
}
.msg--mine .msg__bubble.is-jumbo .msg-reply {
  background: var(--sr-color-bubble-mine);
  color: var(--sr-color-bubble-mine-text);
}
.msg--other.msg--group-start .msg__bubble.is-jumbo .msg-reply {
  border-top-left-radius: 4px;
}
.msg--mine.msg--group-start .msg__bubble.is-jumbo .msg-reply {
  border-top-right-radius: 4px;
}
.conversation__main[data-room-bg]:not([data-room-bg='white']) .msg__bubble.is-jumbo .msg-reply {
  box-shadow: 0 1px 2px rgb(16 24 40 / 10%);
}
.msg-jumbo {
  display: inline-block;
  line-height: 40px;
}
.emoji-img--jumbo {
  width: 36px;
  height: 36px;
  vertical-align: top;
  margin-top: 2px;
  line-height: 36px;
}

/* 반응 단추 (유니코드 이모지 반응) — 18px */
.emoji-img--reaction {
  vertical-align: middle;
}

/* 고르기 판 — 칸 크기(32px)는 그대로, 그림 19px */
.emoji-img--picker {
  width: 19px;
  height: 19px;
  vertical-align: middle;
}

/*
 * 입력창 — 글 칸(textarea)과 서식 층이 이모지에 **같은 폭(1.3em)** 을 쓰게 하는 빈 글꼴.
 * scripts/emoji/build-emoji-space-font.py가 만든다 (78개 이모지 폭 1.3em · VS16 폭 0).
 * 피부색 · ZWJ · VS15 · 키캡은 넣지 않는다 — 그런 글자 묶음(👍🏻 · 🙇‍♂️ · ❤️‍🔥 · ❤︎ · 1️⃣)은 Chromium이 통째로 기기 이모지
 * 글꼴로 그려 글 칸 · 서식 층이 똑같이 보인다 (v0.46 독립 점검, v47-emoji E2E가 폭 · 보임을 잰다).
 * unicode-range로 이 글자들에만 쓰인다 → 다른 글자 · 줄 높이 · 바닥선은 예전 글꼴 그대로.
 * 앱 안에 들어 있다 (인터넷에서 받지 않는다). 처음 그릴 때 글꼴이 늦게 와 폭이 한 번 바뀌지 않게 block.
 */
@font-face {
  font-family: 'SRISE Emoji Space';
  font-display: block;
  src: url('data:font/woff2;base64,d09GMgABAAAAAAVgAAwAAAAADkwAAAUOAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIoYaIxIGYACIFAocgVoBNgIkA4JAC4EiAAQgBX4HhV4bjw1VIbBxgPHNvBni/6/JrRiqnQBZ9ltGILFWP4dR6C49Jfo8k24BLzGy4CBJJAQ3HIbTJwkOLkbv4W5WtVfmlKfxV6Lxr/53CwrQzXtMAnFHrctSCmKMtYdKIzJEprs1sWwvIgTN7cb2YeByMwgiYrKsFps5mEzGFQMAevi53ZtUWp9+kwmEGGkKHkheEQABjMt72fNrUsorbU1IWwP7Mpyp0gb/8PfuNCyNPrX/QkkksAymBhZJ4GPdd/+ufCitbwRq7Gz9j4Bossr0/MP1adcyz++0aAM81L2mv9Hup43QzqN0jwWtdSp1x1MsGMZQ69c9CldFjunEDghP/WyzcSuqjEA61BnboFf06L9egX8Y0PsfkAGRoQEZGZKxEZkYk6kJmZmSuRlZmJOlBVlZkrUVMazJhkG2G2JuxTLFtsSxxXXEc8X3JPAlDCQKJY4kiSVNJEslz6TIpSykKqWupKmlbaRrpe9k18t+J4e9HA9yOsr5JJezXC9yu8r9Jo+7PB/yesr7JZ+3fD/y+8rfTxHW9Wwb2TdzbOXcjtmJNXFWvJPgJQZJUXKSkqUWaVV6k6vLfclzy/uIwABGMIEZKJ6AKZiBOViAJViBNTDABmzBBAtscMAFD3wIIIQIYkgghQxyKKCECmpooIUOetjBHg5whBOc4QJXuMEdHvCEF7zhA1/4TcKCFRt2HDhhYMGBhwAREmQoUKFBhwtueOAFEBH4AIAxaDZRDv6vZwe7vhChQf78vzOO3wA4foOIUnaj3npqAqwp/AenOeOXzseu1R1HXOMWz/F9/Jxf5Lc/f9wJppue3Wsf+53g3p07WXob9giarPdiQpZNAURbADBCaOwkR/SC9BG9IW1iAREhViEFYhMkRKxBksRmSIvYDhEj1iFypBbIMKkN0uQfYErvZWJM71ViVN9ZQkbfMzKi7yfpkho61KSx8HEEpAlCQJoiItIWMSDtEjHpmKhKJzq6pdPgM8hIF+GXUJauSEm6IRLSHSlKL6QhvZK89Es6FDQ66grmcAsMKkQIKYUY0atQJsYVtokeGYKGLCD0slCHgiwKFwMtWUI4ZQVhkpU6DLI6XAPMspawyXrCIQcIrxwkVOQw4ZEzhEvOEkpygXDLLcIoDxEpeZyIylOEkLxBdMp7RL+KDzKp4pNMqDITdlUOIqHKQ4RVJQirqhzhV1Uj0qpmCJ+qf6Km+uMPL+IA0wCbIABiIAEAagACMI94FK30i55uEQAB5o47+dfLH/xFUUVf1hGu+0PEAAABHqNzS8aIJkkd8COfDri8SgAEYNoQARCO6j2sCICAeYLLo4ZtgzSsYsnCMjXADBvrT76ZHG8+vX3zYk7+K5nfAdeunLt2bNGxDz55641F1z578OSFKy+88sN7D74aQH/NaQT9lFNJ0dZIo4013kSTTTXdTLPNmZbtuJ4fhFGcpFlelFXdtF2/2x+Op/Plers/nq/35/srL+u2H6exzoeYcqmtX/fzfn9BH17VZrOueyDI5oaFU7zXNxjry5+HcB04AT6mhmQu1QmeeOqxW1LhU3rP6VbCXh2DZK1zWtck2hMJrQImA4mcNaqXVV/7qs/rcztredYgqkwNR1WzSq3FiVZKv9SMlb0oWRpoT41aije1gvfn3OJSIHfEuPIsI4Mo5w6sfjZEHBAnjVHf0O7GtcHKtk15UYrVbmscNsaKskFdIyXPJafkbJjEDmLAUtvUuUMLAAA=') format('woff2');
  unicode-range:
    U+23F0, U+2699, U+26A0, U+2705, U+2709, U+270C, U+270D, U+274C, U+2757, U+2764, U+2B50, U+2B55,
    U+FE0F, U+1F195, U+1F197, U+1F389, U+1F3C6, U+1F3E2, U+1F440, U+1F44B, U+1F44C, U+1F44D,
    U+1F44F, U+1F4A1, U+1F4AA, U+1F4B0, U+1F4BB, U+1F4C5, U+1F4C6, U+1F4C8, U+1F4C9, U+1F4CA,
    U+1F4CC, U+1F4CE, U+1F4DD, U+1F4DE, U+1F4E6, U+1F50D, U+1F514, U+1F515, U+1F525, U+1F527,
    U+1F534, U+1F5A8, U+1F600, U+1F601, U+1F602, U+1F603, U+1F604, U+1F605, U+1F609, U+1F60A,
    U+1F60C, U+1F60D, U+1F60E, U+1F610, U+1F621, U+1F622, U+1F624, U+1F62D, U+1F62E, U+1F631,
    U+1F642, U+1F647, U+1F64C, U+1F64F, U+1F69A, U+1F6AB, U+1F7E1, U+1F7E2, U+1F914, U+1F919,
    U+1F91D, U+1F929, U+1F92F, U+1F937, U+1F972, U+1F9FE, U+1FAE1;
}
.composer__mirror,
.composer__input {
  font-family: 'SRISE Emoji Space', var(--sr-font-sans);
}
.emoji-img--draft {
  width: 1.3em;
  height: 1.3em;
  vertical-align: -0.3em;
  line-height: 1.3em;
}
/* 창 여러 개 (Windows 앱 — 대화방 새 창 · 사진 보기 창, v27 #6 · #8) */

/* ── 대화방 새 창: 대화 화면 하나가 창 전체를 채운다 ── */
.room-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: var(--sr-color-bg);
}
.room-window__content {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/*
 * 좁은 새 창(기본 420px)에서 "대화 내 검색 · 파일" 곁 패널을 옆에 붙이면 대화가 거의 안 보인다.
 * 창이 좁으면 곁 패널을 대화 위에 덮어 띄운다 (닫으면 대화가 그대로 보인다).
 */
@media (max-width: 759px) {
  .room-window .conversation__split {
    position: relative;
  }
  .room-window .room-panel {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 20;
    width: min(340px, 100%);
    box-shadow: var(--sr-shadow-lg, 0 8px 24px rgb(0 0 0 / 18%));
  }
}

/* ── 사진 보기 창: 검은 바탕 전체가 사진 보기 ── */
.viewer-window {
  height: 100%;
  background: #000;
  color: #fff;
}
.viewer-window__notice {
  color: #fff;
}
.viewer-window__notice .sr-spinner {
  border-color: rgb(255 255 255 / 30%);
  border-top-color: #fff;
}
.viewer-window__message {
  display: inline-flex;
  align-items: center;
  gap: var(--sr-space-2);
  margin: 0;
}
/* 반복 메시지 (v32) — 만들기 · 고치기 창, 목록, 보낸 기록, 말풍선의 작은 "반복 메시지" 표시 */

/* 말풍선 시각 옆 작은 회색 글자 ("수정됨"과 같은 자리 · 같은 색) */
.msg-meta__recurring {
  color: var(--sr-color-text-subtle);
}

.recurring-form {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
}
.recurring-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  font-size: var(--sr-text-sm);
}
.recurring-form__label {
  padding: 0;
  color: var(--sr-color-text-muted);
  font-weight: 600;
}
.recurring-form__text-wrap {
  position: relative;
}
.recurring-form__text {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}
/* 자동완성은 입력칸 아래로 (창 위쪽이 잘리지 않게) */
.recurring-form__mentions {
  top: calc(100% + 4px);
  bottom: auto;
}
.recurring-form__note,
.recurring-form__muted {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
}
.recurring-form__error {
  color: var(--sr-color-danger);
}
.recurring-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-3);
}
.recurring-form__end {
  display: flex;
  align-items: center;
  gap: 4px;
}
.recurring-form__days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.recurring-form__days--month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.recurring-day {
  min-width: 40px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
  font: inherit;
  cursor: pointer;
}
.recurring-day.is-weekend {
  color: var(--sr-color-danger);
}
.recurring-day:hover:not(:disabled) {
  border-color: var(--sr-color-primary);
}
.recurring-day[aria-pressed='true'] {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-primary);
  color: var(--sr-color-text-inverse);
  font-weight: 700;
}
.recurring-day:focus-visible {
  outline: 2px solid var(--sr-color-focus);
  outline-offset: 1px;
}
.recurring-day--wide {
  grid-column: span 2;
}
.recurring-form__holiday {
  gap: 4px;
}
.recurring-form__preview {
  display: flex;
  align-items: flex-start;
  gap: var(--sr-space-2);
  padding: var(--sr-space-3);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-text);
  font-size: var(--sr-text-sm);
}
.recurring-form__following {
  margin: 4px 0 0;
  padding: 0;
  color: var(--sr-color-text-muted);
  list-style: none;
}

/* 목록 */
.recurring-list,
.recurring-runs {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  max-height: 440px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.recurring-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
}
.recurring-item.is-paused {
  border-color: var(--sr-color-warning);
}
.recurring-item.is-ended {
  opacity: 0.75;
}
.recurring-item__head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--sr-color-text-muted);
}
.recurring-item__summary {
  color: var(--sr-color-text);
  font-weight: 600;
}
.recurring-item__room {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
  font-weight: 600;
}
.recurring-item__state {
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-sm);
}
.recurring-item__state.is-paused {
  color: var(--sr-color-warning);
}
.recurring-item__period {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.recurring-item__text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.recurring-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.recurring-chip {
  padding: 1px 8px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-xs);
  font-weight: 700;
}
.recurring-chip.is-paused {
  background: var(--sr-color-warning-soft);
  color: var(--sr-color-warning);
}
.recurring-chip.is-ended {
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
}
.recurring-run {
  display: flex;
  width: 100%;
  gap: var(--sr-space-3);
  padding: var(--sr-space-2) var(--sr-space-3);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  color: inherit;
  font: inherit;
  font-size: var(--sr-text-sm);
  text-align: left;
}
.recurring-run:not(:disabled) {
  cursor: pointer;
}
.recurring-run:hover:not(:disabled) {
  border-color: var(--sr-color-primary);
}
.recurring-run:disabled {
  cursor: default;
}
.recurring-run time {
  flex: none;
  color: var(--sr-color-text-muted);
}
.recurring-run.is-skipped,
.recurring-run.is-failed {
  color: var(--sr-color-warning);
}
/* 날짜 31칸 + 말일 — 창이 너무 길어지지 않게 조금 낮게 */
.recurring-form__days--month .recurring-day {
  height: 30px;
}

/* 관리자 화면 "반복 메시지" (v32 보완 — 회사 전체) */
.admin-recurring__table .recurring-chip {
  display: inline-block;
  white-space: nowrap;
}
.admin-recurring__reason {
  margin-top: 2px;
  font-size: var(--sr-text-xs);
}
.admin-recurring__when,
.admin-recurring__actions {
  white-space: nowrap;
}
/* ERP 업무 알림 (v32) — "ERP 알림" 방의 카드 · 대화 목록 아이콘 · 관리자 "ERP 연동" */

/* 카드 — 보안 알림 카드와 같은 자리 · 크기 (가운데, 최대 560px) */
.erp-alert-row {
  display: flex;
  justify-content: center;
  padding: var(--sr-space-2) var(--sr-space-6);
}
.erp-alert {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-2);
  width: min(560px, 100%);
  padding: var(--sr-space-3) var(--sr-space-4);
  border: 1px solid var(--sr-color-border);
  border-left: 4px solid var(--sr-color-primary);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-sm);
  font-size: var(--sr-text-md);
}
.erp-alert__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.erp-alert__badge {
  padding: 1px 7px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary);
  color: var(--sr-color-text-inverse);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
  letter-spacing: 0.02em;
}
.erp-alert__chip {
  padding: 1px 7px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}
.erp-alert__chip.is-private {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
}
.erp-alert__time {
  margin-left: auto;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
  white-space: nowrap;
}
.erp-alert__title {
  font-weight: var(--sr-weight-bold);
  overflow-wrap: anywhere;
  user-select: text;
}
/* 줄바꿈 그대로 · 긴 주소도 카드 안에서 줄을 바꾼다 */
.erp-alert__text {
  margin: 0;
  color: var(--sr-color-text);
  white-space: pre-line;
  overflow-wrap: anywhere;
  user-select: text;
}
.erp-alert__actions {
  display: flex;
  gap: var(--sr-space-2);
  padding-top: var(--sr-space-1);
}
.erp-alert__blocked {
  margin: 0;
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-sm);
  overflow-wrap: anywhere;
  user-select: text;
}

/* ERP 보안 알림 (v33) — 왼쪽 띠 · 심각도 표시는 보안 알림방 카드와 같은 색 (긴급 빨강 · 경고 주황 · 정보 회색) */
.erp-alert--security.is-critical {
  border-left-color: var(--sr-color-danger);
}
.erp-alert--security.is-warning {
  border-left-color: var(--sr-color-warning);
}
.erp-alert--security.is-info {
  border-left-color: var(--sr-color-border-strong);
}
.erp-alert__badge--security {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--sr-color-text-muted);
}
.erp-alert__severity {
  padding: 1px 7px;
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  font-weight: var(--sr-weight-semibold);
}
.erp-alert__severity.is-critical {
  background: var(--sr-color-danger-soft);
  color: var(--sr-color-danger);
}
.erp-alert__severity.is-warning {
  background: var(--sr-color-warning-soft);
  color: var(--sr-color-warning);
}
.erp-alert--security .erp-alert__chip {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
}

/* 대화 목록 · 머리글의 "ERP 알림" 방 아이콘 */
.room-avatar__icon--erp {
  background: var(--sr-color-primary-soft);
  color: var(--sr-color-primary-text);
}

/* 관리자 → ERP 연동 */
.admin-erp__summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sr-space-3);
}
.admin-erp__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
  padding: var(--sr-space-3) var(--sr-space-4);
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
}
.admin-erp__stat-label {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.admin-erp__stat-value {
  font-size: var(--sr-text-lg);
  font-weight: var(--sr-weight-semibold);
}
.admin-erp__stat-value.is-off {
  color: var(--sr-color-danger);
}
.admin-erp__status.is-rejected {
  color: var(--sr-color-danger);
  font-weight: var(--sr-weight-semibold);
}
.admin-erp__when {
  white-space: nowrap;
}

/* 관리자 → ERP 연동 → ERP 보안 알림 (v33) — 업무 알림 아래에 같은 모양으로 */
.admin-erp__security {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-3);
  margin-top: var(--sr-space-6);
  padding-top: var(--sr-space-4);
  border-top: 1px solid var(--sr-color-border);
}
.admin-erp__heading {
  margin: 0;
  font-size: var(--sr-text-lg);
  font-weight: var(--sr-weight-semibold);
}
/* v27 — 대화방 콘텐츠 창 · 파일 아이콘 · 답장 인용 그림 · 표 수정 (작업 영역별 파일 — 병합 충돌 방지). */

/* 파일 종류 아이콘(확장자 글자 · 종류 색)은 file-type.css (v0.42 — 앱 전체가 같은 모양) */

/* ── 사진·동영상 작은 그림 ───────────────────────────────── */
.media-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
}
.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-thumb--video {
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  background: #1f2633;
  color: #fff;
}
.media-thumb__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--sr-radius-full);
  background: rgb(255 255 255 / 22%);
}
.media-thumb__name {
  max-width: 100%;
  overflow: hidden;
  font-size: var(--sr-text-xs);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ── 콘텐츠 창 (네이버웍스처럼 하늘색 제목 줄) ─────────────── */
/* 떠 있는 작은 창(40)·읽은 멤버(45)보다 위, 사진 보기(60·700)·대화상자(800~)보다 아래. */
.contents-window {
  position: fixed;
  top: calc(var(--sr-header-height) + 12px);
  left: 50%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(920px, calc(100vw - 48px));
  height: min(680px, calc(100vh - var(--sr-header-height) - 36px));
  overflow: hidden;
  border: 1px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-lg);
  background: var(--sr-color-surface);
  box-shadow: var(--sr-shadow-lg, 0 12px 32px rgb(0 0 0 / 22%));
  transform: translateX(-50%);
}
/* 내려 둔 창은 오른쪽 아래에 제목 줄만 남긴다 — 대화를 가리지 않게. */
.contents-window.is-minimized {
  top: auto;
  right: 24px;
  bottom: 24px;
  left: auto;
  width: 300px;
  height: auto;
  transform: none;
}
/*
 * 제목 줄을 끌어 창을 옮긴다 (v0.40 — useWindowDrag). 옮기기 표시 커서 · 제목 글자는 골라지지 않게
 * (두 번 눌러도 낱말이 파랗게 골라지지 않는다) · 터치 화면에서는 끌기가 화면 밀기로 새지 않게.
 * 단추(창 내리기 · 끄기)는 손가락 커서 그대로 — 아래 .contents-window__button.
 */
.contents-window__header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2);
  padding: 8px 8px 8px 16px;
  background: #51a7ff;
  color: #fff;
  cursor: move;
  user-select: none;
  touch-action: none;
}
/* 끄는 동안에는 창 안 글자도 골라지지 않게 */
.contents-window.is-dragging {
  user-select: none;
}
.contents-window__title {
  overflow: hidden;
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.contents-window__buttons {
  display: flex;
  flex: none;
  gap: 2px;
}
.contents-window__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-sm);
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.contents-window__button:hover {
  background: rgb(255 255 255 / 22%);
}
.contents-window__button--close:hover {
  background: var(--sr-color-danger, #d33);
}
.contents-window__button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}
/* "새 창으로" (v0.46 — 따로 된 Windows 창으로 옮기기). 글자를 함께 보여 무엇을 하는 단추인지 바로 알게. */
.contents-window__button--popout {
  gap: 4px;
  width: auto;
  padding: 0 8px;
  font-size: var(--sr-text-sm);
  font-weight: var(--sr-weight-semibold);
  white-space: nowrap;
}
.contents-window__button--popout:disabled {
  opacity: 0.6;
  cursor: progress;
}
/*
 * 따로 된 콘텐츠 창(v0.46 — ContentsWindowShell) 안: 창 전체를 채운다. 옮기기 · 최소화 · 닫기는 Windows 창 틀이 맡으므로
 * 떠 있는 창의 테두리 · 그림자 · 옮기기 커서는 없앤다. 하늘색 제목 줄(방 이름)은 앱 안의 창과 같게 남긴다.
 */
.contents-os-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: var(--sr-color-surface);
}
.contents-os-window__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.contents-window.is-standalone {
  position: static;
  flex: 1;
  width: 100%;
  height: auto;
  min-height: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
.contents-window.is-standalone .contents-window__header {
  cursor: default;
  touch-action: auto;
}
.contents-window__bar {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-2) var(--sr-space-4);
  padding: var(--sr-space-2) var(--sr-space-4);
  border-bottom: 1px solid var(--sr-color-border);
}
.contents-window__search {
  flex: 0 1 300px;
  min-width: 200px;
}
.contents-window__body {
  flex: 1;
  min-height: 0;
  padding: var(--sr-space-2) var(--sr-space-4) var(--sr-space-4);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.contents-window__loading {
  display: flex;
  justify-content: center;
  padding: var(--sr-space-4);
}
.contents-window__error {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sr-space-2);
  padding: var(--sr-space-3) 0;
}
.contents-window__sentinel {
  height: 1px;
}

.contents-month + .contents-month {
  margin-top: var(--sr-space-3);
}
.contents-month__label {
  margin: var(--sr-space-3) 0 var(--sr-space-2);
  color: var(--sr-color-text);
  font-size: var(--sr-text-md);
  font-weight: var(--sr-weight-semibold);
}

/* 사진/동영상 격자 */
.contents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.contents-grid__cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--sr-radius-md);
}
.contents-grid__open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}
.contents-grid__open:focus-visible {
  outline: 2px solid var(--sr-color-focus);
  outline-offset: -2px;
}
.contents-grid__busy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 35%);
}
/* 칸 위에 올리면 "메시지로 이동" 단추가 보인다 */
.contents-grid__jump {
  /* 마우스를 올리면 왼쪽 아래에 "메시지로 이동" 글자 단추 (v0.47.1 — 예전 작은 화살표 대신) */
  position: absolute;
  left: 5px;
  bottom: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: calc(100% - 10px);
  height: 24px;
  padding: 0 8px 0 6px;
  border: none;
  border-radius: var(--sr-radius-full);
  background: rgb(0 0 0 / 62%);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  cursor: pointer;
  transition: opacity var(--sr-duration, 0.15s);
}
.contents-grid__jump span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.contents-grid__jump:hover {
  background: rgb(0 0 0 / 78%);
}
.contents-grid__cell:hover .contents-grid__jump,
.contents-grid__jump:focus-visible {
  opacity: 1;
}

/* 파일 목록 (두 줄 칸) */
.contents-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 4px var(--sr-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.contents-files__item {
  display: flex;
  align-items: center;
  gap: var(--sr-space-3);
  min-width: 0;
  padding: var(--sr-space-2);
  border-radius: var(--sr-radius-md);
}
.contents-files__item:hover {
  background: var(--sr-color-surface-hover);
}
.contents-files__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.contents-files__name {
  overflow: hidden;
  color: var(--sr-color-text);
  font-weight: var(--sr-weight-medium);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.contents-files__meta {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.contents-files__actions {
  display: flex;
  flex: none;
  gap: 4px;
}

/* ── 답장 인용 오른쪽 끝의 작은 그림 (직원 테스트 #12) ─────────── */
.reply-thumb {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  overflow: hidden;
  border-radius: var(--sr-radius-sm);
  background: rgb(0 0 0 / 6%);
}
.reply-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reply-thumb--emoticon {
  background: transparent;
}
.reply-thumb--emoticon .msg-emoticon {
  width: 100%;
  height: 100%;
}
/* 지워진 이모티콘 안내 글은 작은 인용 칸에서는 빼고 그림 자리만 비운다 */
.reply-thumb .msg-emoticon--missing {
  display: none;
}

/* ── 표 수정 창 (직원 테스트 #15) ─────────────────────────── */
.table-edit__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
}
.table-edit__spacer {
  flex: 1;
}
.table-edit__scroll {
  max-height: min(52vh, 460px);
  overflow: auto;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
}
.table-edit {
  border-collapse: collapse;
  min-width: 100%;
}
.table-edit td {
  min-width: 120px;
  padding: 0;
  border: 1px solid var(--sr-color-border);
  vertical-align: top;
}
.table-edit tr.is-header td {
  background: var(--sr-color-surface-2);
}
.table-edit tr.is-header .table-edit__cell {
  font-weight: var(--sr-weight-semibold);
}
.table-edit td.is-focus-line {
  background: var(--sr-color-primary-soft);
}
.table-edit__cell {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: none;
  background: transparent;
  color: var(--sr-color-text);
  font: inherit;
  font-size: var(--sr-text-md);
  resize: none;
  field-sizing: content;
}
.table-edit__cell:focus {
  outline: 2px solid var(--sr-color-focus);
  outline-offset: -2px;
  background: var(--sr-color-surface);
}

/* 사진·파일 메시지 수정 창 (v0.34 — 첨부 빼기 · 더하기) */
.edit-attachments.is-dragging {
  outline: 2px dashed var(--sr-color-focus);
  outline-offset: 4px;
  border-radius: var(--sr-radius-md);
}
.edit-attachments__list {
  display: flex;
  flex-direction: column;
  gap: var(--sr-space-1);
  max-height: 240px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.edit-attachments__item {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  padding: 6px 8px;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
}
.edit-attachments__item.is-uploading {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.edit-attachments__thumb {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-muted);
}
.edit-attachments__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.edit-attachments__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.edit-attachments__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.edit-attachments__size,
.edit-attachments__hint,
.edit-attachments__empty {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.edit-attachments__empty {
  padding: 8px 0;
}
.edit-attachments__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
}
.edit-caption__input {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}

/*
 * 메시지 수정 창의 @자동완성 · 첨부 줄 (v0.41 — 대표 보고 2026-11-01, 초안 "PC 참고").
 * 자동완성은 입력칸 아래로 연다 (창 위쪽이 잘리지 않게 — 반복 메시지 창과 같다).
 */
.edit-message .edit-message__box,
.edit-caption {
  position: relative;
}
.edit-message__mentions {
  top: calc(100% + 4px);
  bottom: auto;
}
.edit-message.is-dragging {
  outline: 2px dashed var(--sr-color-focus);
  outline-offset: 4px;
  border-radius: var(--sr-radius-md);
}
.edit-message__note {
  margin: 0;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
/* 첨부 줄: 사진 그림 칸 · 파일 칸 · 표 칸 · 점선 "＋ 사진 · 파일" */
.edit-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sr-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.edit-strip__item {
  position: relative;
  display: flex;
  width: 72px;
  height: 56px;
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
}
.edit-strip__item.is-new {
  outline: 2px solid var(--sr-color-primary);
}
.edit-strip__thumb {
  width: 100%;
  height: 100%;
  border-radius: var(--sr-radius-md);
  object-fit: cover;
}
.edit-strip__file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  padding: 4px;
  color: var(--sr-color-text-muted);
}
.edit-strip__file-name {
  max-width: 100%;
  overflow: hidden;
  font-size: var(--sr-text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.edit-strip__badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 0 4px;
  border-radius: 6px;
  background: var(--sr-color-primary);
  color: #fff;
  font-size: var(--sr-text-badge);
  line-height: 15px;
}
.edit-strip__busy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--sr-radius-md);
  background: color-mix(in srgb, var(--sr-color-surface) 60%, transparent);
}
.edit-strip__remove {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #333;
  color: #fff;
  cursor: pointer;
}
.edit-strip__remove:disabled {
  opacity: 0.4;
  cursor: default;
}
.edit-strip__add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 72px;
  height: 56px;
  padding: 0;
  border: 1.5px dashed var(--sr-color-border-strong, #b9c0c8);
  border-radius: var(--sr-radius-md);
  background: transparent;
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-xs);
  line-height: 1.3;
  cursor: pointer;
}
.edit-strip__add:hover:not(:disabled) {
  border-color: var(--sr-color-primary);
  color: var(--sr-color-primary-text);
}
.edit-strip__add:disabled {
  opacity: 0.5;
  cursor: default;
}

/* 파일 검색 결과의 작은 사진 (누르면 크게 보기 — 직원 테스트 #7) */
.file-thumb-button {
  display: inline-flex;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-sm);
  background: none;
  cursor: zoom-in;
}
.file-thumb-button:focus-visible {
  outline: 2px solid var(--sr-color-focus);
  outline-offset: 1px;
}
.search-files__cell {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
  min-width: 0;
}
.search-files__cell .search-files__name {
  flex: 1;
  min-width: 0;
}
/* 통합 검색 결과 창의 사진 한 줄 */
.hits-row__thumb {
  display: inline-flex;
  flex: none;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: var(--sr-radius-sm);
}
/*
 * 파일 종류 아이콘 · 종류 이름 · 종류 색 (v0.42 대표 승인 초안 "안 B" — FileType.tsx).
 * 색 값은 packages/ui tokens.css `--sr-file-*` 한 곳에만 둔다. `file-kind--종류`가 붙은 칸 안에서는
 * `--file-kind-color`로 그 색을 쓴다 (아이콘 바탕 · 종류 이름 글자 · 대화방 파일 칸 왼쪽 띠).
 */
.file-kind--excel {
  --file-kind-color: var(--sr-file-excel);
}
.file-kind--word {
  --file-kind-color: var(--sr-file-word);
}
.file-kind--hwp {
  --file-kind-color: var(--sr-file-hwp);
}
.file-kind--powerpoint {
  --file-kind-color: var(--sr-file-powerpoint);
}
.file-kind--pdf {
  --file-kind-color: var(--sr-file-pdf);
}
.file-kind--archive {
  --file-kind-color: var(--sr-file-archive);
}
.file-kind--text {
  --file-kind-color: var(--sr-file-text);
}
.file-kind--image {
  --file-kind-color: var(--sr-file-image);
}
.file-kind--video {
  --file-kind-color: var(--sr-file-video);
}
.file-kind--other {
  --file-kind-color: var(--sr-file-other);
}

/* ── 아이콘 (확장자 글자 · 흰 글자 · 종류 색 바탕) ───────────── */
.file-type {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--sr-radius-md);
  background: var(--file-kind-color, var(--sr-file-other));
  color: #fff;
  font-family: var(--sr-font-sans);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
/* 회수된 파일 — 색 없이 문서 그림 (예전 모양 그대로) */
.file-type--deleted {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text-muted);
}

/* ── 종류 이름 ("엑셀 · 121 KB"의 "엑셀") ───────────────────── */
.file-kind-name {
  color: var(--file-kind-color, var(--sr-color-text-muted));
  font-weight: var(--sr-weight-bold);
}
/* 어두운 화면에서는 같은 색을 밝게 섞어 읽히게 한다 (아이콘 바탕은 그대로) */
:root[data-theme='dark'] .file-kind-name {
  color: color-mix(in srgb, var(--file-kind-color, var(--sr-color-text-muted)) 55%, #fff);
}
/* v0.36 — 콘텐츠 창 여러 개 선택 (동그라미 · 아래 선택 줄). 링크 미리보기(다른 작업)와 겹치지 않게 파일을 나눴다. */

/* ── 동그라미 (네이버웍스처럼 사진 칸 오른쪽 위 · 파일 줄 왼쪽) ───────── */
.contents-select {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-full);
  background: var(--sr-color-surface);
  color: transparent;
  cursor: pointer;
  transition:
    opacity var(--sr-duration, 0.15s),
    background var(--sr-duration, 0.15s);
}
.contents-select:hover {
  border-color: var(--sr-color-primary);
}
.contents-select:focus-visible {
  outline: 2px solid var(--sr-color-primary);
  outline-offset: 2px;
}
.contents-select.is-checked {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-primary);
  color: #fff;
}

/* 사진 칸: 오른쪽 위에 겹쳐 둔다. 고른 것이 없으면 올렸을 때만 보인다. */
.contents-select--tile {
  position: absolute;
  top: 6px;
  right: 6px;
  border-color: rgb(255 255 255 / 90%);
  background: rgb(0 0 0 / 22%);
  opacity: 0;
}
.contents-grid__cell:hover .contents-select--tile,
.contents-select--tile:focus-visible,
.contents-select--tile.is-checked,
.is-selecting .contents-select--tile {
  opacity: 1;
}
.contents-select--tile.is-checked {
  border-color: var(--sr-color-primary);
  background: var(--sr-color-primary);
}
/* 고른 사진 칸은 파란 테두리 */
.contents-grid__cell.is-selected {
  box-shadow: inset 0 0 0 3px var(--sr-color-primary);
}
.contents-grid__cell.is-selected .contents-grid__open {
  opacity: 0.88;
}

/* 파일 줄: 아이콘 왼쪽. 고른 것이 없으면 올렸을 때만 진하게 보인다. */
.contents-select--row {
  opacity: 0.35;
}
.contents-files__item:hover .contents-select--row,
.contents-select--row:focus-visible,
.contents-select--row.is-checked,
.is-selecting .contents-select--row {
  opacity: 1;
}
.contents-files__item.is-selected {
  background: var(--sr-color-primary-soft, var(--sr-color-surface-hover));
}

/* ── 아래 선택 줄 "N개 선택됨 · 전달 · 저장 · X" ───────────────── */
.contents-selection-bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--sr-space-3);
  padding: var(--sr-space-2) var(--sr-space-3) var(--sr-space-2) var(--sr-space-4);
  border-top: 1px solid var(--sr-color-border);
  background: var(--sr-color-surface);
}
.contents-selection-bar__count {
  color: var(--sr-color-primary);
  font-weight: var(--sr-weight-semibold);
}
.contents-selection-bar__actions {
  display: flex;
  align-items: center;
  gap: var(--sr-space-2);
}
.contents-selection-bar__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--sr-space-3);
  border: 1px solid var(--sr-color-border-strong);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface);
  color: var(--sr-color-text);
  font: inherit;
  cursor: pointer;
}
.contents-selection-bar__button:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
}
/* 삭제 (v0.37) — 되돌릴 수 없는 일이라 빨간 글자로 구분한다 (누르면 확인 창이 먼저 뜬다). */
.contents-selection-bar__button--danger {
  border-color: var(--sr-color-danger);
  color: var(--sr-color-danger);
}
.contents-selection-bar__button--danger:hover:not(:disabled) {
  background: var(--sr-color-danger-soft, var(--sr-color-surface-hover));
}
.contents-selection-bar__button:disabled,
.contents-selection-bar__clear:disabled {
  cursor: default;
  opacity: 0.6;
}
.contents-selection-bar__button:focus-visible,
.contents-selection-bar__clear:focus-visible {
  outline: 2px solid var(--sr-color-primary);
  outline-offset: 1px;
}
.contents-selection-bar__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--sr-radius-full);
  background: transparent;
  color: var(--sr-color-text-muted);
  cursor: pointer;
}
.contents-selection-bar__clear:hover:not(:disabled) {
  background: var(--sr-color-surface-hover);
  color: var(--sr-color-text);
}
/* ── 링크 탭 미리보기 (v0.36 — 네이버웍스 링크 탭과 같은 모양: 두 줄 칸 · 작은 그림 · 굵은 제목) ── */
.link-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2px var(--sr-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.link-preview {
  position: relative;
  min-width: 0;
  border-radius: var(--sr-radius-md);
}
.link-preview:hover,
.link-preview:focus-within {
  background: var(--sr-color-surface-hover);
}
.link-preview__open {
  display: flex;
  align-items: flex-start;
  gap: var(--sr-space-3);
  width: 100%;
  min-width: 0;
  padding: var(--sr-space-2);
  border: none;
  border-radius: inherit;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.link-preview__thumb {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-md);
  background: var(--sr-color-surface-2);
  color: var(--sr-color-text-subtle);
}
.link-preview__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.link-preview__thumb.is-pending {
  animation: link-preview-pulse 1.4s ease-in-out infinite;
}
@keyframes link-preview-pulse {
  50% {
    opacity: 0.55;
  }
}
@media (prefers-reduced-motion: reduce) {
  .link-preview__thumb.is-pending {
    animation: none;
  }
}
.link-preview__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  /* 마우스를 올렸을 때 나타나는 단추 자리 */
  padding-right: var(--sr-space-1);
}
.link-preview__title,
.link-preview__desc,
.link-preview__url {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.link-preview__title {
  color: var(--sr-color-text);
  font-weight: var(--sr-weight-semibold);
}
.link-preview__title.is-domain {
  color: var(--sr-color-text-muted);
}
.link-preview__desc {
  color: var(--sr-color-text-muted);
  font-size: var(--sr-text-sm);
}
.link-preview__url {
  color: var(--sr-color-primary);
  font-size: var(--sr-text-sm);
}
.link-preview__meta {
  color: var(--sr-color-text-subtle);
  font-size: var(--sr-text-xs);
}
.link-preview__actions {
  position: absolute;
  right: var(--sr-space-2);
  bottom: var(--sr-space-2);
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--sr-duration);
}
.link-preview:hover .link-preview__actions,
.link-preview:focus-within .link-preview__actions {
  opacity: 1;
}
.link-preview__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--sr-color-border);
  border-radius: var(--sr-radius-sm);
  background: var(--sr-color-surface);
  color: var(--sr-color-text-muted);
  cursor: pointer;
}
.link-preview__copy:hover {
  border-color: var(--sr-color-primary);
  color: var(--sr-color-primary-text);
}
