/* 채팅 사진(076, 2026-11-09): 메시지 속 사진 묶음, 입력칸 위 미리보기 줄, 크게 보기. 글 대화·개인 DM·모임 대화방 공통. */

/* 사진 메시지는 말풍선 배경 없이 사진 묶음만(시간은 그 아래) */
.bubble.is-photo{background:none;padding:0;border-radius:0;max-width:min(260px,78%)}
.bubble.is-photo time{display:block;margin-top:4px}
.bubble.is-photo.mine{color:var(--ink)}
.bubble.is-photo.mine time{text-align:right}
.social-messages li.is-photo{width:min(260px,78%)}
.social-messages li.is-photo small{margin-top:4px}
.social-messages li.mine.is-photo small{text-align:right}

.chat-photos{display:grid;grid-template-columns:repeat(6,1fr);gap:3px;width:100%;border-radius:var(--radius-card);overflow:hidden}
.chat-photo{position:relative;display:block;grid-column:span 3;aspect-ratio:1;min-width:0;min-height:44px;padding:0;border:0;border-radius:0;background:#eceef2;overflow:hidden;cursor:zoom-in}
.chat-photo img{display:block;width:100%;height:100%;object-fit:cover}
.chat-photos.n-1 .chat-photo{grid-column:1/-1;aspect-ratio:1}
.chat-photos.n-1 .chat-photo.is-wide{aspect-ratio:4/3}
.chat-photos.n-1 .chat-photo.is-tall{aspect-ratio:3/4}
.chat-photos.n-3 .chat-photo{grid-column:span 2}
.chat-photos.n-5 .chat-photo:nth-child(n+3){grid-column:span 2}
.chat-photo.is-loading{cursor:default;background:linear-gradient(100deg,#eceef2 40%,#f6f7f9 50%,#eceef2 60%) 0 0/300% 100%;animation:chat-photo-wait 1.4s linear infinite}
@keyframes chat-photo-wait{to{background-position:-150% 0}}
@media (prefers-reduced-motion:reduce){.chat-photo.is-loading{animation:none}}
.chat-photo:focus-visible{outline:3px solid var(--ink);outline-offset:-3px}
.chat-photos-error{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:10px 12px;border-radius:var(--radius-card);background:#f2f3f5;color:var(--muted);font-size:var(--text-meta)}
.chat-photos-error .textbtn{min-height:44px;padding:0 4px;font-size:var(--text-meta)}
.report-excerpt .chat-photos{max-width:160px;margin-top:4px}

/* ＋가 붙어 좁아진 입력칸(320px)에서 안내 문구가 두 줄로 넘어 잘리지 않게 한 줄 말줄임 */
.chat-composer textarea::placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ＋ 시트 항목의 보조 글 */
.chat-plus-item>span>small{display:block;margin-top:2px;color:var(--muted);font-size:var(--text-meta);font-weight:var(--w-regular)}

/* 입력칸 안 맨 위 미리보기 줄(입력칸과 함께 화면 아래에 붙음) */
.chat-composer.has-photo-tray{flex-wrap:wrap}
.chat-composer .chat-photo-tray{order:-1;flex:0 0 100%;min-width:0;padding:10px 0 4px;border-top:1px solid var(--line)}
.chat-photo-picks{display:grid;grid-template-columns:repeat(5,minmax(0,72px));gap:6px;margin:0;padding:2px 0 6px;list-style:none}
.chat-photo-picks li{position:relative;min-width:0;aspect-ratio:1}
.chat-photo-picks img{display:block;width:100%;height:100%;object-fit:cover;border-radius:var(--radius-control);background:#eceef2}
.chat-composer .chat-photo-tray button{min-height:0;padding:0;border:0;font-size:var(--text-control);font-weight:var(--w-strong)}
.chat-composer .chat-photo-tray .chat-photo-remove{position:absolute;top:0;right:0;display:block;width:min(44px,100%);height:min(44px,100%);background:none;color:#fff}
.chat-composer .chat-photo-tray .chat-photo-remove::before{content:"";position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;background:rgba(23,25,31,.78)}
.chat-photo-remove .icon{position:absolute;top:8px;right:8px;width:14px;height:14px;stroke-width:2.4}
.chat-composer .chat-photo-tray .chat-photo-more{display:grid;place-items:center;width:100%;height:100%;min-height:44px;border:1px dashed var(--line);border-radius:var(--radius-control);background:#f7f8fa;color:var(--muted)}
.chat-photo-status{margin:2px 0 6px;color:var(--muted);font-size:var(--text-meta);line-height:1.45;overflow-wrap:anywhere}
.chat-photo-status:empty{display:none}
.chat-photo-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap}
.chat-composer .chat-photo-tray .chat-photo-cancel{min-height:44px;padding:0 12px;background:none;color:var(--muted)}
.chat-composer .chat-photo-tray .chat-photo-send{min-height:44px;padding:0 18px;border-radius:999px;background:var(--primary);color:#fff}
.chat-composer .chat-photo-tray button:disabled{opacity:.45;cursor:default}

/* 크게 보기 */
dialog.chat-photo-viewer{position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;padding:0;border:0;background:#0b0c0f;color:#fff;overflow:hidden}
dialog.chat-photo-viewer::backdrop{background:#0b0c0f}
.chat-photo-bar{position:absolute;z-index:2;top:0;left:0;right:0;display:flex;align-items:center;gap:4px;padding:calc(6px + env(safe-area-inset-top)) 8px 6px 16px;background:linear-gradient(#0b0c0fcc,#0b0c0f00)}
.chat-photo-count{flex:1;min-width:0;font-size:var(--text-control);font-weight:var(--w-strong)}
.chat-photo-tool{display:grid;place-items:center;min-width:44px;min-height:44px;padding:0 10px;border:0;background:none;color:#fff;font-size:var(--text-control);font-weight:var(--w-strong)}
.chat-photo-tool .icon{width:24px;height:24px}
.chat-photo-stage{position:absolute;inset:0;display:grid;place-items:center;padding:calc(56px + env(safe-area-inset-top)) 0 calc(24px + env(safe-area-inset-bottom));touch-action:pan-y pinch-zoom}
.chat-photo-stage img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.chat-photo-wait{color:#ffffffb3;font-size:var(--text-body)}
.chat-photo-nav{position:absolute;z-index:2;top:50%;display:grid;place-items:center;width:44px;height:44px;margin-top:-22px;border:0;border-radius:50%;background:#ffffff26;color:#fff}
.chat-photo-nav.is-prev{left:8px}
.chat-photo-nav.is-next{right:8px}
.chat-photo-nav:disabled{visibility:hidden}
.chat-photo-nav .icon{width:22px;height:22px}

/* 신고된 대화 사진(운영자 검토 화면) */
.mod-photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin-top:6px}.mod-photo-grid a{display:block;aspect-ratio:1;background:#eceef2;overflow:hidden;min-height:44px}.mod-photo-grid img{display:block;width:100%;height:100%;object-fit:cover}.mod-photo-missing{grid-column:1/-1;color:var(--muted);font-size:var(--text-small)}
