/* =========================================================
   kakao.css  —  카카오톡 앱 디자인
   ========================================================= */

.kk-app { position: absolute; inset: 0; background: #fff; color: #191919; font-size: 14px; line-height: 1.35; overflow: hidden; }
:where(.kk-app) button { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; padding: 0; }
:where(.kk-app) input { font: inherit; }
.kk-ic { width: 22px; height: 22px; display: block; }
.kk-av { flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; background-size: cover; background-position: center; }

/* 홈 화면 아이콘 위 빨간 숫자 */
.app-ico { position: relative; }
.app-badge {
  position: absolute; top: -5px; right: 4px; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box;
  border-radius: 11px; background: #ff3b30; color: #fff; font: 600 13px/22px -apple-system, sans-serif; font-style: normal;
  display: none; align-items: center; justify-content: center; text-shadow: none;
}

/* ---------- 탭 ---------- */
.kk-panels { position: absolute; left: 0; right: 0; top: 0; bottom: 84px; }
.kk-panel { position: absolute; inset: 0; display: none; flex-direction: column; background: #fff; }
.kk-panel.on { display: flex; }
.kk-top { flex: none; padding-top: 54px; background: #fff; }
.kk-top-in { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.kk-top-in > b { font-size: 21px; font-weight: 800; }
.kk-top-r { display: flex; gap: 18px; align-items: center; }
.kk-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
.kk-scroll::-webkit-scrollbar { display: none; }
.kk-endpad { height: 24px; }
.kk-empty { text-align: center; color: #999; padding: 60px 0; }

.kk-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; padding-bottom: 28px; background: #fff; border-top: 1px solid #eee; display: flex; z-index: 3; }
.kk-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #b5b5b5; font-size: 10.5px; position: relative; }
.kk-nav button.on { color: #191919; }
.kk-nav .kk-ic { width: 26px; height: 26px; }
.kk-badge { position: absolute; top: 4px; left: 50%; margin-left: 6px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: #ff3b30; color: #fff; font: 700 12px/20px sans-serif; font-style: normal; display: none; align-items: center; justify-content: center; }

/* ---------- 친구 ---------- */
.kk-me { display: flex; align-items: center; gap: 12px; padding: 10px 16px 12px; width: 100%; text-align: left; border-bottom: 1px solid #f1f1f1; }
.kk-fr-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.kk-fr-t b { font-size: 16px; font-weight: 600; }
.kk-fr-t small { color: #888; font-size: 13px; margin-top: 2px; }
.kk-sec { padding: 12px 16px 4px; font-size: 12.5px; color: #8a8a8a; }
.kk-sec em { font-style: normal; margin-left: 2px; }
.kk-fr { display: flex; align-items: center; gap: 12px; padding: 7px 16px; width: 100%; text-align: left; }
.kk-fr:active, .kk-ch:active, .kk-me:active { background: #f6f6f6; }
.kk-fr .kk-fr-t b { font-size: 15.5px; font-weight: 500; }
.kk-fr-s { max-width: 140px; border: 1px solid #e3e3e3; border-radius: 14px; padding: 4px 11px; font-size: 12px; color: #777; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 채팅 목록 ---------- */
.kk-ch { display: flex; align-items: center; gap: 12px; padding: 9px 16px; width: 100%; text-align: left; }
.kk-ch-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.kk-ch-b b { font-size: 15.5px; font-weight: 600; }
.kk-ch-p { color: #777; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kk-ch-r { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.kk-ch-r small { color: #a0a0a0; font-size: 11.5px; }
.kk-cnt { min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: #ff4d3d; color: #fff; font: 600 12px/20px sans-serif; font-style: normal; text-align: center; }

/* ---------- 위에 쌓이는 화면 ---------- */
.kk-ovs { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.kk-ov { position: absolute; inset: 0; background: #fff; pointer-events: auto; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.22,.8,.24,1); }
.kk-ov.in { transform: none; }

/* ---------- 프로필 ---------- */
.kk-ov.kk-profile { background: #3b3f4a; color: #fff; transform: translateY(100%); }
.kk-ov.kk-profile.in { transform: none; }
.kk-pf-bg { position: absolute; inset: 0; background: linear-gradient(170deg, #5c6475, #2a2d36); }
.kk-pf-x { position: absolute; left: 14px; top: 60px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #fff; z-index: 2; }
.kk-pf-c { position: absolute; left: 0; right: 0; bottom: 190px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 30px; }
.kk-pf-c b { font-size: 22px; margin-top: 8px; }
.kk-pf-c p { margin: 0; color: rgba(255,255,255,.8); font-size: 14px; }
.kk-pf-b { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px 46px; border-top: 1px solid rgba(255,255,255,.15); display: flex; justify-content: center; gap: 44px; }
.kk-pf-b button { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; font-size: 12.5px; }
.kk-pf-b .kk-ic { width: 26px; height: 26px; }

/* ---------- 채팅방 ---------- */
.kk-ov.kk-room { background: #abc1d1; }
.kk-ch-h { flex: none; padding-top: 54px; height: 100px; box-sizing: border-box; display: flex; align-items: center; padding-left: 6px; padding-right: 14px; background: #abc1d1; }
.kk-ch-h > b { flex: 1; font-size: 17px; font-weight: 700; }
.kk-back { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; flex: none; }
.kk-chatbody { padding: 6px 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.kk-day { text-align: center; padding: 10px 0 6px; }
.kk-day span { display: inline-block; background: rgba(0,0,0,.18); color: #fff; font-size: 12px; padding: 5px 14px; border-radius: 14px; }
.kk-unread { text-align: center; margin: 8px 0 2px; position: relative; }
.kk-unread::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid rgba(255,255,255,.55); }
.kk-unread span { position: relative; background: #abc1d1; padding: 0 10px; font-size: 12px; color: #fff; }
.kk-row { display: flex; gap: 8px; align-items: flex-end; }
.kk-row.me { justify-content: flex-end; }
.kk-row.them { align-items: flex-start; }
.kk-row-av { flex: none; width: 40px; }
.kk-row-av.sp { height: 1px; }
.kk-row-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 72%; }
.kk-nm { font-size: 12.5px; color: #3a3a3a; }
.kk-bw { display: flex; align-items: flex-end; gap: 5px; }
.kk-bb { padding: 8px 11px; border-radius: 4px 14px 14px 14px; background: #fff; font-size: 14.5px; word-break: break-word; white-space: pre-wrap; max-width: 100%; }
.kk-row.me .kk-bb { background: #fee500; border-radius: 14px 4px 14px 14px; max-width: 72%; }
.kk-row.them:not(.first) .kk-bb { border-radius: 14px; }
.kk-meta { flex: none; font-size: 10.5px; color: #4a5560; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.kk-row.me .kk-meta i { font-style: normal; color: #ffeb33; font-weight: 700; font-size: 11px; color: #e0b800; }
.kk-ph { width: 180px; height: 180px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.kk-in { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px 32px; background: #fff; }
.kk-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: #f2f2f2; border-radius: 18px; padding: 10px 14px; font-size: 15px; color: #191919; }
.kk-send { width: 36px; height: 36px; border-radius: 50%; background: #f0f0f0; color: #bbb; display: flex; align-items: center; justify-content: center; }
.kk-send.on { background: #fee500; color: #191919; }
.kk-empty.light { color: rgba(255,255,255,.9); }

/* 기본 프로필(사진 없음) */
.kk-av.def { background: #d9dde5; align-items: flex-end; overflow: hidden; }
.kk-av.def svg { display: block; margin-bottom: -6%; }

/* ---------- 선택지 (지효 채팅방) ---------- */
.kk-choice {
  position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; padding: 0 26px 70px; box-sizing: border-box;
  background: rgba(10, 12, 18, .58); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.kk-choice.on { display: flex; animation: kkFade .22s ease; }
.kk-pill {
  width: 100%; max-width: 330px; padding: 15px 14px; box-sizing: border-box; border-radius: 30px;
  background: rgba(238, 238, 240, .93); color: #222; font-size: 15.5px; font-weight: 600; text-align: center;
  border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.kk-pill:active { background: #fff; transform: scale(.98); }
@keyframes kkFade { from { opacity: 0; } to { opacity: 1; } }

/* 상대가 입력 중일 때 점 세 개 */
.kk-dots { display: flex; gap: 5px; align-items: center; padding: 12px 14px; }
.kk-dots i { width: 7px; height: 7px; border-radius: 50%; background: #9aa0a6; animation: kkDot 1s infinite ease-in-out; }
.kk-dots i:nth-child(2) { animation-delay: .15s; }
.kk-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes kkDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ---------- 답장 인용 / 바뀐 프로필 사진 ---------- */
.kk-rp { display: block; margin: 0 0 6px; padding: 0 0 6px; border-bottom: 1px solid rgba(0, 0, 0, .13); font-size: 12px; line-height: 1.35; }
.kk-rp b { display: block; font-weight: 700; color: rgba(0, 0, 0, .62); }
.kk-rp span { display: block; color: rgba(0, 0, 0, .5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.kk-av.alt { display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; }

/* 마지막 안내 선택지 (저절로 떠요) */
.kk-pill.end { background: rgba(110, 18, 30, .92); color: #fff; border-color: rgba(255, 130, 140, .55); font-size: 14.5px; line-height: 1.5; }
.kk-pill.end:active { background: rgba(140, 24, 38, .95); }
.kk-pill.end { word-break: keep-all; font-size: 14px; max-width: 340px; padding: 16px 18px; }

/* =========================================================
   추가: 음성 메시지 / 대화 밑 안내 문구 / 엔딩 문구 / 지지직 효과
   ========================================================= */

/* ---------- 음성 메시지 ---------- */
.kk-bb.kk-vc { display: flex; align-items: center; justify-content: space-between; gap: 46px; min-width: 158px; padding: 12px 18px 12px 16px; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.kk-row.me .kk-bb.kk-vc { max-width: none; }
.kk-vi { width: 16px; height: 16px; fill: #222; flex: none; display: block; }
.kk-vt { font-size: 14.5px; color: #222; font-variant-numeric: tabular-nums; }

/* ---------- 대화 밑 안내 문구 ---------- */
.kk-notice { align-self: center; text-align: center; margin: 14px 18px 4px; padding: 10px 16px; border-radius: 14px; background: rgba(0, 0, 0, .22); color: #fff; font-size: 13px; line-height: 1.5; word-break: keep-all; }

/* ---------- 엔딩 문구 (떴다가 천천히 사라져요) ---------- */
.kk-ending { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 0 24px; box-sizing: border-box; text-align: center; background: rgba(6, 8, 12, .86); opacity: 0; animation: kkEnd 5.6s ease forwards; }
.kk-ending b { font-size: 30px; font-weight: 800; letter-spacing: 2px; color: var(--ec, #fff); text-shadow: 0 0 16px var(--ec, #fff), 0 0 42px var(--ec, #fff); }
.kk-ending span { font-size: 17px; font-weight: 600; letter-spacing: 1px; color: var(--ec, #fff); opacity: .9; }
@keyframes kkEnd { 0% { opacity: 0; } 14% { opacity: 1; } 52% { opacity: 1; } 100% { opacity: 0; } }

/* FOREVER END: 검정색과 어두운 빨간색이 섞여서 퍼지는 효과 */
.kk-ending.fx-blood { background: #050102; overflow: hidden; }
.kk-ending.fx-blood::before, .kk-ending.fx-blood::after { content: ""; position: absolute; inset: -45%; border-radius: 50%; pointer-events: none; filter: blur(26px); transform: scale(0); opacity: 0; }
.kk-ending.fx-blood::before { background: radial-gradient(circle, rgba(150, 0, 16, .95) 0%, rgba(84, 0, 10, .9) 32%, rgba(20, 0, 3, 0) 68%); animation: kkBloodSpread 3.2s cubic-bezier(.2, .7, .2, 1) .15s forwards; }
.kk-ending.fx-blood::after { background: radial-gradient(circle at 38% 62%, rgba(0, 0, 0, .95) 0%, rgba(0, 0, 0, 0) 40%), radial-gradient(circle at 66% 34%, rgba(110, 0, 12, .85) 0%, rgba(0, 0, 0, 0) 45%); animation: kkBloodSpread 3.8s cubic-bezier(.2, .7, .2, 1) .7s forwards; }
.kk-ending.fx-blood b, .kk-ending.fx-blood span { position: relative; z-index: 1; }
.kk-ending.fx-blood b { color: #c4001d; text-shadow: 0 0 14px rgba(190, 0, 25, .9), 0 0 40px rgba(110, 0, 12, .9); }
.kk-ending.fx-blood span { color: #d35a68; }
@keyframes kkBloodSpread { 0% { transform: scale(0); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- 지지직 효과 ---------- */
.kk-ov.kk-room.kk-glitching { animation: kkGlitch .5s steps(1) infinite; }
.kk-ov.kk-room.kk-glitching::after { content: ""; position: absolute; inset: 0; z-index: 9; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.10) 0 2px, rgba(0,0,0,.10) 2px 4px); mix-blend-mode: overlay; animation: kkScan .2s steps(3) infinite; }
@keyframes kkGlitch {
  0%   { transform: translate(0, 0); filter: none; }
  12%  { transform: translate(-7px, 2px) skewX(4deg); filter: hue-rotate(90deg) contrast(1.6); }
  25%  { transform: translate(6px, -3px); filter: invert(.18) saturate(2.2); }
  38%  { transform: translate(-3px, 1px) skewX(-6deg); filter: hue-rotate(-70deg) brightness(1.3); }
  52%  { transform: translate(8px, 0); filter: contrast(1.8) grayscale(.5); }
  66%  { transform: translate(-5px, -2px) skewX(3deg); filter: hue-rotate(160deg); }
  80%  { transform: translate(3px, 3px); filter: invert(.1); }
  100% { transform: none; filter: none; }
}
@keyframes kkScan { from { background-position: 0 0; } to { background-position: 0 8px; } }
.kk-pill.gl { text-shadow: 2px 0 rgba(255, 0, 90, .75), -2px 0 rgba(0, 220, 255, .75); animation: kkPillGl .16s steps(2) infinite; }
@keyframes kkPillGl { 0% { transform: translate(0, 0); } 50% { transform: translate(-3px, 1px) skewX(-4deg); } 100% { transform: translate(3px, -1px) skewX(4deg); } }


/* =========================================================
   ▼ 전화 앱 디자인
   ========================================================= */

/* =========================================================
   phoneapp.css  —  전화 앱 디자인 (연락처 · 최근 기록 · 키패드 · 영상통화 화면)
   ========================================================= */

.ph-app { position: absolute; inset: 0; background: #fff; color: #111; font-size: 15px; line-height: 1.35; overflow: hidden; }
:where(.ph-app) button { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; padding: 0; -webkit-tap-highlight-color: transparent; }
.ph-ic { width: 24px; height: 24px; display: block; }
.ph-av { flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background-size: cover; background-position: center; }
.ph-av.def { background: #c9cdd6; align-items: flex-end; overflow: hidden; }
.ph-av.def svg { display: block; margin-bottom: -6%; }

/* ---------- 탭 ---------- */
.ph-panels { position: absolute; left: 0; right: 0; top: 0; bottom: 84px; }
.ph-panel { position: absolute; inset: 0; display: none; flex-direction: column; background: #fff; }
.ph-panel.on { display: flex; }
.ph-top { flex: none; padding-top: 54px; }
.ph-top h1 { margin: 0; padding: 6px 18px 10px; font-size: 30px; font-weight: 800; }
.ph-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
.ph-scroll::-webkit-scrollbar { display: none; }
.ph-endpad { height: 24px; }
.ph-empty { text-align: center; color: #9a9aa0; padding: 70px 0; }

.ph-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; padding-bottom: 28px; background: rgba(249, 249, 251, .96); border-top: 1px solid #e3e3e8; display: flex; z-index: 3; }
.ph-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #8e8e93; font-size: 10.5px; }
.ph-nav button.on { color: #007aff; }
.ph-nav .ph-ic { width: 26px; height: 26px; }

/* ---------- 연락처 / 최근 기록 목록 ---------- */
.ph-me { display: flex; align-items: center; gap: 12px; padding: 8px 18px 14px; border-bottom: 1px solid #ececf0; }
.ph-me span { display: flex; flex-direction: column; }
.ph-me b { font-size: 17px; font-weight: 600; }
.ph-me small { color: #8e8e93; font-size: 13px; }
.ph-row { display: flex; align-items: center; gap: 12px; padding: 8px 18px; width: 100%; text-align: left; }
.ph-row:active { background: #f1f1f4; }
.ph-row > b { font-size: 17px; font-weight: 500; }
.ph-row.rc { padding-top: 9px; padding-bottom: 9px; }
.ph-rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ph-rt b { font-size: 17px; font-weight: 600; }
.ph-rt small { display: flex; align-items: center; gap: 4px; color: #8e8e93; font-size: 13px; }
.ph-rt small .ph-ic { width: 14px; height: 14px; }
.ph-row em { font-style: normal; color: #8e8e93; font-size: 14px; flex: none; }

/* ---------- 연락처 카드 (위에 쌓이는 화면) ---------- */
.ph-ovs { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.ph-ov { position: absolute; inset: 0; background: #f2f2f7; pointer-events: auto; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.22, .8, .24, 1); }
.ph-ov.in { transform: none; }
.ph-ch { flex: none; padding-top: 54px; height: 100px; box-sizing: border-box; display: flex; align-items: center; padding-left: 6px; }
.ph-back { display: flex; align-items: center; gap: 0; color: #007aff; font-size: 17px; padding: 6px 8px; }
.ph-back .ph-ic { width: 24px; height: 24px; }
.ph-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 18px; }
.ph-card h2 { margin: 0; font-size: 26px; font-weight: 700; }
.ph-acts { display: flex; justify-content: center; gap: 14px; padding: 4px 18px 20px; }
.ph-acts button { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 70px; font-size: 12px; color: #007aff; }
.ph-acts i { font-style: normal; width: 58px; height: 58px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; color: #007aff; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.ph-acts i .ph-ic { width: 27px; height: 27px; }
.ph-acts button:active i { background: #e6e6ec; }
/* 영상통화 아이콘 위치를 알려 주는 은은한 반짝임 */
.ph-acts .vid.hl i { background: #34c759; color: #fff; animation: phPulse 1.6s ease-out infinite; }
.ph-acts .vid.hl { color: #1fa347; font-weight: 600; }
@keyframes phPulse { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, .55); } 100% { box-shadow: 0 0 0 16px rgba(52, 199, 89, 0); } }
.ph-info { margin: 0 18px; background: #fff; border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.ph-info small { color: #8e8e93; font-size: 13px; }
.ph-info b { font-size: 17px; font-weight: 500; color: #007aff; }

/* ---------- 키패드 ---------- */
.ph-kdisp { flex: none; height: 150px; padding-top: 54px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.ph-knum { font-size: 36px; font-weight: 400; letter-spacing: .5px; min-height: 44px; }
.ph-kgrid { flex: none; display: grid; grid-template-columns: repeat(3, 78px); gap: 14px 22px; justify-content: center; padding-top: 12px; }
.ph-key { width: 78px; height: 78px; border-radius: 50%; background: #e9e9ee; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ph-key:active { background: #c9c9d0; }
.ph-key b { font-size: 32px; font-weight: 400; }
.ph-key small { font-size: 10px; letter-spacing: 2px; color: #444; height: 11px; margin-top: 3px; font-weight: 600; }
.ph-kact { flex: none; display: grid; grid-template-columns: repeat(3, 78px); gap: 22px; justify-content: center; align-items: center; padding-top: 16px; }
.ph-kcall { width: 78px; height: 78px; border-radius: 50%; background: #34c759; display: flex; align-items: center; justify-content: center; }
.ph-kcall:active { background: #27a548; }
.ph-kcall .ph-ic { width: 36px; height: 36px; }
.ph-kdel { width: 78px; height: 78px; display: flex; align-items: center; justify-content: center; color: #8e8e93; }
.ph-kdel .ph-ic { width: 32px; height: 32px; }

/* ---------- 영상통화 화면 ---------- */
.ph-call { position: absolute; inset: 0; z-index: 30; background: #000; color: #fff; display: none; overflow: hidden; }
.ph-call.on { display: block; }
.ph-cv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; opacity: 0; transition: opacity .5s; }
.ph-call.live .ph-cv { opacity: 1; }
.ph-cshade { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0, rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, 0) 68%, rgba(0, 0, 0, .6) 100%); }
.ph-call.live .ph-cshade { opacity: 1; }
.ph-call.live.hide .ph-cshade { opacity: 0; }

/* 거는 중 */
.ph-cring { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 190px; box-sizing: border-box; background: linear-gradient(170deg, #4a5062, #14161c); transition: opacity .5s; }
.ph-call.live .ph-cring, .ph-call.ending.live .ph-cring { opacity: 0; pointer-events: none; }
.ph-cname { font-size: 30px; font-weight: 700; margin-top: 8px; }
.ph-cdots { font-size: 16px; color: rgba(255, 255, 255, .75); }
.ph-cdots i { font-style: normal; animation: phDot 1.2s infinite; opacity: .2; }
.ph-cdots i:nth-child(2) { animation-delay: .2s; }
.ph-cdots i:nth-child(3) { animation-delay: .4s; }
@keyframes phDot { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.ph-cav .ph-av { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35); animation: phRing 1.8s ease-out infinite; }
@keyframes phRing { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35); } 100% { box-shadow: 0 0 0 30px rgba(255, 255, 255, 0); } }

/* 통화 중 위쪽 정보 */
.ph-ctop { position: absolute; left: 18px; top: 64px; display: none; flex-direction: column; gap: 2px; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); transition: opacity .3s; }
.ph-ctop b { font-size: 20px; font-weight: 700; }
.ph-ctop span { font-size: 14px; color: rgba(255, 255, 255, .85); font-variant-numeric: tabular-nums; }
.ph-call.live .ph-ctop { display: flex; }
.ph-call.live.hide .ph-ctop { opacity: 0; }

/* 아래 버튼들 */
.ph-cbar { position: absolute; left: 0; right: 0; bottom: 46px; display: flex; justify-content: center; gap: 16px; transition: opacity .3s, transform .3s; }
.ph-cb { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 66px; font-size: 11.5px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.ph-cb i { font-style: normal; width: 60px; height: 60px; border-radius: 50%; background: rgba(255, 255, 255, .22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; transition: background .15s; }
.ph-cb i .ph-ic { width: 27px; height: 27px; }
.ph-cb:active i { background: rgba(255, 255, 255, .4); }
.ph-cb.off i { background: #fff; color: #111; }
.ph-cb.end i { background: #ff3b30; }
.ph-call.live.hide .ph-cbar { opacity: 0; transform: translateY(14px); pointer-events: none; }
/* 거는 중에는 종료 버튼만 */
.ph-call.ringing .ph-cb:not(.end) { display: none; }

/* 통화 종료 / 재생 안내 */
.ph-cend { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; background: rgba(0, 0, 0, .55); opacity: 0; }
.ph-call.ending .ph-cend { display: flex; animation: phEnd .4s ease forwards; }
@keyframes phEnd { to { opacity: 1; } }
.ph-call.ending .ph-cbar, .ph-call.ending .ph-ctop { opacity: 0; }
.ph-tapplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; padding: 14px 22px; border-radius: 26px; background: rgba(255, 255, 255, .92); color: #111; font-weight: 700; font-size: 15px; z-index: 5; }
.ph-call.needtap .ph-tapplay { display: block; }
