/* MeetTalk — iPhone / iMessage light mode design system */

:root {
  /* iOS system light backgrounds */
  --bg-app: #f2f2f7;
  --sidebar-bg: #ffffff;
  --sidebar-elevated: #f2f2f7;
  --sidebar-border: rgba(60, 60, 67, 0.18);
  --chat-bg: #ffffff;
  --header-bg: rgba(249, 249, 249, 0.94);
  /* Label colors (iOS light) */
  --text: #1c1c1e;
  --text-secondary: rgba(60, 60, 67, 0.78);
  --text-muted: rgba(60, 60, 67, 0.52);
  --label-tertiary: rgba(60, 60, 67, 0.4);
  /* iMessage bubbles */
  --bubble-other: #e9e9eb;
  --bubble-other-text: #1c1c1e;
  --bubble-self: #007aff;
  --bubble-self-text: #ffffff;
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --danger: #ff3b30;
  --success: #34c759;
  --room-hover: rgba(0, 0, 0, 0.035);
  --room-active: rgba(0, 122, 255, 0.09);
  --system-bg: rgba(120, 120, 128, 0.12);
  --system-text: rgba(60, 60, 67, 0.6);
  --date-bg: rgba(120, 120, 128, 0.14);
  --input-bar: rgba(249, 249, 249, 0.96);
  --input-field: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --separator: rgba(60, 60, 67, 0.18);
  --grouped-bg: #f2f2f7;
  --grouped-cell: #ffffff;
  --radius-bubble: 18px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --pad-screen-x: 16px;
  --sidebar-w: 360px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  /* iOS system font stack (SF Pro on Apple, closest elsewhere) */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
    'Apple SD Gothic Neo', 'Helvetica Neue', 'Segoe UI', 'Noto Sans KR', sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
    'Apple SD Gothic Neo', 'Helvetica Neue', sans-serif;
  --font-size-caption2: 11px;
  --font-size-caption1: 12px;
  --font-size-footnote: 13px;
  --font-size-subhead: 15px;
  --font-size-body: 17px;
  --font-size-headline: 17px;
  --font-size-title3: 20px;
  --font-size-title2: 22px;
  --font-size-title1: 28px;
  --hairline: 0.5px solid var(--separator);
  --sheet-bg: #ffffff;
  --sheet-elevated: #f2f2f7;
  --fill-tertiary: rgba(120, 120, 128, 0.12);
  --fill-quaternary: rgba(120, 120, 128, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  font-size: var(--font-size-body);
  font-weight: 400;
  line-height: 1.29;
  background: var(--bg-app);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* iOS body tracking */
  letter-spacing: -0.022em;
  text-rendering: optimizeLegibility;
}

/* SF Symbols–style outline icons */
.ios-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  overflow: visible;
  pointer-events: none;
}

.ios-icon-lg {
  width: 28px;
  height: 28px;
}

.ios-icon-xl {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.85;
}

.ios-icon-send {
  width: 18px;
  height: 18px;
}

button .ios-icon,
.bottom-tab-ico .ios-icon {
  margin: 0 auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* ---------- Login ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f2f2f7 0%, #e5e5ea 100%);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 0.5px solid rgba(60, 60, 67, 0.12);
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.logo-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  background: linear-gradient(145deg, #007aff, #5ac8fa);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.28);
}

.logo-icon .ios-icon {
  width: 32px;
  height: 32px;
  color: #fff;
}

.login-brand h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.login-brand p {
  font-size: 13px;
  color: var(--text-secondary);
}

.login-form .input-group {
  margin-bottom: 14px;
}

.login-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.login-form input[type='text'],
.login-form input[type='password'] {
  width: 100%;
  padding: 12px 14px;
  border: 0.5px solid rgba(60, 60, 67, 0.22);
  border-radius: 12px;
  background: var(--sidebar-elevated);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0 16px;
  cursor: pointer;
  user-select: none;
}

.remember-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.btn-primary {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.login-status {
  margin-top: 14px;
  min-height: 20px;
  font-size: 13px;
  text-align: center;
  color: var(--text-secondary);
}

/* ---------- App shell ---------- */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--chat-bg);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

/* ---------- Connection banner (offline / degraded) ---------- */
.connection-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: calc(8px + var(--safe-top, 0px)) 14px 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.connection-banner[hidden] {
  display: none !important;
}

.connection-banner.is-offline {
  background: linear-gradient(180deg, #ff3b30 0%, #d70015 100%);
}

.connection-banner.is-degraded {
  background: linear-gradient(180deg, #ff9f0a 0%, #c93400 100%);
}

.connection-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  flex-shrink: 0;
  animation: pulse 1.6s infinite;
}

/* Push main layout below fixed banner when visible */
.app-container.has-connection-banner {
  padding-top: calc(36px + var(--safe-top, 0px));
}

.app-container.has-connection-banner .sidebar-header {
  padding-top: 12px;
}

.status-badge.is-offline,
.status-badge.is-degraded {
  color: #ff9f0a;
}

.status-badge.is-offline .pulse,
.status-badge.is-degraded .pulse {
  background: #ff9f0a;
  animation: none;
}

.status-badge.is-offline {
  color: #ff453a;
}

.status-badge.is-offline .pulse {
  background: #ff453a;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: relative;
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: var(--hairline);
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 2;
}

.sidebar-header {
  padding: calc(18px + var(--safe-top)) var(--pad-screen-x) 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(145deg, #007aff, #5ac8fa);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.28);
}

.brand-icon .ios-icon {
  width: 22px;
  height: 22px;
  color: #fff;
}

.brand-title h2 {
  font-size: var(--font-size-title3);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-family: var(--font-display);
}

.status-badge {
  font-size: 11px;
  color: #30d158;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-weight: 500;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #30d158;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.45);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(48, 209, 88, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(48, 209, 88, 0);
  }
}

/* Content area between header/search and bottom tabs */
.sidebar-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-box {
  padding: 0 var(--pad-screen-x) 14px;
  flex-shrink: 0;
}

.search-box-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px 0 10px;
  border-radius: 10px;
  background: var(--sidebar-elevated);
}

.search-field-ico {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  opacity: 0.9;
  flex-shrink: 0;
}

.search-field input,
.search-box-row > input {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 36px;
  padding: 8px 4px !important;
  font-size: var(--font-size-subhead);
  font-weight: 400;
  letter-spacing: -0.016em;
}

.search-field input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Global message search (local DB) next to room-name filter */
.btn-global-msg-search {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.btn-global-msg-search .ios-icon {
  width: 22px;
  height: 22px;
}

.btn-global-msg-search:active {
  opacity: 0.55;
  transform: scale(0.94);
}

.btn-global-msg-search.is-open {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Global search panel (sidebar overlay) */
.global-search-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  inset: 0;
  z-index: 12;
  background: var(--sidebar-bg, #1c1c1e);
}

.global-search-panel.open {
  display: flex;
}

.global-search-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px var(--pad-screen-x) 10px;
  padding-top: max(12px, calc(8px + var(--safe-top)));
  border-bottom: var(--hairline);
}

.global-search-head input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--sidebar-elevated);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  min-height: 42px;
}

.global-search-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--fill-tertiary);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.global-search-close .ios-icon {
  width: 16px;
  height: 16px;
}

.global-search-opt {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 var(--pad-screen-x);
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--sidebar-elevated);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.global-search-opt input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.global-search-opt-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.global-search-opt-text strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.016em;
}

.global-search-opt-text small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
  letter-spacing: -0.008em;
}

.global-search-meta {
  flex-shrink: 0;
  padding: 8px var(--pad-screen-x) 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.global-search-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px var(--pad-screen-x) 16px;
}

.global-search-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.global-search-hit {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  padding: 12px 10px;
  margin: 0 0 4px;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.global-search-hit:active {
  background: var(--room-hover);
}

.global-search-hit-room {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-hit-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.global-search-hit-body mark,
.global-search-hit-body .gs-mark {
  background: rgba(255, 214, 10, 0.35);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.global-search-hit-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  overflow: hidden;
}

/* Kakao-style bottom tab bar */
.bottom-tab-bar {
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 0;
  padding: 6px 4px calc(6px + var(--safe-bottom));
  background: rgba(249, 249, 249, 0.94);
  border-top: var(--hairline);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  z-index: 8;
}

.bottom-tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 6px 4px 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 10px;
  transition: color 0.15s ease;
}

.bottom-tab-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  line-height: 1;
}

.bottom-tab-ico .ios-icon {
  width: 24px;
  height: 24px;
}

.bottom-tab-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.bottom-tab.active {
  color: var(--accent);
  font-weight: 600;
}

.bottom-tab:active {
  opacity: 0.7;
}

/* Unread badge on 채팅 tab */
.bottom-tab .nav-tab-badge,
.nav-tab-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--sidebar-bg, #1c1c1e);
}

/* legacy class (unused top tabs) */
.nav-tabs {
  display: none;
}

.nav-tab {
  display: none;
}

.search-box input {
  width: 100%;
  padding: 8px 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 16px; /* prevents iOS zoom on focus */
  font-family: inherit;
  outline: none;
  color: var(--text);
  min-height: 36px;
  letter-spacing: -0.016em;
}

.search-box input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.room-list,
.org-list,
.more-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px var(--pad-screen-x) 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
}

.room-list::-webkit-scrollbar,
.org-list::-webkit-scrollbar,
.messages-container::-webkit-scrollbar {
  width: 6px;
}

.room-list::-webkit-scrollbar-thumb,
.org-list::-webkit-scrollbar-thumb,
.messages-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
}

.room-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 12px 10px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  margin-bottom: 4px;
  transition: background 0.15s ease;
  min-height: 72px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}

.room-flag {
  margin-right: 4px;
  font-size: 12px;
  vertical-align: middle;
}

.room-name-text {
  vertical-align: middle;
}

.room-item.is-pinned {
  background: rgba(10, 132, 255, 0.08);
}

.room-item.is-muted .room-last-msg {
  opacity: 0.72;
}

.room-item.is-favorite .room-name-text {
  font-weight: 600;
}

.room-item.color-blue { box-shadow: inset 3px 0 0 #0a84ff; }
.room-item.color-green { box-shadow: inset 3px 0 0 #30d158; }
.room-item.color-orange { box-shadow: inset 3px 0 0 #ff9f0a; }
.room-item.color-pink { box-shadow: inset 3px 0 0 #ff375f; }
.room-item.color-purple { box-shadow: inset 3px 0 0 #bf5af2; }
.room-item.color-teal { box-shadow: inset 3px 0 0 #64d2ff; }
.room-item.color-yellow { box-shadow: inset 3px 0 0 #ffd60a; }

/* Room settings sheet — iOS action sheet (light) */
.room-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(0, 0, 0, 0.28);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
}

.room-settings-sheet {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 0 0 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.14);
  border: 0.5px solid rgba(60, 60, 67, 0.12);
  overflow: hidden;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.room-settings-grabber {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: rgba(60, 60, 67, 0.22);
  margin: 8px auto 0;
}

.room-settings-title {
  padding: 14px 18px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.008em;
}

.room-settings-item {
  display: block;
  width: 100%;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 17px;
  font-family: inherit;
  font-weight: 400;
  padding: 16px 18px;
  cursor: pointer;
  border-top: var(--hairline);
  letter-spacing: -0.022em;
}

.room-settings-item:active {
  background: rgba(0, 0, 0, 0.05);
}

.room-settings-item.cancel {
  color: var(--accent);
  font-weight: 600;
  margin-top: 8px;
  border-radius: 14px;
  background: #ffffff;
  border: 0.5px solid rgba(60, 60, 67, 0.12);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.room-color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 8px 18px 16px;
}

.room-color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.room-color-swatch.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.45);
}

.room-item:hover {
  background: var(--room-hover);
}

.room-item:active {
  background: rgba(0, 0, 0, 0.05);
}

.room-item.active {
  background: var(--room-active);
}

.room-item.has-unread .room-name {
  font-weight: 700;
}

/* Android-style room avatar (left) */
.room-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  background: rgba(58, 122, 254, 0.22);
}

.room-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.room-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(
    145deg,
    hsl(var(--av-hue, 210), 62%, 48%),
    hsl(calc(var(--av-hue, 210) + 40), 58%, 38%)
  );
  user-select: none;
}

/* Group chat ??fixed default icon (no member collage) */
.room-avatar-group {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #3a7afe 0%, #5e5ce6 55%, #7d7aff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.room-avatar-group-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 0.95;
}

.room-avatar-group-icon svg {
  display: block;
}

.room-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
}

.room-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.room-name {
  font-size: var(--font-size-body);
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  letter-spacing: -0.022em;
  font-family: var(--font-display);
}

.room-time {
  font-size: var(--font-size-footnote);
  color: var(--text-muted) !important; /* never red — badge is the unread indicator */
  font-weight: 400 !important;
  flex-shrink: 0;
  letter-spacing: -0.008em;
  font-variant-numeric: tabular-nums;
}

.room-item.has-unread .room-time {
  color: var(--text-muted) !important;
}

.room-last-msg {
  font-size: var(--font-size-subhead);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.29;
  flex: 1;
  min-width: 0;
  letter-spacing: -0.016em;
  font-weight: 400;
}

.room-item.has-unread .room-last-msg {
  color: var(--text);
  font-weight: 500;
}

/* Android-style @ mention in room list last-message line */
.room-preview-mention {
  color: var(--accent);
  font-weight: 600;
}

.room-preview-mention.is-me {
  color: #ff9500;
  font-weight: 700;
}

/* Android accent 강조 in room list (! red / @ blue / # strong) */
.room-preview-accent {
  font-weight: 700;
  /* color via inline style; keep visible over parent .room-last-msg color */
}

.room-item.has-mention-me .room-last-msg {
  color: var(--text);
}

.room-flag-mention {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-right: 4px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent) !important;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.mention-item.is-focused,
.mention-item:focus {
  background: rgba(10, 132, 255, 0.18);
  outline: none;
}

/* Unread count pill ??right of last message (not the time) */
.room-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  margin-left: 8px;
  background: #ff3b30;
  color: #fff !important;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  box-sizing: border-box;
}

.room-badge[hidden] {
  display: none !important;
}

.msg-file-link.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.backup-bar {
  padding: 8px 16px;
  flex-shrink: 0;
  border-top: 1px solid var(--sidebar-border);
}

.btn-backup {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: var(--sidebar-elevated);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
}

/* user-footer removed ??profile lives in ?�보�?*/

.icon-btn-sm {
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: inherit;
}

.icon-btn-sm:hover {
  background: var(--room-hover);
}

/* ---------- Chat area (iMessage) ---------- */
.chat-area {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--chat-bg);
  position: relative;
}

.chat-header {
  flex-shrink: 0;
  padding: 12px var(--pad-screen-x);
  padding-top: max(12px, var(--safe-top));
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 1;
  min-height: 56px;
}

/* iMessage-style back ??only on narrow (phone) layout */
.btn-chat-back {
  display: none;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  min-width: 72px;
  min-height: 44px;
  padding: 6px 8px 6px 0;
  border: none;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: var(--font-size-body);
  font-weight: 400;
  letter-spacing: -0.022em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: var(--radius-md);
}

.btn-chat-back-chevron {
  display: inline-flex;
  align-items: center;
  margin-right: -2px;
}

.btn-chat-back-chevron .ios-icon {
  width: 20px;
  height: 28px;
}

.btn-chat-back-label {
  font-weight: 400;
}

/* Desktop: push action buttons to the right */
@media (min-width: 769px) {
  .chat-header-actions {
    margin-left: auto;
  }
}

.btn-chat-back-chevron {
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  margin-right: 2px;
  margin-top: -2px;
}

.btn-chat-back-label {
  font-size: 17px;
}

.btn-chat-back:active {
  opacity: 0.55;
}

.chat-header-spacer {
  display: none;
  min-width: 44px;
  flex-shrink: 0;
}

.chat-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.btn-room-header,
.btn-room-search {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.btn-room-header .ios-icon,
.btn-room-search .ios-icon {
  width: 22px;
  height: 22px;
}

/* Settings = gear glyph, slightly larger / filled feel */
.btn-room-settings {
  color: var(--accent);
}

.btn-room-settings .ios-icon {
  width: 24px;
  height: 24px;
}

.btn-room-settings:not(:disabled):hover {
  background: var(--accent-soft);
}

.btn-room-header:disabled,
.btn-room-search:disabled {
  opacity: 0.28;
  cursor: default;
}

.btn-room-header:not(:disabled):active,
.btn-room-search:not(:disabled):active {
  background: var(--accent-soft);
  opacity: 0.85;
}

/* In-chat message search bar */
.room-search-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px var(--pad-screen-x);
  background: rgba(249, 249, 249, 0.96);
  border-bottom: var(--hairline);
  z-index: 2;
}

.room-search-input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border: var(--hairline);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  padding: 0 12px;
  outline: none;
}

.room-search-status {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 4em;
  text-align: center;
}

.room-search-nav,
.room-search-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.room-search-close .ios-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.room-search-nav:active,
.room-search-close:active {
  background: var(--fill-tertiary);
}

.msg-search-hit .msg-bubble {
  outline: 1px solid rgba(10, 132, 255, 0.45);
}

/* In-chat room settings — iOS Settings grouped list (light) */
.room-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(0, 0, 0, 0.25);
  display: none;
  align-items: stretch;
  justify-content: flex-end;
}

.room-panel {
  width: min(400px, 100%);
  height: 100%;
  background: var(--grouped-bg);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  border-left: var(--hairline);
  animation: roomPanelIn 0.22s ease;
  color: var(--text);
}

@keyframes roomPanelIn {
  from {
    transform: translateX(18px);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.room-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  background: rgba(249, 249, 249, 0.94);
  border-bottom: var(--hairline);
  flex-shrink: 0;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.room-panel-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.022em;
  font-family: var(--font-display);
  text-align: center;
}

.room-panel-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--fill-tertiary);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.room-panel-close:active {
  opacity: 0.7;
}

.room-panel-head-spacer {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.room-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 max(28px, env(safe-area-inset-bottom, 0px));
  background: var(--grouped-bg);
}

.room-panel-section {
  padding: 18px 32px 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -0.008em;
  text-transform: none;
}

/* Grouped white card */
.room-panel-group {
  margin: 0 16px 12px;
  background: var(--grouped-cell);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.04);
}

.room-panel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  font-family: inherit;
  font-weight: 400;
  padding: 11px 16px;
  min-height: 48px;
  cursor: pointer;
  border-top: none;
  border-bottom: var(--hairline);
  letter-spacing: -0.022em;
  -webkit-tap-highlight-color: transparent;
}

.room-panel-group .room-panel-item:last-child {
  border-bottom: none;
}

.room-panel-item:active {
  background: rgba(0, 0, 0, 0.04);
}

.room-panel-item .rp-ico {
  width: 29px;
  height: 29px;
  flex-shrink: 0;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.room-panel-item .rp-ico.tone-gray {
  background: #8e8e93;
}
.room-panel-item .rp-ico.tone-orange {
  background: #ff9500;
}
.room-panel-item .rp-ico.tone-green {
  background: #34c759;
}
.room-panel-item .rp-ico.tone-purple {
  background: #af52de;
}
.room-panel-item .rp-ico.tone-pink {
  background: #ff2d55;
}
.room-panel-item .rp-ico.tone-teal {
  background: #5ac8fa;
}
.room-panel-item .rp-ico.tone-indigo {
  background: #5856d6;
}
.room-panel-item .rp-ico.tone-yellow {
  background: #ffcc00;
  color: #1c1c1e;
}
.room-panel-item .rp-ico.tone-red {
  background: #ff3b30;
}

.room-panel-item .rp-main {
  flex: 1;
  min-width: 0;
  color: var(--text);
}

.room-panel-item .rp-sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.008em;
}

.room-panel-item .rp-chev {
  color: rgba(60, 60, 67, 0.3);
  font-size: 20px;
  font-weight: 300;
  flex-shrink: 0;
  line-height: 1;
  margin-right: -2px;
}

.room-panel-item.danger {
  color: var(--danger);
}

.room-panel-item.danger .rp-main {
  color: var(--danger);
}

.room-panel-toggle {
  width: 51px;
  height: 31px;
  border-radius: 999px;
  border: none;
  background: #e9e9eb;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}

.room-panel-toggle.on {
  background: var(--success);
}

.room-panel-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 1px 1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease;
}

.room-panel-toggle.on::after {
  transform: translateX(20px);
}

.room-panel-list-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

.room-panel-list-row {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  padding: 12px 16px;
  border-bottom: var(--hairline);
  cursor: pointer;
}

.room-panel-group .room-panel-list-row:last-child {
  border-bottom: none;
}

.room-panel-list-row:active {
  background: rgba(0, 0, 0, 0.04);
}

.room-panel-list-row .rpl-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-panel-list-row .rpl-body {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.room-panel-list-row .rpl-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.room-bg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 8px 16px 16px;
  margin: 0 16px 12px;
  background: var(--grouped-cell);
  border-radius: 12px;
}

.room-bg-swatch {
  aspect-ratio: 1.2;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.room-bg-swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.55);
}

.messages-container.has-room-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.input-form.is-send-locked {
  opacity: 0.78;
}

.input-form.is-send-locked #messageInput {
  pointer-events: none;
  color: var(--text-muted);
}

.input-form.is-send-locked .btn-send {
  opacity: 0.45;
  pointer-events: none;
}

/* @ mention (Android /@Name,userId@/) */
.msg-mention {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  padding: 0 1px;
}

.msg-mention:active {
  background: var(--accent-soft);
}

.msg-bubble.self .msg-mention {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

.mention-popup {
  flex-shrink: 0;
  max-height: min(240px, 40vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--sheet-bg);
  border: var(--hairline);
  border-radius: 12px 12px 0 0;
  margin: 0 var(--pad-screen-x, 12px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 40;
}

.mention-empty {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 0.5px solid rgba(84, 84, 88, 0.35);
}

.mention-item:last-child {
  border-bottom: none;
}

.mention-item:active {
  background: rgba(10, 132, 255, 0.12);
}

.mention-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(10, 132, 255, 0.25);
}

.mention-av-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.mention-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mention-name {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-sub {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Android TalkMessageUtil accent 강조: ! red / @ blue / # black (bold + color) */
.msg-accent {
  font-weight: 700;
}

.room-notice-banner {
  flex-shrink: 0;
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 10px var(--pad-screen-x);
  background: rgba(0, 122, 255, 0.1);
  border-bottom: 0.5px solid rgba(0, 122, 255, 0.18);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.room-notice-banner .rnb-ico {
  flex-shrink: 0;
}

.room-notice-banner .rnb-text {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.room-notice-banner .rnb-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
}

.msg-search-hit-active .msg-bubble {
  outline: 2px solid #0a84ff;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}

.msg-older-hint {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.75;
}

.header-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 0 4px;
}

.header-info-text {
  min-width: 0;
  max-width: 100%;
}

.header-info h3 {
  font-size: var(--font-size-headline);
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.022em;
  font-family: var(--font-display);
}

.header-info p {
  font-size: var(--font-size-caption1);
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 0;
  font-weight: 400;
  letter-spacing: -0.008em;
}

.header-info p:empty {
  display: none;
}

/* In-chat room icon (tap to change ??PPROOM110) */
.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  padding: 0;
  overflow: hidden;
  background: rgba(58, 122, 254, 0.25);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.chat-header-avatar:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.chat-header-avatar:not(:disabled):active {
  transform: scale(0.94);
  opacity: 0.9;
}

.chat-header-avatar-inner {
  display: block;
  width: 100%;
  height: 100%;
}

.chat-header-avatar-inner .room-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.chat-header-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Messages ??scroll + spacing */
.messages-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* iMessage-like outer margins ??never cramped against edges */
  padding: 18px var(--pad-screen-x) 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.empty-state {
  margin: auto;
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 20px;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  margin-bottom: 12px;
  opacity: 0.9;
}

.empty-icon .ios-icon {
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: var(--font-size-title3);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.03em;
  font-family: var(--font-display);
}

.empty-state p {
  font-size: var(--font-size-subhead);
  color: var(--text-muted);
  letter-spacing: -0.016em;
}

.msg-date-divider {
  align-self: center;
  max-width: 90%;
  margin: 12px 0 8px;
  padding: 4px 12px;
  background: var(--date-bg);
  color: var(--system-text);
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  user-select: none;
}

/* App-style: "?�기부???��? ?��? 메시지" */
.msg-unread-divider {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 4px 10px;
  max-width: none;
  user-select: none;
}

.msg-unread-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(10, 132, 255, 0.45);
}

.msg-unread-divider-text {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #64d2ff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.msg-meta-bar {
  align-self: stretch;
  max-width: none;
  padding: 6px 10px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.msg-older-bar {
  align-self: center;
  margin: 2px 0 8px;
  text-align: center;
}

.btn-load-older {
  border: none;
  background: var(--sidebar-elevated);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.msg-older-loading,
.msg-older-done {
  font-size: 12px;
  color: var(--text-muted);
}

/* Message rows ??avatar left + bubble cluster */
.msg-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  max-width: min(82%, 480px);
  animation: msgIn 0.16s ease-out;
  margin: 3px 0;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg-row.other {
  align-self: flex-start;
}

.msg-row.self {
  align-self: flex-end;
  flex-direction: row-reverse;
  max-width: min(78%, 420px);
}

.msg-row.system {
  align-self: center;
  max-width: 90%;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  flex-direction: column;
}

/* Circular sender photo (Kakao-style left avatar) */
.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(58, 122, 254, 0.28);
  position: relative;
  margin-top: 2px;
}

.msg-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.msg-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  user-select: none;
}

/* Spacer keeps bubble alignment when consecutive msgs hide photo (Kakao) */
.msg-avatar.spacer {
  visibility: hidden;
  background: transparent;
}

.msg-row.self .msg-avatar {
  display: none; /* own messages: no avatar (Kakao-like) */
}

.msg-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
  flex: 1;
}

.msg-row.self .msg-main {
  align-items: flex-end;
}

.msg-system {
  font-size: 12px;
  color: var(--system-text);
  background: var(--system-bg);
  border-radius: 999px;
  padding: 5px 12px;
  text-align: center;
  line-height: 1.35;
}

.msg-sender {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 3px;
  padding-left: 2px;
  line-height: 1.2;
}

.msg-body-wrap {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: 100%;
}

.msg-row.self .msg-body-wrap {
  flex-direction: row-reverse;
}

.msg-bubble {
  padding: 8px 14px;
  border-radius: var(--radius-bubble);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.29;
  letter-spacing: -0.022em;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
  max-width: 100%;
  font-family: var(--font);
}

.msg-row.other .msg-bubble {
  background: var(--bubble-other);
  color: var(--bubble-other-text);
  border-bottom-left-radius: 6px;
}

.msg-row.self .msg-bubble {
  background: var(--bubble-self);
  color: var(--bubble-self-text);
  border-bottom-right-radius: 6px;
}

/* Media-only bubble ??no bulky padding */
.msg-bubble.has-media {
  padding: 3px;
  overflow: hidden;
}

.msg-bubble.has-media .msg-text {
  display: block;
  padding: 4px 8px 6px;
  font-size: 13px;
}

.msg-bubble.has-media.media-only {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.msg-row.other .msg-bubble.has-media.media-only {
  background: transparent;
}

.msg-row.self .msg-bubble.has-media.media-only {
  background: transparent;
}

/* Compact reply quote (iMessage / Kakao style) */
.msg-reply {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  border-left: 2.5px solid rgba(0, 0, 0, 0.18);
  cursor: pointer;
  max-width: 100%;
  min-width: 0;
}

.msg-row.self .msg-reply {
  background: rgba(0, 0, 0, 0.12);
  border-left-color: rgba(255, 255, 255, 0.75);
}

.msg-row.other .msg-reply {
  background: rgba(0, 0, 0, 0.05);
  border-left-color: var(--accent);
}

.msg-reply-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
}

.msg-reply-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.msg-reply-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.2;
}

.msg-row.self .msg-reply-name {
  color: rgba(255, 255, 255, 0.95);
}

.msg-reply-text {
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.85;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  word-break: break-word;
}

/* Main images ??readable, not huge */
.msg-media {
  display: block;
  max-width: min(220px, 58vw);
  max-height: 240px;
  width: auto;
  height: auto;
  border-radius: 14px;
  cursor: pointer;
  object-fit: cover;
  background: var(--sidebar-elevated);
  vertical-align: middle;
}

.msg-media.broken {
  display: none;
}

.msg-media-fallback {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 13px;
  opacity: 0.9;
}

.msg-file-chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin: 2px 0;
  font-size: 13px;
  font-weight: 500;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
  border: 0.5px solid rgba(60, 60, 67, 0.14);
  max-width: 260px;
}

.msg-row.self .msg-file-chip {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.msg-file-chip.is-disabled {
  opacity: 0.65;
}

.msg-file-ico {
  font-size: 18px;
  line-height: 1.2;
  flex-shrink: 0;
}

.msg-file-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.msg-file-link:hover .msg-file-name,
.msg-file-link:active .msg-file-name {
  text-decoration: underline;
}

.msg-file-name {
  word-break: break-word;
  line-height: 1.3;
  font-weight: 600;
}

.msg-file-sub {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 400;
}

.msg-file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.msg-side-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
  padding-bottom: 1px;
  min-width: 28px;
}

.msg-row.other .msg-side-meta {
  align-items: flex-start;
}

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1.2;
}

.msg-unread {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

/* Local-first send status (UI only ??no protocol change) */
.msg-row.pending .msg-bubble {
  opacity: 0.72;
}

.msg-row.failed .msg-bubble {
  opacity: 0.9;
  outline: 1px solid rgba(255, 59, 48, 0.45);
}

.msg-send-status {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}

.msg-send-status.pending {
  color: #8e8e93;
}

.msg-send-status.fail {
  color: #ff3b30;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #ff3b30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.msg-row.highlight-jump .msg-bubble {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.msg-link {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
}

.msg-row.self .msg-link {
  color: #ffffff;
  text-decoration: underline;
}

/* ---------- Stickers ??simple iOS light emoji-panel style ---------- */
.sticker-panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: min(40vh, 300px);
  background: #f9f9f9;
  border-top: var(--hairline);
  overflow: hidden;
}

.sticker-panel[hidden] {
  display: none !important;
}

.sticker-panel-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 6px var(--pad-screen-x) 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: var(--hairline);
  background: #ffffff;
  scrollbar-width: none;
}

.sticker-panel-tabs::-webkit-scrollbar {
  display: none;
}

.sticker-tab {
  flex-shrink: 0;
  min-width: 40px;
  height: 34px;
  padding: 4px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.sticker-tab.active {
  background: var(--fill-tertiary);
  color: var(--text);
}

.sticker-tab img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: none;
  opacity: 0.92;
}

.sticker-panel-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 4px;
  padding: 8px var(--pad-screen-x) 10px;
  background: #f9f9f9;
}

.sticker-cell {
  aspect-ratio: 1;
  border: none;
  border-radius: 10px;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s ease, transform 0.08s ease;
}

.sticker-cell:hover {
  background: rgba(0, 0, 0, 0.04);
}

.sticker-cell:active {
  transform: scale(0.92);
  background: rgba(0, 0, 0, 0.06);
}

.sticker-cell img {
  width: 100%;
  height: 100%;
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  /* cleaner look on white panels */
  image-rendering: -webkit-optimize-contrast;
}

.sticker-cell:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.msg-sticker {
  display: block;
  max-width: 140px;
  max-height: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
  border-radius: 6px;
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
  /* floating sticker like iMessage ??no dark plate */
  filter: none;
  box-shadow: none;
}

.msg-sticker-fallback {
  font-size: 40px;
  line-height: 1.1;
  padding: 4px 2px;
  background: transparent;
  color: var(--text);
}

.msg-bubble.has-sticker {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border: none !important;
}

.msg-bubble.has-sticker .msg-text {
  display: none;
}

.btn-sticker {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.btn-sticker .ios-icon {
  width: 26px;
  height: 26px;
}

.btn-sticker:hover {
  background: var(--fill-quaternary);
}

.btn-sticker.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-sticker:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---------- Input (iMessage composer) ---------- */
.input-form {
  flex-shrink: 0;
  padding: 12px var(--pad-screen-x) 14px;
  padding-bottom: calc(14px + var(--safe-bottom));
  background: var(--input-bar);
  border-top: var(--hairline);
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.input-form input {
  flex: 1;
  padding: 8px 14px;
  border: 0.5px solid rgba(60, 60, 67, 0.18);
  border-radius: var(--radius-pill);
  background: var(--input-field);
  font-size: 17px; /* iOS body; also avoids auto-zoom */
  font-family: inherit;
  font-weight: 400;
  letter-spacing: -0.022em;
  outline: none;
  color: var(--text);
  min-height: 36px;
  line-height: 1.29;
  box-shadow: none;
}

.input-form input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.input-form input:focus {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-form input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-send {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---- Message context menu (Android long-press style) ---- */
.msg-ctx-menu {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.28);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0 8px env(safe-area-inset-bottom, 0);
}

.msg-ctx-sheet {
  width: min(420px, 100%);
  max-height: 78vh;
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px 16px 0 0;
  padding: 12px 0 calc(10px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  -webkit-overflow-scrolling: touch;
}

.msg-ctx-sheet.desktop {
  position: fixed;
  border-radius: 14px;
  width: min(280px, 90vw);
  max-height: min(70vh, 480px);
  padding-bottom: 8px;
  animation: ctxIn 0.12s ease-out;
}

@keyframes ctxIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.msg-ctx-preview {
  padding: 10px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-ctx-preview strong {
  font-size: 13px;
  color: #64d2ff;
}

.msg-ctx-preview span {
  font-size: 13px;
  color: #aeaeb2;
  line-height: 1.35;
}

.msg-ctx-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.msg-ctx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  letter-spacing: -0.022em;
  -webkit-tap-highlight-color: transparent;
}

.msg-ctx-item:active,
.msg-ctx-item:hover {
  background: var(--room-hover);
}

.msg-ctx-item.danger {
  color: var(--danger);
}

.msg-ctx-ico {
  width: 24px;
  text-align: center;
  font-size: 16px;
}

.msg-ctx-cancel {
  display: block;
  width: calc(100% - 24px);
  margin: 8px 12px 0;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: #ffffff;
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  border: var(--hairline);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.msg-ctx-sheet.desktop .msg-ctx-cancel {
  display: none;
}

/* Reply compose bar */
.reply-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(10, 132, 255, 0.12);
  border-top: 1px solid rgba(10, 132, 255, 0.25);
  flex-shrink: 0;
}

.reply-bar-body {
  flex: 1;
  min-width: 0;
}

.reply-bar-label {
  font-size: 11px;
  font-weight: 700;
  color: #64d2ff;
}

.reply-bar-text {
  font-size: 13px;
  color: #aeaeb2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-bar-close {
  border: none;
  background: transparent;
  color: #8e8e93;
  font-size: 16px;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

/* Simple picker (forward targets) */
.simple-picker {
  position: fixed;
  inset: 0;
  z-index: 3100;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.simple-picker-sheet {
  width: min(440px, 100%);
  max-height: 75vh;
  background: var(--sheet-bg);
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.simple-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.simple-picker-close {
  border: none;
  background: transparent;
  color: #8e8e93;
  font-size: 18px;
  cursor: pointer;
}

.simple-picker-search {
  margin: 10px 12px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  padding: 0 12px;
  font-size: 15px;
  font-family: inherit;
}

.simple-picker-list {
  overflow: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.simple-picker-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-family: inherit;
}

.simple-picker-item:active {
  background: rgba(255, 255, 255, 0.06);
}

.simple-picker-label {
  font-size: 15px;
  font-weight: 600;
}

.simple-picker-sub {
  font-size: 12px;
  color: #8e8e93;
  margin-top: 2px;
}

.simple-picker-empty {
  padding: 24px;
  text-align: center;
  color: #8e8e93;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(20px);
  z-index: 4000;
  max-width: min(90vw, 360px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(44, 44, 46, 0.95);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* WhatsApp Web / Instagram style in-app message banners */
.msg-notify-host {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 4500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.msg-notify-card {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px 12px 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(28, 28, 30, 0.96);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
  font: inherit;
}

.msg-notify-card.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.msg-notify-card.hide {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
}

.msg-notify-card:hover {
  background: rgba(44, 44, 46, 0.98);
  border-color: rgba(10, 132, 255, 0.35);
}

.msg-notify-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0a84ff, #5e5ce6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.msg-notify-body {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.msg-notify-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-notify-text {
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(235, 235, 245, 0.72);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.msg-notify-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(235, 235, 245, 0.45);
  margin-top: -2px;
}

.msg-notify-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}



@media (max-width: 720px) {
  .msg-notify-host {
    top: auto;
    bottom: 72px;
    right: 10px;
    left: 10px;
    width: auto;
  }
}

.msg-row {
  -webkit-touch-callout: none;
  user-select: none;
}

/* ---------- Backup ---------- */
.backup-card {
  max-width: 440px;
}

.backup-info {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--sidebar-elevated);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.backup-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-backup-secondary,
.backup-file-label {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: var(--hairline);
  border-radius: 12px;
  background: var(--sidebar-elevated);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  color: var(--text);
}

.btn-backup-close {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.org-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: var(--hairline);
}

.org-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border-bottom: var(--hairline);
  cursor: pointer;
}

.org-item:hover {
  background: var(--room-hover);
}

.org-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(58, 122, 254, 0.25);
  position: relative;
}

.org-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.org-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.org-item-body {
  min-width: 0;
  flex: 1;
}

.org-item-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.016em;
}

.org-item-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-section-title {
  padding: 10px 12px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

/* Collapsed department accordion */
.org-meta-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.org-dept {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.org-dept-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.org-dept-head:active {
  background: rgba(255, 255, 255, 0.05);
}

.org-dept-chevron {
  width: 16px;
  color: #8e8e93;
  font-size: 10px;
  flex-shrink: 0;
}

.org-dept-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-dept-count {
  flex-shrink: 0;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #aeaeb2;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.org-dept.open .org-dept-head {
  background: rgba(10, 132, 255, 0.08);
}

.org-dept-body {
  padding: 0 0 6px;
  background: rgba(0, 0, 0, 0.15);
}

.org-dept-body .org-item {
  padding-left: 28px;
}

.org-dept-more {
  padding: 8px 16px 10px 28px;
  font-size: 12px;
  color: #8e8e93;
}

/* More panel (Android drawer shortcuts) */
.more-panel {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 16px;
}

.more-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 12px 14px;
  padding: 14px;
  border-radius: 14px;
  background: #ffffff;
  border: var(--hairline);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
}

.more-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(10, 132, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.more-profile-meta {
  flex: 1;
  min-width: 0;
}

.more-profile-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.022em;
}

.more-profile-role {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.more-profile-chevron {
  color: var(--text-muted);
  font-size: 20px;
}

.more-section-label {
  padding: 10px 16px 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: -0.008em;
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 4px 12px 12px;
}

.more-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 76px;
  border: none;
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.04);
  border: var(--hairline);
  -webkit-tap-highlight-color: transparent;
}

.more-grid-item:active {
  background: var(--room-hover);
  transform: scale(0.97);
}

.more-grid-ico {
  font-size: 22px;
  line-height: 1;
}

.more-grid-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.008em;
}

.more-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: none;
  border-bottom: var(--hairline);
  background: #ffffff;
  color: var(--text);
  font-size: 17px;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: -0.022em;
  text-align: left;
  cursor: pointer;
}

.more-list-item:active {
  background: var(--room-hover);
}

.more-list-item.danger {
  color: var(--danger);
  margin-top: 8px;
}

.more-list-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.feature-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 2800;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.feature-sheet {
  width: min(440px, 100%);
  max-height: 85vh;
  overflow: auto;
  background: var(--sheet-bg);
  border-radius: 16px 16px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.feature-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: var(--sheet-bg);
}

.feature-sheet-body {
  padding: 16px;
}

.feature-empty {
  text-align: center;
  padding: 28px 12px;
  color: #aeaeb2;
}

.feature-empty-ico {
  font-size: 40px;
  margin-bottom: 10px;
}

.feature-empty h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-hint {
  font-size: 12px;
  margin-top: 12px;
  color: #8e8e93;
}

.feature-block {
  margin-bottom: 18px;
}

.feature-block h4 {
  font-size: 13px;
  color: #8e8e93;
  margin-bottom: 8px;
}

.feature-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.feature-kv span {
  color: #8e8e93;
}

.feature-kv b {
  font-weight: 600;
  text-align: right;
}

.feature-profile {
  text-align: center;
  padding: 12px 0 8px;
}

.feature-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: rgba(10, 132, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}

.btn-danger-outline {
  border: 1px solid rgba(255, 69, 58, 0.5);
  background: transparent;
  color: #ff453a;
  border-radius: 12px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.feature-list-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-list-item b {
  display: block;
  margin-bottom: 4px;
}

.feature-list-item span {
  font-size: 13px;
  color: #8e8e93;
}

.feature-loading {
  padding: 24px;
  text-align: center;
  color: #8e8e93;
}

.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  color: #fff;
  cursor: pointer;
}

.settings-toggle input[type='checkbox'] {
  width: 44px;
  height: 24px;
  accent-color: #0a84ff;
}

.nav-tab {
  font-size: 12px;
  padding: 8px 2px;
}

.org-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1900;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.org-detail-sheet {
  width: min(440px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--sheet-bg);
  border-radius: 16px 16px 0 0;
  padding: 0 0 calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.5);
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: none;
}

/* iOS sheet grabber */
.org-detail-grabber {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 8px auto 0;
}

.org-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 12px 18px;
  border-bottom: 0.5px solid rgba(84, 84, 88, 0.45);
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(249, 249, 249, 0.94);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.org-detail-title {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* iOS-style circular close (matches sheet chrome) */
.org-detail-close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(120, 120, 128, 0.32);
  color: rgba(235, 235, 245, 0.9);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.12s ease;
}

.org-detail-close:hover {
  background: rgba(120, 120, 128, 0.48);
}

.org-detail-close:active {
  background: rgba(120, 120, 128, 0.56);
  transform: scale(0.94);
}

.org-detail-close-x {
  position: relative;
  width: 12px;
  height: 12px;
  display: block;
}

.org-detail-close-x::before,
.org-detail-close-x::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 1px;
  background: rgba(235, 235, 245, 0.92);
}

.org-detail-close-x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.org-detail-close-x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.org-detail-body {
  padding: 16px 18px 8px;
}

.org-detail-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.org-detail-photo,
.org-detail-photo-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.org-detail-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 122, 254, 0.3);
  font-size: 28px;
  font-weight: 700;
}

.org-detail-name {
  font-size: 18px;
  font-weight: 700;
}

.org-detail-pos,
.org-detail-loading {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.org-detail-source {
  display: none; /* never show CACHE/TAS labels */
}

/* Contact rows ??label/value vertically centered (iOS settings style) */
.org-detail-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 12px 0;
  border-bottom: 0.5px solid rgba(84, 84, 88, 0.4);
  font-size: 15px;
  line-height: 1.35;
}

.org-detail-label {
  width: 92px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  display: flex;
  align-items: center;
  letter-spacing: -0.01em;
}

.org-detail-value {
  flex: 1;
  min-width: 0;
  color: var(--text);
  word-break: break-word;
  display: flex;
  align-items: center;
  line-height: 1.35;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.org-detail-value a {
  color: #0a84ff;
  text-decoration: none;
  font-weight: 500;
  line-height: inherit;
}

.org-detail-badge {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
  font-size: 12px;
  font-weight: 600;
}

.org-detail-error {
  color: #ff3b30;
  font-size: 13px;
  margin-top: 12px;
}

/* Action chips: equal height, icon + label aligned */
.org-action-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 4px 0 18px;
  align-items: stretch;
}

.org-action-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 64px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 14px;
  background: rgba(58, 122, 254, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 12px 8px;
  line-height: 1.2;
  box-sizing: border-box;
}

.org-action-label {
  display: block;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.org-action-btn.call {
  background: rgba(52, 199, 89, 0.16);
  color: #30d158;
}

.org-action-btn.chat {
  background: rgba(10, 132, 255, 0.18);
  color: #64d2ff;
}

.org-action-btn.chat.solid {
  background: #0a84ff;
  color: #fff;
  /* same column layout as ?��???/ 직장 ??equal vertical alignment */
  flex-direction: column;
  min-width: 0;
  padding: 12px 8px;
}

.org-action-btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.org-action-icon {
  font-size: 20px;
  line-height: 1;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Phone numbers in rows ??same line height as label (no tall min-height) */
.org-tel-link {
  color: #0a84ff;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 0;
  line-height: 1.35;
  padding: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.org-tel-link:active {
  opacity: 0.75;
}

.org-chat-compose {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: stretch;
}

.org-first-msg {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  padding: 0 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.org-first-msg:focus {
  border-color: rgba(10, 132, 255, 0.7);
}

.org-first-msg.org-first-msg-need {
  border-color: #ff3b30;
  animation: orgShake 0.35s ease;
}

@keyframes orgShake {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-4px);
  }
  60% {
    transform: translateX(4px);
  }
}

.org-chat-status {
  font-size: 12px;
  min-height: 16px;
  margin-bottom: 10px;
  color: var(--text-muted);
}

body.lightbox-open {
  overflow: hidden;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  flex-direction: column;
  cursor: default;
  padding: 0;
  animation: lightbox-in 0.18s ease;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.media-lightbox-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35));
  min-height: 52px;
  box-sizing: border-box;
}

.media-lightbox-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  color: #f2f2f7;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.media-lightbox-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.media-lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.media-lightbox-btn:active {
  background: rgba(255, 255, 255, 0.28);
}

.media-lightbox-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.media-lightbox-btn-ico {
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
}

.media-lightbox-back .media-lightbox-btn-ico {
  font-size: 28px;
  margin-top: -2px;
  margin-right: -2px;
}

.media-lightbox-dl {
  background: rgba(10, 132, 255, 0.85);
}

.media-lightbox-dl:hover {
  background: rgba(10, 132, 255, 1);
}

.media-lightbox-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  cursor: zoom-out;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.media-lightbox-stage img,
.media-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 480px) {
  .media-lightbox-btn-label {
    /* keep labels on phone ??user asked for clear back/download */
  }
  .media-lightbox-btn {
    min-width: 64px;
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* ---------- Phone / narrow: iMessage list ??chat stack ---------- */
@media (max-width: 768px) {
  .app-container {
    position: relative;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    max-width: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    border-right: none;
    transform: translateX(0);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.28s ease;
    will-change: transform;
  }

  .chat-area {
    position: absolute;
    inset: 0;
    z-index: 6;
    width: 100%;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
    visibility: hidden;
    pointer-events: none;
  }

  /* List home: only conversation list */
  .app-container:not(.room-open) .sidebar {
    transform: translateX(0);
    opacity: 1;
  }

  .app-container:not(.room-open) .chat-area {
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
  }

  /* Chat open: full-screen conversation + back */
  .app-container.room-open .sidebar {
    transform: translateX(-28%);
    opacity: 0.35;
    pointer-events: none;
  }

  .app-container.room-open .chat-area {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .btn-chat-back {
    display: inline-flex;
  }

  .chat-header-spacer {
    display: none;
  }

  .chat-header {
    padding-left: 8px;
    padding-right: 8px;
    min-height: 56px;
  }

  .btn-room-header,
  .btn-room-search {
    display: inline-flex;
  }

  .chat-header-actions {
    display: inline-flex;
  }

  .header-info h3 {
    font-size: 17px;
  }

  .header-info p {
    font-size: 12px;
  }

  .msg-row {
    max-width: 86%;
  }

  .msg-row.self {
    max-width: 80%;
  }

  .messages-container {
    padding: 16px var(--pad-screen-x) 28px;
    padding-bottom: max(28px, calc(12px + var(--safe-bottom)));
    gap: 10px;
  }

  .msg-bubble {
    font-size: 16px;
    padding: 10px 15px;
  }

  .input-form {
    padding: 12px var(--pad-screen-x);
    padding-bottom: max(12px, calc(10px + var(--safe-bottom)));
    gap: 12px;
  }

  .msg-media {
    max-width: min(260px, 70vw);
  }

  .sidebar-header {
    padding-top: max(18px, calc(12px + var(--safe-top)));
  }

  .room-list,
  .org-list {
    padding-left: var(--pad-screen-x);
    padding-right: var(--pad-screen-x);
    padding-bottom: 20px;
  }

  .room-item {
    padding: 12px 10px;
    min-height: 74px;
    margin-bottom: 6px;
    gap: 12px;
  }

  .room-avatar {
    width: 54px;
    height: 54px;
  }

  .search-box {
    padding-left: var(--pad-screen-x);
    padding-right: var(--pad-screen-x);
  }

  .global-search-head {
    padding-left: var(--pad-screen-x);
    padding-right: var(--pad-screen-x);
  }

  .global-search-list,
  .global-search-meta {
    padding-left: var(--pad-screen-x);
    padding-right: var(--pad-screen-x);
  }

  .bottom-tab-bar {
    padding-bottom: calc(8px + var(--safe-bottom));
  }
}

/* Prefer taller phone portrait; landscape tablet may still use stack if narrow */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 480px) {
  .chat-header {
    min-height: 44px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
}
