/* ===========================================================================
   우리 가족 — 디자인: "따뜻한 에디토리얼" (Option A, Polish Pass v2)
   포근한 미색 배경, 명조 타이틀(나눔명조), 가는 헤어라인,
   테라코타 강조선. 사진이 주인공이 되는 차분한 갤러리 룩.
   =========================================================================== */
:root {
  --bg: #faf6f1;
  --ink: #2e2a26;
  --muted: #8a7f70;
  --caption: #8a7f70;
  --hairline: #ece2d5;
  --line: #dccdbb;
  --avatar-line: #ddd0c0;
  --accent: #a8775c;
  --accent-deep: #8a5e44;
  --accent-soft: #f1e8dd;
  --placeholder: #ece2d4;
  --danger: #b15a44;
  --radius-img: 2px;
  --radius-card: 4px;
  --maxw: 1160px;
  --font-body: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
  --font-display: "Nanum Myeongjo", "Apple SD Gothic Neo", serif;
}

/* 글자 크게 보기 (프로필에서 선택, B6) */
html.bigfont body { zoom: 1.12; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--ink); text-decoration: none; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font-size: 13.5px; letter-spacing: 0.06em; padding: 11px 24px; border-radius: 999px;
  transition: background .16s ease, opacity .16s ease;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.subtle { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
.btn.subtle:hover { background: #ecdfd0; }
.btn.danger { background: transparent; color: var(--danger); border-color: #e6cfc6; }
.btn.danger:hover { background: #f7ece8; }
.btn.small { padding: 11px 18px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }

/* ---------- 폼 ---------- */
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: 11px 14px; font-size: 14.5px; font-family: inherit; color: var(--ink);
  transition: border-color .15s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
label.field { display: block; font-size: 12px; letter-spacing: .04em; color: var(--muted); margin: 0 0 6px 2px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- 로그인 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px; text-align: center; padding: 40px 30px;
}
.auth-card .logo { display: none; }
.auth-card h1 {
  font-family: var(--font-display); font-weight: 800; font-size: 34px;
  letter-spacing: 0.14em; margin: 4px 0 10px; color: var(--ink);
}
.auth-card p.sub { color: var(--muted); margin: 0 0 30px; font-size: 13.5px; }
.seg { display: flex; gap: 28px; justify-content: center; margin-bottom: 26px; border-bottom: 1px solid var(--hairline); }
.seg button {
  border: none; background: transparent; padding: 0 0 12px; margin-bottom: -1px;
  font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; letter-spacing: .02em;
}
.seg button.on { color: var(--ink); border-bottom-color: var(--accent); }
.auth-card .field-group { text-align: left; margin-bottom: 14px; }
.notice { font-size: 13px; border-radius: 8px; padding: 11px 13px; margin-top: 16px; text-align: left; }
.notice.err { background: #f7ece8; color: var(--danger); }
.notice.ok { background: #eef0e7; color: #5d6a4f; }
.seg.small { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 0; }
.seg.small button {
  padding: 10px 16px; margin: 0; border: none; border-radius: 999px; font-size: 12.5px; color: var(--muted);
}
.seg.small button.on { background: var(--accent-soft); color: var(--accent-deep); border: none; }

/* ---------- 헤더 / 네비게이션 ---------- */
.topbar { position: relative; background: var(--bg); border-bottom: 1px solid var(--hairline); }
.topbar-inner { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 34px 56px 0; text-align: center; }
.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 23px; letter-spacing: 0.2em;
  color: var(--ink); display: inline-block;
}
.brand .logo { display: none; }
.nav { display: flex; gap: 34px; justify-content: center; margin-top: 22px; padding-bottom: 0; flex-wrap: wrap; }
.nav a {
  font-size: 14px; letter-spacing: 0.03em; color: var(--muted); padding-bottom: 16px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s ease;
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--accent); }
.avatar-wrap { position: absolute; top: 28px; right: 56px; z-index: 30; }
.avatar-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--avatar-line);
  background: transparent; color: #6f665a; font-size: 12px; letter-spacing: .02em;
  display: grid; place-items: center;
}
.avatar-menu {
  position: absolute; right: 0; top: 50px; min-width: 168px; background: #fff;
  border: 1px solid var(--hairline); border-radius: 10px; padding: 6px;
  box-shadow: 0 10px 34px rgba(80,60,40,.14); display: none; text-align: left;
}
.avatar-menu.open { display: block; }
.avatar-menu .am-name { font-size: 12px; color: var(--muted); padding: 8px 10px 7px; letter-spacing: .02em; }
.avatar-menu a, .avatar-menu button {
  display: block; width: 100%; text-align: left; background: transparent; border: none;
  padding: 10px; font-size: 14px; color: var(--ink); border-radius: 7px; letter-spacing: .01em;
}
.avatar-menu a:hover, .avatar-menu button:hover { background: var(--accent-soft); }
.avatar-menu #logoutBtn { color: var(--danger); border-top: 1px solid var(--hairline); margin-top: 4px; border-radius: 0; }
.navtoggle { display: none; }

/* 앨범(폴더) 칩 */
.albumbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 28px; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-size: 13px; letter-spacing: .02em; padding: 12px 18px; border-radius: 999px; transition: all .15s ease;
}
.chip:hover { color: var(--ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.add { color: var(--accent-deep); border-style: dashed; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 50px 56px 72px; }

/* 페이지 머리말 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 38px; flex-wrap: wrap; }
.page-head h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 36px; letter-spacing: 0.01em;
  margin: 0; color: #2e2a26; line-height: 1.25;
}
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 10px; display: block; }
.page-head .spacer { flex: 1; }
.page-head .head-left { min-width: 0; }

/* ---------- 사진 그리드 (figure + 날짜 캡션) ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tile { cursor: pointer; transition: opacity .18s ease; }
.tile:hover { opacity: 0.93; }
.tile .ph {
  aspect-ratio: 4/5; border-radius: var(--radius-img); overflow: hidden; background: var(--placeholder);
  background-image: repeating-linear-gradient(135deg, rgba(70,50,25,.02) 0 11px, transparent 11px 22px);
}
.tile .ph img { width: 100%; height: 100%; object-fit: cover; }
.tile .meta {
  margin-top: 11px; display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--caption); letter-spacing: 0.05em;
}
.tile .meta .who { color: var(--muted); }
.tile .meta .priv { color: var(--accent); }

/* 날짜 그룹 헤더 (앨범 상세, A4) */
.date-h {
  font-size: 14px; color: var(--muted); letter-spacing: 0.04em;
  margin: 36px 0 16px;
}
#g > .date-h:first-child { margin-top: 24px; }

/* 앨범(폴더) 구역 */
.album-sec { margin-bottom: 44px; }
.album-h {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px;
  padding-bottom: 11px; border-bottom: 1px solid var(--hairline);
  font-size: 15px; font-weight: 500; letter-spacing: .03em; color: var(--ink);
}
.album-h .cnt { font-size: 12px; color: var(--muted); letter-spacing: .04em; }

/* 앨범 책장 (표지 모음) */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 30px; }
.book { cursor: pointer; transition: opacity 180ms ease; }
.book .cover {
  position: relative; aspect-ratio: 4/5; border-radius: 2px; overflow: hidden; background: var(--placeholder);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.book:hover { opacity: 0.93; }
/* 표지 위 ▶ 슬라이드쇼 버튼 (마우스 있는 기기에서 호버 시 표시, B4) */
.bk-play {
  position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(46,42,38,0.55); color: #fff; font-size: 15px;
  display: none; place-items: center; padding: 0 0 0 3px;
}
.bk-play:hover { background: rgba(46,42,38,0.75); }
@media (hover: hover) {
  .book:hover .bk-play { display: grid; }
}
.book .bk-meta { margin-top: 14px; }
.book .bk-title { font-size: 14.5px; color: var(--ink); letter-spacing: .01em; }
.book .bk-cnt { font-size: 12px; color: var(--muted); margin-top: 3px; letter-spacing: .04em; }

/* 카드 / 빈 상태 */
.card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 26px; }
.empty { text-align: center; color: var(--muted); padding: 70px 20px; }
.empty .big { display: none; }
.empty p { font-size: 14.5px; line-height: 1.9; }

/* 사람 / 방 목록 */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.person { background: var(--bg); padding: 22px 20px; display: flex; align-items: center; gap: 15px; color: inherit; transition: background .15s ease; }
.person:hover { background: #fff; }
.person .pa { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--avatar-line); color: #6f665a; font-size: 13px; display: grid; place-items: center; flex: none; }
.person .pn { font-size: 15px; }
.person .pm { font-size: 12.5px; color: var(--muted); margin-top: 2px; letter-spacing: .02em; }

/* 업로드 (B1: 평소엔 한 줄로 접힘) */
.upzone { margin-bottom: 28px; }
.upzone .upcollapsed {
  display: block; width: 100%; border: 1px dashed #dccdbb; border-radius: 8px;
  padding: 14px 20px; background: transparent; color: #6f665a; font-size: 14px;
  letter-spacing: .02em; text-align: center; transition: background .15s, border-color .15s;
}
.upzone .upcollapsed:hover { background: #fff; border-color: var(--accent); }
.dropzone { border: 1px dashed var(--line); border-radius: var(--radius-card); padding: 28px; text-align: center; color: var(--muted); background: #fff; transition: border-color .15s, background .15s; animation: dzopen 180ms ease; }
@keyframes dzopen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-ico { display: none; }
.dz-fold { display: inline-block; margin-top: 14px; background: none; border: none; color: var(--muted); font-size: 13px; padding: 8px 12px; text-decoration: underline; text-underline-offset: 3px; }
.dz-pending { margin-top: 14px; font-size: 14px; color: var(--ink); }
.upload-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* 화면 전체 드래그 안내 오버레이 (B1) */
.drop-overlay {
  position: fixed; inset: 0; z-index: 85; background: rgba(250,246,241,0.94);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--ink);
  border: 3px dashed var(--accent); pointer-events: none;
}

/* 토론 / 댓글 */
.msg { display: flex; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.msg .pa { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--avatar-line); color: #6f665a; font-size: 12px; display: grid; place-items: center; flex: none; }
.msg .who { font-size: 14px; }
.msg .when { font-size: 12px; color: var(--muted); margin-left: 7px; letter-spacing: .03em; }
.msg .body { font-size: 14.5px; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.composer { display: flex; gap: 10px; margin: 4px 0 10px; }
.card h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: .03em; margin: 0 0 14px; }

/* ---------- 라이트박스 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(36,30,25,.94); display: flex; flex-direction: column; }
.lb-top { display: flex; align-items: center; gap: 12px; padding: 16px 20px; color: #f2ece4; font-size: 14px; }
.lb-top .x { margin-left: 8px; }
.lb-dl { color: #f2ece4; font-size: 13px; letter-spacing: .03em; border: 1px solid rgba(255,255,255,.3); padding: 11px 16px; border-radius: 999px; white-space: nowrap; }
.lb-dl:hover { background: rgba(255,255,255,.14); }
.lb-idx { font-size: 13px; color: rgba(242,236,228,.75); letter-spacing: .06em; white-space: nowrap; }
.lb-body { flex: 1; display: flex; min-height: 0; }
.lb-stage { flex: 1; display: grid; place-items: center; padding: 14px; min-width: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-img); }
.lb-side { width: 348px; background: var(--bg); color: var(--ink); padding: 22px; overflow-y: auto; display: flex; flex-direction: column; }
.iconbtn { background: rgba(255,255,255,.12); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 18px; display: grid; place-items: center; transition: background .15s; }
.iconbtn:hover { background: rgba(255,255,255,.24); }

/* ⋯ 더보기 메뉴 (B2) */
.more-wrap { position: relative; }
.more-menu {
  position: absolute; right: 0; top: 48px; min-width: 150px; background: #fff;
  border: 1px solid var(--hairline); border-radius: 10px; padding: 6px; z-index: 40;
  box-shadow: 0 10px 34px rgba(80,60,40,.14); display: none; text-align: left;
}
.more-menu.open { display: block; }
.more-menu button {
  display: block; width: 100%; text-align: left; background: transparent; border: none;
  padding: 12px; font-size: 14px; color: var(--ink); border-radius: 7px;
}
.more-menu button:hover { background: var(--accent-soft); }
.more-menu button.red { color: #b4574e; }

/* ---------- 슬라이드쇼 ---------- */
.slideshow { position: fixed; inset: 0; z-index: 70; background: #1a1512; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.slide.on { opacity: 1; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(30px) brightness(.5); transform: scale(1.15); animation: kenburns 14s ease forwards; }
.slide-img { position: absolute; inset: 0; margin: auto; max-width: 94%; max-height: 86%; width: auto; height: auto; object-fit: contain; border-radius: 2px; box-shadow: 0 10px 50px rgba(0,0,0,.5); }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1.2); } }
.ss-cap { position: absolute; left: 0; right: 0; bottom: 92px; text-align: center; color: #fff; font-size: 19px; letter-spacing: .02em; text-shadow: 0 2px 14px rgba(0,0,0,.6); padding: 0 24px; }
.ss-credit { position: absolute; right: 16px; top: 14px; color: rgba(255,255,255,.5); font-size: 11px; letter-spacing: .04em; pointer-events: none; }
.ss-controls { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(26,21,18,.62); backdrop-filter: blur(10px); padding: 10px 16px; border-radius: 999px; color: #fff; flex-wrap: wrap; justify-content: center; max-width: 94vw; }
.ss-controls select { width: auto; background: rgba(255,255,255,.12); color: #fff; border-color: transparent; padding: 8px 12px; }
.ss-controls select option { color: #000; }
.ss-controls .iconbtn { width: 38px; height: 38px; }
.ss-vol { width: 90px; }

/* ---------- 뒤로가기 버튼 ---------- */
.title-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.backbtn {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 19px; display: grid; place-items: center;
  text-decoration: none; transition: background .15s ease; padding: 0;
}
.backbtn:hover { background: var(--accent-soft); }

/* ---------- 여러 장 선택 모드 ---------- */
.tile { position: relative; }
.grid.selecting .tile::after {
  content: ""; position: absolute; top: 8px; right: 8px; width: 24px; height: 24px;
  border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.28);
  box-shadow: 0 1px 5px rgba(0,0,0,.35); pointer-events: none;
}
.grid.selecting .tile.sel::after {
  content: "✓"; background: var(--accent); color: #fff;
  font-size: 14px; line-height: 24px; text-align: center;
}
.grid.selecting .tile.sel .ph { outline: 3px solid var(--accent); outline-offset: -3px; }
.grid.selecting .tile.sel .ph img { opacity: .85; }

.selbar {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 55;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 9px 12px;
  box-shadow: 0 8px 30px rgba(40,30,20,.35); max-width: 94vw;
}
.selbar .selcnt { font-size: 13px; padding: 0 8px; white-space: nowrap; }
.selbar button {
  border: none; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff;
  font-size: 12.5px; padding: 8px 14px; white-space: nowrap; transition: background .15s;
}
.selbar button:hover { background: rgba(255,255,255,.26); }
.selbar button:disabled { opacity: .4; cursor: default; }
.selbar button.red { color: #ffb9a6; }

/* ---------- 모달 (prompt/confirm 대체) ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 80; background: rgba(36,30,25,.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  width: 100%; max-width: 380px; background: var(--bg); border-radius: 12px;
  padding: 24px 22px 20px; box-shadow: 0 18px 60px rgba(40,30,20,.3);
}
.modal h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: .02em; margin: 0 0 10px; }
.modal-desc { font-size: 13.5px; color: var(--muted); margin: 0 0 6px; line-height: 1.7; }
.modal .modal-input { margin: 6px 0 4px; }
.modal-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; max-height: 40vh; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.btn.mdanger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.mdanger:hover { background: #9c4c38; border-color: #9c4c38; }

/* 로딩 / 토스트 */
.spinner { width: 24px; height: 24px; border: 2px solid var(--hairline); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 13.5px; z-index: 90; opacity: 0; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ---------- 새 소식 / 배지 (1) ---------- */
.news {
  background: #fff; border: 1px solid var(--hairline); border-left: 3px solid var(--accent);
  border-radius: var(--radius-card); padding: 14px 18px; margin: -14px 0 30px;
  font-size: 14px; color: var(--ink); line-height: 1.8;
}
.news a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.navdot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-left: 6px; vertical-align: 8px;
}
.tile .ph { position: relative; }
.tile .counts { display: flex; gap: 10px; color: var(--muted); white-space: nowrap; }
.newchip {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--accent); color: #fff; font-size: 11px; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 999px; pointer-events: none;
}

/* ---------- 하트 (2) ---------- */
.rxbar { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.rxbtn {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 18px; display: grid; place-items: center;
  transition: all .15s ease; padding: 0;
}
.rxbtn:hover { border-color: var(--danger); color: var(--danger); }
.rxbtn.on { background: #f7ece8; border-color: #e6cfc6; color: var(--danger); }
.rxinfo { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------- 동영상 (4) ---------- */
.vbadge {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(26,21,18,.62); color: #fff; font-size: 12px;
  display: grid; place-items: center; padding-left: 2px; pointer-events: none;
}
.lb-stage video { max-width: 100%; max-height: 100%; border-radius: var(--radius-img); outline: none; }

/* ---------- 이야기 글쓰기 + 첨부 (5) ---------- */
.bcomposer { margin: 4px 0 14px; }
.bcomposer textarea { min-height: 64px; }
.brow { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.brow .attname { font-size: 12.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .attach { margin-top: 10px; position: relative; display: inline-block; cursor: pointer; max-width: 300px; }
.msg .attach img { width: 100%; border-radius: 8px; border: 1px solid var(--hairline); }
.msg .attach:hover img { opacity: .93; }

/* ---------- 모바일 ---------- */
@media (max-width: 760px) {
  .topbar-inner { padding: 24px 22px 0; }
  .brand { font-size: 19px; letter-spacing: 0.12em; }
  .navtoggle {
    display: flex; flex-direction: column; gap: 5px; position: absolute; top: 28px; left: 22px;
    background: transparent; border: none; padding: 4px;
  }
  .navtoggle span { width: 19px; height: 1px; background: #5a5247; display: block; }
  .avatar-wrap { top: 22px; right: 22px; }
  .avatar-btn { width: 34px; height: 34px; font-size: 10px; }
  .nav {
    display: none; flex-direction: column; gap: 0; margin-top: 18px; border-top: 1px solid var(--hairline);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--hairline); margin: 0; }
  .nav a.on { border-bottom-color: var(--hairline); color: var(--accent-deep); }
  .container { padding: 30px 22px 56px; }
  .page-head h2 { font-size: 26px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 24px 22px; }
  .lb-body { flex-direction: column; }
  .lb-side { width: 100%; max-height: 42vh; }
  .people { grid-template-columns: 1fr; }
}
