/* 틱톡 상세와 같은 기능들의 모양 — 재생 메뉴(속도·자동 스크롤) · 상세 카드 ⋯ · 공유 줄 · 분석 · 개인 정보 보호 설정 ·
 * 퍼가기 · 친구에게 보내기 · 댓글 입력(@·이모지·보내기) · 댓글 고정 · 메시지 화면 · 차단.
 * 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: 72px; bottom: 20px; }
.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); }
.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; }
.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); }
.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; }
.pf-btns [data-message] { min-width: 96px; }

/* ── 사이드바 · 알림 화면의 메시지 ── */
.sb-item .sb-n { position: absolute; left: 30px; top: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--like); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; display: grid; place-items: center; }
.sb-item .sb-n[hidden] { display: 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; }
.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-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; }
@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; 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%; }
}
