/* 전화 */
#app-phone .ph-pane { display: none; }
#app-phone[data-tab="favorites"] .ph-favorites, #app-phone[data-tab="recents"] .ph-recents, #app-phone[data-tab="contacts"] .ph-contacts, #app-phone[data-tab="keypad"] .ph-keypad { display: block; }
#app-phone[data-tab="keypad"] .ph-keypad { display: flex; }
.ph-h { font-size: 32px; font-weight: 800; letter-spacing: -.5px; margin: 2px 16px 8px; }
.ph-row { appearance: none; border: 0; background: none; font: inherit; color: inherit; width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 16px; text-align: left; cursor: pointer; }
.ph-row:active { background: #f2f2f7; }
.ph-row + .ph-row .ph-txt { border-top: .5px solid #e5e5ea; }
.ph-av { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 17px; background: linear-gradient(#a5a9b3, #868a96); }
.ph-txt { flex: 1; min-width: 0; padding: 4px 0; display: flex; align-items: center; gap: 8px; }
.ph-txt > div { flex: 1; min-width: 0; }
.ph-txt b { display: block; font-size: 16.5px; font-weight: 500; }
.ph-txt b.miss { color: #ff3b30; }
.ph-txt small { font-size: 13px; color: #8e8e93; }
.ph-txt time { font-size: 14px; color: #8e8e93; }
.ph-info { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #007aff; color: #007aff; display: grid; place-items: center; font-size: 13px; font-weight: 700; font-style: italic; font-family: Georgia, serif; flex: none; }
.ph-search { display: flex; align-items: center; gap: 7px; margin: 0 16px 8px; padding: 0 10px; height: 36px; border-radius: 10px; background: rgba(118,118,128,.12); }
.ph-search svg { width: 15px; height: 15px; stroke: #8e8e93; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.ph-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 16px; }
.ph-letter { font-size: 13px; font-weight: 600; color: #8e8e93; padding: 10px 16px 2px; }
.ph-me { display: flex; align-items: center; gap: 12px; padding: 4px 16px 12px; border-bottom: .5px solid #e5e5ea; }
.ph-keypad { flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; padding-bottom: 12px; }
.ph-num { min-height: 46px; font-size: 34px; font-weight: 400; letter-spacing: 1px; text-align: center; padding: 0 20px; font-variant-numeric: tabular-nums; word-break: break-all; }
.ph-match { min-height: 22px; font-size: 14px; color: #007aff; margin-bottom: 14px; }
.ph-keys { display: grid; grid-template-columns: repeat(3, 78px); gap: 14px 26px; }
.ph-key { appearance: none; border: 0; width: 78px; height: 78px; border-radius: 50%; background: #e5e5ea; color: #000; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ph-key:active { background: #c7c7cc; }
.ph-key b { font-size: 34px; font-weight: 400; }
.ph-key small { font-size: 9.5px; font-weight: 700; letter-spacing: 2px; margin-top: 2px; }
.ph-keyrow { display: grid; grid-template-columns: repeat(3, 78px); gap: 0 26px; margin-top: 14px; align-items: center; }
.ph-call-btn { appearance: none; border: 0; width: 78px; height: 78px; border-radius: 50%; background: #34c759; display: grid; place-items: center; cursor: pointer; grid-column: 2; }
.ph-call-btn svg { width: 34px; height: 34px; fill: #fff; }
.ph-del { appearance: none; border: 0; background: none; color: #8e8e93; font-size: 15px; cursor: pointer; visibility: hidden; height: 78px; }
.ph-del.show { visibility: visible; }
.ph-tabs { flex: none; display: flex; justify-content: space-around; border-top: .5px solid #d1d1d6; padding: 5px 0 0; background: rgba(249,249,249,.96); }
.ph-tab { appearance: none; border: 0; background: none; font: inherit; color: #8e8e93; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 500; padding: 2px 8px; cursor: pointer; }
.ph-tab.on { color: #007aff; }
.ph-tab svg { width: 26px; height: 26px; fill: currentColor; }
.ph-detail { position: absolute; inset: 0; z-index: 3; background: #f2f2f7; display: none; flex-direction: column; padding-top: max(env(safe-area-inset-top), 6px); }
#app-phone.detail .ph-detail { display: flex; }
.ph-dhead { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 16px 16px; }
.ph-dhead .ph-av { width: 96px; height: 96px; font-size: 40px; }
.ph-dhead b { font-size: 26px; font-weight: 600; }
.ph-acts { display: flex; gap: 8px; padding: 0 16px; }
.ph-act { appearance: none; border: 0; flex: 1; background: #fff; border-radius: 12px; padding: 10px 0 8px; font: inherit; font-size: 11.5px; color: #007aff; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.ph-act svg { width: 22px; height: 22px; fill: currentColor; }
.ph-act:disabled { color: #c7c7cc; }
.ph-card { margin: 14px 16px 0; background: #fff; border-radius: 12px; padding: 10px 14px; }
.ph-card small { font-size: 13px; color: #8e8e93; } .ph-card div { font-size: 17px; color: #007aff; margin-top: 2px; }
.ph-calling { position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column; align-items: center; color: #fff; padding: calc(max(env(safe-area-inset-top), 6px) + 70px) 24px calc(max(env(safe-area-inset-bottom), 8px) + 40px);
  background: rgba(40,44,52,.82); backdrop-filter: blur(30px) saturate(1.2); -webkit-backdrop-filter: blur(30px) saturate(1.2); }
#app-phone.calling .ph-calling { display: flex; animation: appIn .3s ease; }
.ph-calling .c-state { font-size: 17px; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.ph-calling .c-name { font-size: 34px; font-weight: 500; margin-top: 6px; text-align: center; }
.ph-cgrid { display: grid; grid-template-columns: repeat(3, 76px); gap: 22px 28px; margin-top: auto; }
.ph-cbtn { appearance: none; border: 0; background: none; font: inherit; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.ph-cbtn span { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; transition: background .15s, color .15s; }
.ph-cbtn.on span { background: #fff; color: #333; }
.ph-cbtn svg { width: 30px; height: 30px; fill: currentColor; }
.ph-end { appearance: none; border: 0; width: 76px; height: 76px; border-radius: 50%; background: #ff3b30; display: grid; place-items: center; margin-top: 34px; cursor: pointer; }
.ph-end svg { width: 36px; height: 36px; fill: #fff; transform: rotate(135deg); }
.ph-demo { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 14px; }

/* 통화 화면: 프사 · 대화 · 수신 전화 */
.ph-calling { padding-top: calc(max(env(safe-area-inset-top), 6px) + 46px); }
.ph-cav { width: 84px; height: 84px; font-size: 34px; margin-bottom: 10px; }
.ph-calling .c-name { font-size: 30px; margin-top: 0; }
.ph-calling .c-state { margin-top: 4px; }
.ph-talk { width: 100%; flex: 1; min-height: 0; overflow-y: auto; margin: 18px 0 6px; display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.ph-line { display: flex; flex-direction: column; max-width: 82%; animation: phLine .35s ease; }
.ph-line small { font-size: 11.5px; color: rgba(255,255,255,.6); margin: 0 6px 2px; }
.ph-line span { background: rgba(255,255,255,.18); border-radius: 16px; padding: 8px 13px; font-size: 15px; line-height: 1.35; }
.ph-line.me { align-self: flex-end; align-items: flex-end; } .ph-line.me span { background: rgba(52,199,89,.55); }
@keyframes phLine { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ph-cgrid { margin-top: 6px; gap: 14px 28px; }
.ph-end { margin-top: 18px; }
.ph-inc { display: none; width: 100%; justify-content: space-around; margin-top: auto; }
.ph-inc button { appearance: none; border: 0; background: none; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; font: inherit; font-size: 13px; cursor: pointer; }
.ph-inc button svg { width: 76px; height: 76px; padding: 20px; border-radius: 50%; fill: #fff; }
.ph-dec svg { background: #ff3b30; transform: rotate(135deg); } .ph-acc svg { background: #34c759; animation: phRing 1s ease-in-out infinite; }
@keyframes phRing { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
#app-phone.incoming .ph-inc { display: flex; }
#app-phone.incoming .ph-cgrid, #app-phone.incoming .ph-end, #app-phone.incoming .ph-talk { display: none; }
