/* 틱톡 상세와 같은 기능들의 모양 — 재생 메뉴(속도·자동 스크롤) · 상세 카드 ⋯ · 공유 줄 · 분석 · 개인 정보 보호 설정 ·
 * 퍼가기 · 친구에게 보내기 · 댓글 입력(@·이모지·보내기) · 댓글 고정 · 메시지 화면 · 차단.
 * xex.css 의 토큰(--bg·--chip·--accent …)만 쓴다. 2026-09-15 */

.m-only { display: none; }
@media (max-width: 767px) { .m-only { display: inline-grid; } }

/* ── 팝업 메뉴 안의 속도 줄 ── */
.menu-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 16px; font-size: 15px; font-weight: 600; }
.menu-row .mr-l { display: flex; align-items: center; gap: 12px; flex: none; }
.menu-row svg { width: 20px; height: 20px; }
.speed-seg { display: flex; margin-left: auto; background: var(--chip); border-radius: 18px; padding: 3px; }
.speed-seg button { height: 28px; min-width: 40px; padding: 0 8px; border-radius: 14px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.speed-seg button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.speed-seg button:hover:not(.on) { color: var(--text); }
.menu-pop:has(.speed-seg) { min-width: 380px; }
@media (max-width: 420px) { .menu-pop:has(.speed-seg) { min-width: 0; width: calc(100vw - 16px); } .speed-seg button { min-width: 0; padding: 0 6px; } }

/* ── 폰 공유 시트 아랫줄(신고·관심 없음·재생 설정 / 설정·분석·삭제) ── */
.share-acts { border-top: 1px solid var(--line); padding-top: 16px; margin-top: -4px; }
.share-acts .ic { background: var(--chip); color: var(--text); }
.share-acts button[data-a="delete"] .ic { color: #ff4d62; }
.share-grid button { text-align: center; line-height: 1.25; word-break: keep-all; }

/* ── PC 상세 ── */
.dt-pip { right: 20px; bottom: 20px; } /* 옆 소리 단추가 기둥 맨 위로 가서(2026-10-10) 그 자리로 */
.dt-stage .dt-owner { position: absolute; left: 20px; bottom: 48px; z-index: 3; display: flex; gap: 8px; }
.dt-owner[hidden] { display: none; }
.dt-owner button { height: 40px; padding: 0 16px; border-radius: 20px; background: rgba(84,84,84,.6); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dt-owner button:hover { background: rgba(84,84,84,.85); }
.dt-owner svg { width: 18px; height: 18px; }
.dt-cardmore { margin-left: auto; flex: none; }
.dt-cardmore svg { width: 22px; height: 22px; }
.dt-vis { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 2px 8px; border-radius: 4px; background: var(--chip); color: var(--text-2); font-size: 13px; font-weight: 600; }
.dt-vis svg { width: 14px; height: 14px; }
.dt-acts .r { align-items: center; gap: 8px; }
.dt-acts .r button { width: 28px; height: 28px; }
.dt-acts .r button[data-share] svg { width: 20px; height: 20px; }

/* ── 개인 정보 보호 설정 ── */
.pv-field > b { display: block; font-size: 15px; margin-bottom: 8px; }
.pv-opts { display: grid; gap: 4px; margin-bottom: 16px; }
.pv-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.pv-opt:hover { background: var(--bg-hover); }
/* 시크릿 영상 — 고를 게 없어 한 줄만 보인다(ui/video-tools.js SECRET_VIS) */
.pv-fixed { cursor: default; padding-left: 0; }
.pv-fixed:hover { background: none; }
.pv-opt input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.pv-opt span b, .pv-row span b { display: block; font-size: 15px; }
.pv-opt small, .pv-row small { display: block; color: var(--text-2); font-size: 13px; }
.pv-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px; border-top: 1px solid var(--line); }
.pv-status { min-height: 20px; margin: 8px 0 0; font-size: 13px; text-align: right; }

/* ── 분석 ── */
.an-modal { width: min(100%, 560px); }
.an-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.an-head img, .an-head .an-ph { width: 56px; height: 74px; object-fit: cover; border-radius: 6px; background: var(--chip); flex: none; }
.an-cap { margin: 0 0 4px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.an-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.an-cell { background: var(--chip); border-radius: 10px; padding: 12px; display: grid; gap: 2px; }
.an-cell svg { width: 18px; height: 18px; color: var(--text-2); }
.an-cell b { font-size: 22px; }
.an-cell small { color: var(--text-2); font-size: 13px; }
.an-rate { margin: 14px 0 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.an-rate b { font-size: 18px; color: var(--accent-2); }
.an-sub { margin: 18px 0 8px; font-size: 15px; }
.an-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 140px; align-items: end; }
.an-bar { display: grid; grid-template-rows: 1fr auto auto; justify-items: center; height: 100%; gap: 2px; }
.an-bar i { align-self: end; width: 70%; min-height: 3px; border-radius: 4px 4px 0 0; background: var(--accent); }
.an-bar b { font-size: 12px; }
.an-bar small { font-size: 11px; color: var(--text-3); }

/* ── 퍼가기 ── */
.embed-modal { width: min(100%, 680px); }
.embed-warn { background: rgba(255,59,107,.12); color: var(--like); border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 0 0 12px; }
.embed-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
.embed-prev { aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: #000; }
.embed-prev iframe { width: 100%; height: 100%; border: 0; }
.embed-code { display: grid; gap: 10px; align-content: start; }
.embed-code textarea { width: 100%; resize: none; background: var(--chip); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: 12px/1.5 ui-monospace, Consolas, monospace; }
@media (max-width: 600px) { .embed-wrap { grid-template-columns: 1fr; } .embed-prev { width: 60%; margin: 0 auto; } }

/* ── 친구에게 보내기 · 새 메시지 ── */
.send-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 20px; background: var(--chip); }
.send-search svg { width: 18px; height: 18px; color: var(--text-3); }
.send-search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font-size: 15px; min-width: 0; }
.send-list { margin-top: 8px; min-height: 240px; max-height: 50vh; overflow-y: auto; }
.send-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 8px; text-align: left; }
.send-row:hover { background: var(--bg-hover); }
.send-row .t { flex: 1; min-width: 0; }
.send-row .t b, .send-row .t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-row .t small { color: var(--text-2); font-size: 13px; }
.send-row .chk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.send-row .chk svg { width: 14px; height: 14px; }
.send-row.on .chk { background: var(--accent); border-color: var(--accent); color: #fff; }
.send-foot { align-items: center; }
.send-foot .inp { flex: 1; min-width: 0; }

/* ── 댓글 입력: 내 사진 · @ · 이모지 · 둥근 보내기 ── */
.cm-compose form { align-items: center; }
.cm-compose .cm-me { flex: none; display: grid; }
.cm-compose .cm-me .avatar { width: 32px; height: 32px; }
.cm-compose .box, .dm-form .box { position: relative; border-radius: 22px; }
/* min-width:0 — 없으면 입력칸이 제 기본 폭(글자 20칸) 아래로 안 줄어 좁은 폰(아이폰)에서 보내기 단추를 화면 밖으로 민다 */
.cm-compose .box, .dm-form .box, .cm-compose textarea, .dm-form textarea { min-width: 0; }
.ct-btn { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.ct-btn:hover { color: var(--text); background: var(--bg-hover); }
.ct-btn svg { width: 22px; height: 22px; }
.cm-compose .post { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.cm-compose .post svg { width: 20px; height: 20px; }
.cm-compose .post:disabled { background: var(--chip); color: var(--text-3); }
/* 쇼츠 댓글 1P(2026-10-10) — 보내기 단추 오른쪽 위 금색 꼬리표(입력칸 폭을 안 빼앗는다) */
.cm-compose .post { position: relative; overflow: visible; }
/* 댓글 1P 작은 안내(2026-10-10 소유자 「문구를 작게」) — 입력칸 밑 한 줄. 왼쪽은 내 사진(32)+간격(8), 오른쪽은 보내기(36)+간격(8) 만큼 들여 입력칸 밑에 맞춘다 · 꺾이지 않게 한 줄 */
.cm-compose .cm-cost-note { margin: 6px 44px 0 40px; font-size: 11px; line-height: 14px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-compose .post .cm-cost { position: absolute; top: -7px; right: -8px; min-width: 22px; height: 16px; padding: 0 4px; border-radius: 8px; background: #F5C542; color: #1a1a1a; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; pointer-events: none; box-shadow: 0 0 0 2px var(--bg); }
.ct-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 30; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; padding: 6px; }
.ct-pop button[data-mention] { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 6px; text-align: left; }
.ct-pop button[data-mention].on, .ct-pop button[data-mention]:hover { background: var(--bg-hover); }
.ct-pop button[data-mention] b, .ct-pop button[data-mention] small { display: block; font-size: 14px; }
.ct-pop button[data-mention] small { color: var(--text-2); font-size: 12px; }
.ct-pop .ct-empty { margin: 8px; color: var(--text-3); font-size: 13px; }
.ct-emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; }
.ct-emoji-grid button { height: 38px; border-radius: 6px; font-size: 22px; }
.ct-emoji-grid button:hover { background: var(--bg-hover); }

/* ── 댓글 고정 · 크리에이터가 좋아함 ── */
.cm-pin { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 2px; }
.cm-pin svg { width: 12px; height: 12px; }
.cm .sub .cm-creator-like { color: var(--text-3); font-size: 13px; }

/* ── 프로필 ── */
.pf-blocked { display: flex; align-items: center; gap: 6px; color: var(--like); font-size: 14px; margin: 8px 0 0; }
.pf-blocked svg { width: 16px; height: 16px; }

/* ── 사이드바 · 알림 화면의 메시지 ── */
/* 새 소식 수 — 메시지·알림·이벤트 셋 다 아이콘 오른쪽 위 같은 자리(아이콘 28px · 왼쪽 여백 8px → 오른쪽 끝 36px).
   빨간 동그라미에 바탕색 테두리를 둘러 아이콘 선과 떨어져 보이게 한다(소유자 그림) */
.sb-item .sb-n { position: absolute; left: 21px; top: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #f5223d; color: #fff; box-shadow: 0 0 0 2px var(--bg); font-size: 11px; line-height: 1; font-style: normal; font-weight: 800; display: grid; place-items: center; pointer-events: none; }
.sb-item .sb-n[hidden] { display: none; }
/* 아이콘만 보이는 좁은 사이드바 — 칸 48px 가운데 아이콘(10~38px) */
.app.sb-mini .sb-item .sb-n { left: 23px; }
@media (max-width: 1023px) and (min-width: 768px) { .app:not(.sb-wide) .sb-item .sb-n { left: 23px; } }
/* 폰 — 위 ☰ · 서랍 「메시지」「이벤트」. 모양은 위와 같고 아이콘 오른쪽 위에 (아래 탭은 2026-09-23 부터 다시 빨간 점) */
.drawer-nav a, #m-menu { position: relative; }
:is(.drawer-nav a, #m-menu) .sb-n { position: absolute; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #f5223d; color: #fff; box-shadow: 0 0 0 2px var(--bg); font-size: 11px; line-height: 1; font-style: normal; font-weight: 800; display: grid; place-items: center; pointer-events: none; }
:is(.drawer-nav a, #m-menu) .sb-n[hidden] { display: none; }
/* 폰 아래 탭(알림 · 지갑)은 숫자를 안 쓰고 빨간 점 하나다(2026-09-23 소유자 지시) — 팔로우 목록 점 .fl-dot 과 같은 색 */
.m-bottom a .dot { position: absolute; top: 6px; left: calc(50% + 6px); width: 8px; height: 8px; min-width: 0; padding: 0; border-radius: 50%; background: #ff2d55; box-shadow: 0 0 0 2px var(--bg); font-size: 0; display: block; pointer-events: none; }
.m-bottom a .dot[hidden] { display: none; }
.drawer-nav a .sb-n { left: 19px; top: 5px; }
#m-menu .sb-n { left: 20px; top: 1px; box-shadow: none; }
.sb-item#sb-messages[hidden] { display: none; }
.inbox-dm { display: flex; align-items: center; gap: 12px; padding: 12px 4px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.inbox-dm .ic { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.inbox-dm .ic svg { width: 22px; height: 22px; }
.inbox-dm .t { flex: 1; min-width: 0; }
.inbox-dm .t b, .inbox-dm .t small { display: block; }
.inbox-dm .t small { color: var(--text-2); font-size: 13px; }
.inbox-dm > svg { width: 18px; height: 18px; color: var(--text-3); }
.dm-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--like); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; display: grid; place-items: center; flex: none; }
.dm-n[hidden] { display: none; }

/* ── 메시지 화면 ── */
.dm { display: flex; height: 100vh; }
.dm-side { width: 360px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; position: relative; }
/* 대화 목록 「맨 위로」(2026-09-20 소유자 지시) — 목록을 내렸을 때만 오른쪽 아래에 뜬다. PC·폰 같은 자리 */
.dm-top { position: absolute; right: 16px; bottom: 16px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); cursor: pointer; }
.dm-top[hidden] { display: none; }
.dm-top:hover { background: var(--chip); }
.dm-top svg { width: 22px; height: 22px; }
/* 구독자 전용(잠긴) 동영상 — 채팅 말풍선·「내 영상」 고르기 둘 다 격자와 같은 네모 모자이크 + 자물쇠(2026-09-20 소유자 지시) */
.dm-video.sublock, .mv-item.sublock { background: #1b1b22; }
/* 캔버스로 바뀌기 전 잠깐 — 선명한 표지가 한 순간 보이던 것을 막는다(말풍선·고르기) */
.dm-video.sublock img[data-mosaic], .mv-item.sublock img[data-mosaic] { filter: blur(10px) brightness(.8); transform: scale(1.12); }
/* 흐림은 캔버스에 구워져 있다(말풍선·고르기) — 픽셀 그대로 키우면(pixelated) 안개가 다시 각져 보인다 */
.dm-video .tl-mosaic, .mv-item .tl-mosaic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.8); }
.dm-video .tl-sub-lock, .mv-item .tl-sub-lock { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; pointer-events: none; }
.dm-video .tl-sub-lock .sub-lock-ic, .mv-item .tl-sub-lock .sub-lock-ic { position: static; width: 34px; height: 45px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
@media (max-width: 767px) { .dm-video .tl-sub-lock .sub-lock-ic, .mv-item .tl-sub-lock .sub-lock-ic { width: 27px; height: 36px; } }
/* 시크릿 영상(2026-09-20 소유자 지시) — 채팅 말풍선·「내 영상」 고르기의 회색 불사조 · 값 내고 보기 단추 */
.dm-video .tl-secret .secret-bird-ic, .mv-item .tl-secret .secret-bird-ic { position: static; width: 40px; height: 70px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
@media (max-width: 767px) { .dm-video .tl-secret .secret-bird-ic, .mv-item .tl-secret .secret-bird-ic { width: 32px; height: 56px; } }
.dm-video .cap.dm-secret-cap { font-weight: 700; }
.dm-msg .dm-secret-buy { margin-top: 6px; width: 100%; }
.dm-msg.mine .dm-secret-buy { margin-left: auto; }
/* 산 뒤 어디서 다시 보는지(2026-09-23 소유자 지시) — 말풍선 아래 작은 글씨 한 줄 */
.dm-msg .dm-secret-note { display: block; max-width: 260px; margin-top: 2px; color: var(--text-3); font-size: 11px; line-height: 1.45; }
.dm-msg.mine .dm-secret-note { margin-left: auto; text-align: right; }
/* 내가 보낸 시크릿을 상대가 샀을 때(2026-09-23 소유자 지시) — 말풍선 **왼편**에 「구매 완료」 */
.dm-secret-row { display: flex; align-items: flex-end; gap: 8px; }
.dm-secret-row .dm-video { flex: 0 0 auto; }
/* 표 + 영상(180px)이 말풍선 칸(70% · 폰 80%)보다 넓다 — 시크릿 줄이 든 말풍선만 넓혀 한 줄에 둔다 */
.dm-msg:has(> .dm-secret-row) { max-width: min(100%, 460px); }
/* 체크 + 「구매 완료」는 한 줄, 시각은 그 아래 — 글만 있을 때도 같은 자리에 오게 격자로 둔다 */
.dm-secret-paid { display: inline-grid; grid-template-columns: auto auto; align-items: center; justify-items: end; column-gap: 4px; row-gap: 1px; flex: 0 0 auto; padding: 7px 10px; border-radius: 12px; background: rgba(0, 224, 184, .14); color: var(--accent-2); font-size: 12px; line-height: 1.35; text-align: right; }
.dm-secret-paid svg { grid-column: 1; width: 13px; height: 13px; }
.dm-secret-paid b { grid-column: 2; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dm-secret-paid i { grid-column: 1 / -1; font-style: normal; font-size: 11px; color: var(--text-3); white-space: nowrap; }
[data-theme="light"] .dm-secret-paid { background: rgba(0, 176, 145, .12); color: #00806a; }
@media (max-width: 767px) { .dm-secret-paid { padding: 6px 8px; } .dm-secret-paid i { display: none; } }
/* 값 묻는 창 — 창 자체를 내용 폭(340px)에 맞춘다(2026-09-23). 480px 창 안에 360px 판만 넣었더니 오른쪽이 텅 비었다 */
.sc-modal { width: min(100%, 340px); }
.sc-modal .modal-head { padding: 14px 10px 0 20px; }
.sc-modal .modal-head h2 { font-size: 19px; }
.sc-ask { display: grid; justify-items: center; gap: 12px; padding: 10px 20px 20px; }
.sc-art { position: relative; width: 132px; height: 176px; border-radius: 12px; overflow: hidden; background: #1b1b22; display: grid; place-items: center; }
.sc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.8); }
/* 흐림은 캔버스에 구워져 있다(시크릿 말풍선) */
.sc-art .tl-mosaic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.8); }
/* 불사조는 칸을 가진 판 안에 둔다 — 빈 span 에 넣으면 공용 `img { max-width: 100% }` 가 0 폭으로 접어 그림이 통째로 사라진다 */
.sc-art .sc-bird { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 77px; }
.sc-art .secret-bird-ic { width: 44px; height: 77px; max-width: none; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.sc-help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); text-align: center; }
.sc-help b { color: var(--text); font-weight: 700; }
.sc-in { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.sc-in input { width: 160px; height: 46px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 20px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
/* 혹시 number 칸이 남아도 위아래 화살표는 그리지 않는다(2026-09-23 소유자 지시 — 숫자는 적기만 한다) */
.sc-in input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.sc-in input::-webkit-outer-spin-button, .sc-in input::-webkit-inner-spin-button { appearance: none; -webkit-appearance: none; margin: 0; }
.sc-in span { font-size: 16px; font-weight: 700; color: var(--text-2); }
.sc-err { margin: 0; font-size: 13px; color: var(--like); text-align: center; }
/* 값 묻는 창·「볼까요?」 확인 창 아래의 작은 안내(2026-09-23 소유자 지시) */
.sc-note { display: block; margin: 0; padding: 0 4px; color: var(--text-3); font-size: 11px; line-height: 1.5; text-align: center; }
.confirm .sc-note { margin-top: 8px; }
.dm-side-head { display: flex; align-items: center; gap: 8px; padding: 24px 16px 12px 20px; }
.dm-side-head h2 { margin: 0; font-size: 22px; flex: 1; }
.dm-threads { flex: 1; overflow-y: auto; padding: 0 8px 16px; }
.dm-count { font-size: 14px; font-weight: 600; color: var(--text-2); margin-left: 6px; }
.dm-count:empty { display: none; }
.dm-more { display: grid; place-items: center; padding: 12px 0 4px; }
.dm-more .spinner { width: 22px; height: 22px; border-width: 2px; margin: 0; }
.dm-t { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; }
.dm-t:hover { background: var(--bg-hover); }
.dm-t.on { background: var(--chip); }
.dm-t .t { flex: 1; min-width: 0; }
.dm-t .t b, .dm-t .t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-t .t small { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.dm-t.unread .t b, .dm-t.unread .t small { color: var(--text); font-weight: 700; }
.dm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; padding-top: 72px; }
.dm-none { margin: auto; }
.dm-head { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.dm-head .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.dm-head .who b, .dm-head .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-head .who small { color: var(--text-2); font-size: 13px; }
.dm-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.dm-older { align-self: center; margin-bottom: 12px; }
.dm-intro { display: grid; justify-items: center; gap: 4px; padding: 16px 0 24px; text-align: center; }
.dm-intro small { color: var(--text-2); }
.dm-intro .btn { margin-top: 8px; }
.dm-msgs { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.dm-time { align-self: center; color: var(--text-3); font-size: 12px; margin: 12px 0 4px; }
.dm-msg { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: min(70%, 420px); }
.dm-msg.mine { align-self: flex-end; align-items: flex-end; }
.dm-bubble { padding: 9px 13px; border-radius: 18px; background: var(--chip); font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.dm-msg.mine .dm-bubble { background: var(--accent); color: #fff; }
.dm-msg.mine .dm-bubble .hashtag { color: #fff; text-decoration: underline; }
.dm-video { position: relative; display: block; width: 180px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #111; color: #fff; }
.dm-video > img, .dm-video .dm-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dm-video .meta { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; align-items: center; gap: 6px; font-size: 12px; text-shadow: 0 1px 2px #000; }
.dm-video .meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-video .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 8px 8px; font-size: 12px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.dm-video .pl { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; opacity: .85; }
.dm-video.off { display: flex; align-items: center; justify-content: center; gap: 6px; aspect-ratio: auto; width: auto; padding: 12px 14px; color: var(--text-2); background: var(--chip); font-size: 13px; }
.dm-video.off svg { width: 18px; height: 18px; }
.dm-compose { border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.dm-form { display: flex; align-items: flex-end; gap: 8px; }
.dm-form .box { flex: 1; display: flex; align-items: center; background: var(--chip); padding: 0 6px 0 16px; min-height: 44px; }
.dm-form textarea { flex: 1; background: none; border: 0; outline: 0; resize: none; font-size: 15px; padding: 11px 0; max-height: 120px; line-height: 1.4; color: var(--text); }
.dm-send { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.dm-send svg { width: 22px; height: 22px; }
.dm-send:disabled { background: var(--chip); color: var(--text-3); }
.dm-cant { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-2); font-size: 14px; padding: 8px; text-align: center; }

/* ── 연락처 가림 안내(보내기 전 10초) · 가린 말풍선 표시 — 창구 api/dm-guard.mjs ── */
.dm-guarded { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 11px; }
.dm-guarded svg { width: 12px; height: 12px; }
.dm-guard-slot:not(:empty) { margin: 0 52px 10px; }
.dm-guard { border-radius: 14px; background: var(--chip); padding: 12px 14px 10px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.dm-guard-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dm-guard-h svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.dm-guard-h b { flex: 1; min-width: 0; }
.dm-guard-n { flex: none; min-width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.dm-guard-why { margin: 6px 0 8px; color: var(--text-2); font-size: 12px; line-height: 1.45; }
.dm-guard-pre { padding: 8px 12px; border-radius: 12px; background: var(--bg-2); font-size: 14px; white-space: pre-wrap; word-break: break-word; max-height: 96px; overflow: auto; }
[data-theme="light"] .dm-guard-pre { background: #fff; }
.dm-guard-bar { height: 3px; border-radius: 2px; background: var(--line); margin: 10px 0 8px; overflow: hidden; }
.dm-guard-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; animation: dm-guard-left linear forwards; }
@keyframes dm-guard-left { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.dm-guard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dm-guard-foot small { color: var(--text-2); font-size: 12px; }
.dm-guard-btns { display: flex; gap: 6px; margin-left: auto; }
.bc-guard:not(:empty) { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .dm-guard-bar i { animation: none; } }

/* ── 내 영상 보내기 · 팔로워 전체 메시지 ── */
.dm-side-head [data-broadcast] svg, .dm-myvid svg, .bc-pick svg { width: 24px; height: 24px; }
.dm-none-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dm-none-btns .btn { display: inline-flex; align-items: center; gap: 6px; }
.dm-none-btns .btn svg { width: 18px; height: 18px; }
.dm-myvid { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--text-2); }
.dm-myvid:hover { color: var(--text); background: var(--bg-hover); }
.dm-att-slot:not(:empty) { margin: 0 52px 8px; }
.dm-att { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 6px; border-radius: 12px; background: var(--chip); max-width: 420px; }
.dm-att > img, .dm-att > .ph { width: 40px; height: 56px; border-radius: 6px; object-fit: cover; background: #111; flex: none; }
.dm-att .t { flex: 1; min-width: 0; }
.dm-att .t b, .dm-att .t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-att .t b { font-size: 14px; }
.dm-att .t small { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.dm-att .icon-btn { flex: none; width: 32px; height: 32px; }
.dm-att .icon-btn svg { width: 18px; height: 18px; }

.mv-modal { width: min(100%, 560px); max-height: calc(100dvh - 40px); }
.mv-help { margin: 0 0 12px; font-size: 13px; }
/* 한 줄에 6칸 — PC·폰 모두(2026-09-17 소유자) */
.mv-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.mv-item { position: relative; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: #111; color: #fff; padding: 0; }
.mv-item > img, .mv-item > .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mv-item:hover > img { filter: brightness(1.12); }
.mv-item:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.mv-item .vw, .mv-item .at { position: absolute; left: 4px; display: flex; align-items: center; gap: 2px; font-size: 10px; font-weight: 600; line-height: 1.2; white-space: nowrap; text-shadow: 0 1px 2px #000; }
.mv-item .vw { bottom: 4px; }
.mv-item .at { top: 4px; }
.mv-item .vw svg { width: 10px; height: 10px; }
.mv-item.off > img { filter: brightness(.35); }
.mv-item .lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; }
.mv-item .lock svg { width: 13px; height: 13px; }
/* 그 사람에게 이미 보낸 시크릿 영상(2026-09-23 소유자 지시) — 자물쇠 대신 「보냄」 */
.mv-item .mv-sent { position: absolute; right: 4px; bottom: 4px; padding: 1px 5px; border-radius: 999px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 10px; font-weight: 700; line-height: 1.4; }
@media (max-width: 767px) { .mv-item .mv-sent { right: 3px; bottom: 3px; font-size: 9px; } }
.mv-more { display: grid; place-items: center; min-height: 24px; padding-top: 12px; }
.mv-more .spinner { margin: 0; }

/* 받는 사람 세 갈래(전체 · 구독자만 · 일반 회원) */
.bc-aud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.bc-aud button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 8px 4px; border-radius: 12px; background: var(--chip); border: 2px solid transparent; color: var(--text); text-align: center; }
.bc-aud button b { font-size: 14px; font-weight: 700; white-space: nowrap; }
.bc-aud button small { font-size: 11px; color: var(--text-3); line-height: 1.3; overflow-wrap: anywhere; }
.bc-aud button:hover:not(:disabled) { background: var(--bg-hover); }
.bc-aud button[aria-checked="true"] { border-color: var(--accent); }
.bc-aud button[aria-checked="true"] small { color: var(--accent); }
.bc-aud button:disabled { opacity: .45; cursor: default; }
.bc-to { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; }
.bc-to svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.bc-box { border-radius: 12px; background: var(--chip); padding: 12px; }
.bc-box textarea { display: block; width: 100%; background: none; border: 0; outline: 0; resize: vertical; min-height: 110px; max-height: 40vh; font-size: 15px; line-height: 1.5; color: var(--text); padding: 0; }
.bc-att:not(:empty) { margin-top: 8px; }
.bc-att .dm-att { background: var(--bg-2); }
[data-theme="light"] .bc-att .dm-att { background: #fff; }
.bc-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.bc-pick { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 8px; border-radius: 18px; font-size: 14px; font-weight: 600; color: var(--text); }
.bc-pick:hover { background: var(--bg-hover); }
.bc-n { color: var(--text-3); font-size: 12px; }
.bc-send { width: 100%; margin-top: 16px; }
@media (max-width: 767px) {
  .mv-grid { gap: 4px; }
  .mv-modal .modal-head { padding: 12px 8px 4px 16px; }
  .mv-modal .modal-body { padding: 4px 12px 16px; }
  .mv-item .vw, .mv-item .at { left: 3px; font-size: 9px; }
  .mv-item .vw { bottom: 3px; }
  .mv-item .at { top: 3px; }
  .dm-att-slot:not(:empty) { margin: 0 0 8px; }
  .dm-guard-slot:not(:empty) { margin: 0 0 8px; }
  .dm-myvid { width: 36px; margin-right: -4px; }
}

@media (max-width: 1023px) and (min-width: 768px) { .dm-top { right: 24px; width: 40px; height: 40px; } .dm-top svg { width: 20px; height: 20px; } }
@media (max-width: 1023px) { .dm-side { width: 88px; } .dm-side-head h2, .dm-t .t, .dm-t .dm-n { display: none; } .dm-side-head { justify-content: center; flex-wrap: wrap; gap: 4px; padding: 20px 0 12px; } .dm-t { justify-content: center; padding: 8px 0; } }
@media (max-width: 767px) {
  .dm { height: calc(100dvh - 56px - env(safe-area-inset-bottom)); }
  .dm-side { width: 100%; border-right: 0; }
  .dm-side-head { padding: 8px 4px; border-bottom: 1px solid var(--line); justify-content: space-between; }
  .dm-side-head h2 { display: block; font-size: 17px; text-align: center; }
  .dm-t .t, .dm-t .dm-n { display: block; }
  .dm-t .dm-n { display: grid; }
  .dm-t { justify-content: flex-start; padding: 10px 12px; }
  .dm-main { display: none; padding-top: 0; }
  .dm.has-thread .dm-side { display: none; }
  .dm.has-thread .dm-main { display: flex; }
  .dm-msg { max-width: 80%; }
}
/* 못 보내는 말 안내 — 가림 안내와 같은 판, 테두리만 빨강 */
.dm-blocked { border-color: color-mix(in srgb, #ff4d5e 55%, transparent); }
.dm-blocked .dm-guard-h svg { color: #ff4d5e; }

/* 메시지 설정 창(views/messages.js openDmPrice · 2026-09-19) — 한 통 가격 2~5P 네 칸. 칸 모양은 전체 메시지 받는 사람 칸(.bc-aud)을 빌린다 */
.dmp-modal { width: min(100%, 420px); }
.dmp-h { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.dmp-sub { margin: 0 0 14px; font-size: 13px; line-height: 1.5; }
.bc-aud.dmp-opts { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; }
.dmp-opts button { min-height: 72px; gap: 4px; }
.dmp-opts button b { font-size: 16px; }
.dmp-coin { width: 26px; height: 26px; object-fit: contain; }
.dmp-note { margin: 0; font-size: 12px; line-height: 1.55; word-break: keep-all; }
.dm-side-head [data-dm-price] svg { width: 24px; height: 24px; }
/* 가격 잠금 안내 줄(7일) — 월 구독 .sb-rule · 영상 가격 .pf-price-rule 과 같은 노란 자물쇠 줄 */
.dmp-rule { display: flex; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 207, 74, .14); font-size: 13px; line-height: 1.55; color: var(--text); word-break: keep-all; }
.dmp-rule svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: #d99a00; }
.dmp-rule b { font-weight: 600; }
.dmp-rule em { font-style: normal; font-weight: 700; color: #b87f00; }
[data-theme="dark"] .dmp-rule svg, [data-theme="dark"] .dmp-rule em { color: #ffcf4a; }
