/* Last Ten — 휴대폰 UI · 조명 스위치 */

/* 휴대폰 */
.modal-box.phone-modal { background: transparent; border: 0; box-shadow: none; padding: 0; min-width: 0; }
.modal-box.phone-modal .modal-x { right: -44px; top: 0; }
.phone.ph { width: 290px; height: 560px; }
.ph-screen { position: relative; width: 100%; height: 100%; border-radius: 26px; overflow: hidden; background: #f4f4f7; display: flex; flex-direction: column; color: #1a1a22; }
.ph-status { position: relative; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 10px 20px 4px 24px; font-size: 11px; }
.ph-gap { flex: 1; }
.ph-status b { font-family: var(--mono); font-weight: 400; }
.ph-led { width: 8px; height: 8px; border-radius: 50%; transition: background .3s; }
.ph-bat { font-size: 9px; letter-spacing: -1px; }
.ph-body { position: relative; flex: 1; min-height: 0; }
.ph-view { position: absolute; inset: 0; display: flex; flex-direction: column; }
.ph-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #e2e2ea; font-size: 15px; background: #fff; }
.ph-back { width: 26px; height: 26px; font-size: 22px; line-height: 1; color: #444; }
.ph-content { position: relative; flex: 1; overflow-y: auto; scrollbar-width: none; }
.ph-nav { display: flex; justify-content: center; gap: 70px; padding: 6px 0 10px; background: #e9e9ef; }
.ph-nav-btn { font-size: 18px; color: #555; width: 34px; }

/* 홈 */
.ph-home { background: linear-gradient(180deg, #8ec5d6 0%, #3f7f98 45%, #1f4d63 100%) center/cover; color: #fff; display: flex; flex-direction: column; align-items: center; }
.ph-clock { margin-top: 26px; font: 300 46px var(--font); text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.ph-date { font-size: 12px; opacity: .9; }
.ph-apps { display: grid; grid-template-columns: repeat(3, 70px); gap: 16px 10px; margin-top: 40px; }
.ph-app { display: flex; flex-direction: column; align-items: center; gap: 5px; color: #fff; }
.ph-icon { position: relative; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.ph-badge { position: absolute; right: -5px; top: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #ff3b30; color: #fff; font: 700 10px/18px var(--font); font-style: normal; }
.ph-app-name { font-size: 11.5px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }

/* 채팅 목록 */
.ph-chats { background: #fff; padding-bottom: 46px; }
.ph-chat { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-bottom: 1px solid #efeff4; text-align: left; }
.ph-chat:hover { background: #f6f6fa; }
.ph-avatar { flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.ph-avatar.small { width: 30px; height: 30px; border-radius: 11px; }
.ph-person { width: 46%; height: 62%; margin-top: 30%; border-radius: 50% 50% 40% 40% / 38% 38% 20% 20%; background: rgba(255, 255, 255, .85); position: relative; }
.ph-person::before { content: ""; position: absolute; left: 50%; top: -52%; width: 66%; height: 66%; margin-left: -33%; border-radius: 50%; background: rgba(255, 255, 255, .85); }
.ph-chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-chat-main b { font-size: 13.5px; }
.ph-preview { font-size: 12px; color: #6b6b78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-chat-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.ph-chat-side small { font-size: 10px; color: #9a9aa8; white-space: nowrap; }
.ph-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b30; color: #fff; font: 700 10.5px/18px var(--font); font-style: normal; text-align: center; }
.ph-tabbar { position: sticky; bottom: 0; display: flex; justify-content: space-around; padding: 8px 0; margin-top: 12px; background: #f7f7fa; border-top: 1px solid #e6e6ee; font-size: 10px; color: #888; }
.ph-tabbar .on { color: #1a1a22; font-weight: 700; }

/* 대화방 */
.ph-room { background: #b8cde0; padding: 10px 10px 16px; display: flex; flex-direction: column; gap: 8px; }
.ph-day { align-self: center; padding: 2px 10px; border-radius: 10px; background: rgba(0, 0, 0, .15); color: #fff; font-size: 10.5px; }
.ph-msg { display: flex; align-items: flex-end; gap: 5px; max-width: 92%; }
.ph-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.ph-bubble { padding: 7px 10px; border-radius: 12px; background: #fff; font-size: 12.5px; line-height: 1.45; word-break: keep-all; }
.ph-msg.me .ph-bubble { background: #ffe14d; }
.ph-msg small { font-size: 9.5px; color: #44546a; white-space: nowrap; }

/* 런런런 */
.ph-runner { background: #ffe5c2; padding: 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rn-board { position: relative; width: 100%; display: grid; gap: 3px; }
.rn-cell { border-radius: 4px; background: #6b5f52; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); }
.rn-cell.x { background: #e3342f; position: relative; }
.rn-cell.x::after { content: "\2715"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.rn-cell.goal { background: #5f6f86; position: relative; }
.rn-cell.goal::after { content: "\25C6"; position: absolute; inset: 0; display: grid; place-items: center; color: #8ff3ff; font-size: 16px; text-shadow: 0 0 6px #8ff3ff; }
.rn-runner { position: absolute; display: grid; place-items: center; font-size: 18px; transition: left .22s ease-out, top .22s ease-out; pointer-events: none; z-index: 2; }
.rn-info { font: 12px var(--mono); color: #7b5a35; }
.rn-pad { display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 40px); gap: 5px; }
.rn-btn { border-radius: 8px; background: #3e6fd8; color: #fff; font-size: 16px; box-shadow: 0 3px 0 #23479c; }
.rn-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #23479c; }
.rn-btn.reset { background: #7dad2f; box-shadow: 0 3px 0 #4e7313; }
.rn-clear { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(30, 20, 14, .84); color: #fff; animation: dlgIn .3s; }
.rn-clear b { font-size: 22px; }
.rn-clear span { font: 700 18px var(--mono); color: #ffd98a; letter-spacing: .06em; }

/* 색 세그먼트 */

/* 조명 스위치 */
.modal-box.switches { padding: 0; border: 0; background: #000; border-radius: 4px; overflow: hidden; min-width: 0; max-width: none; max-height: none; }
.sw-stage { position: relative; width: 900px; height: 600px; }
.sw-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.sw-led { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: #ff4d5a; box-shadow: 0 0 8px rgba(255, 77, 90, .8); transition: background .2s, box-shadow .2s; pointer-events: none; }
.sw-led.on { background: #3dff8a; box-shadow: 0 0 14px rgba(61, 255, 138, .9); }
.sw-rocker { position: absolute; border-radius: 6px; }
.sw-rocker::after { content: ""; position: absolute; left: 22%; right: 22%; height: 12%; bottom: 9%; border-radius: 3px; background: rgba(20, 20, 26, .85); }
.sw-rocker.up::after { bottom: auto; top: 9%; }
.sw-rocker:hover { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.sw-reset { position: absolute; border-radius: 8px; }
.sw-reset:hover { box-shadow: 0 0 0 2px rgba(143, 211, 255, .6); }
.sw-stage.solved { animation: swFlash .9s ease-out; }
@keyframes swFlash { 30% { filter: brightness(2.2); } }
.sw-tip { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 13px; color: var(--muted); pointer-events: none; }
