/* chat.css */
.chat-modal.chat-meet { background: transparent !important; }
.chat-modal.chat-phone { background: linear-gradient(180deg, #fff0f5, #fffaf6) !important; }
.chat-root { position: absolute; inset: 0; display: flex; flex-direction: column; font-family: var(--font); color: var(--ink); overflow: hidden; }
.chat-head { position: absolute; left: 8px; top: 8px; right: 76px; z-index: 3; display: flex; align-items: center; gap: 8px;
  background: rgba(255, 246, 238, .88); border: 2px solid var(--rose); border-radius: 18px; padding: 6px 10px; box-shadow: 0 3px 0 rgba(122, 47, 85, .25); }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--rose); background: #fff; flex: none; }
.chat-headtxt { min-width: 0; flex: 1; }
.chat-line1 { font-size: 17px; font-weight: bold; display: flex; gap: 6px; align-items: center; }
.chat-line2 { display: flex; gap: 6px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.chat-tag { color: var(--ink-soft); }
.chat-stage { background: var(--rose); color: #fff; border-radius: 9px; padding: 0 7px; text-shadow: 0 1px 0 var(--outline); }
.chat-heart b { color: var(--rose-deep); margin-right: 2px; }
.chat-heart { display: inline-flex; align-items: center; }
.chat-heart-bar { display: inline-block; width: 54px; height: 8px; border-radius: 4px; background: #f3d7e0; overflow: hidden; }
.chat-heart-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--rose-deep)); transition: width .5s; }
.chat-portrait { position: absolute; left: 0; right: 0; top: 0; height: 58%; display: flex; justify-content: center; align-items: flex-end; pointer-events: none; }
.chat-img { height: 100%; max-width: 100%; object-fit: contain; object-position: bottom; transform-origin: bottom; animation: chatbob 3.4s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3)); }
@keyframes chatbob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.01); } }
.chat-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 8px; box-sizing: border-box; }
.chat-meet .chat-bottom { height: 56%; background: linear-gradient(180deg, rgba(255, 246, 238, 0), rgba(255, 246, 238, .55) 12%); }
.chat-phone .chat-bottom { top: 64px; height: auto; }
.chat-phone .chat-head { left: 0; right: 0; top: 0; border-radius: 0; border-width: 0 0 2px; padding: 8px 76px 8px 12px; height: 48px; }
#stage.chatting #screen, #stage:has(#vn.on) #screen { visibility: hidden; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; background: rgba(255, 246, 238, .82); border: 2px solid #f4c4d4; border-radius: 16px; padding: 8px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: none; }
.chat-log::-webkit-scrollbar { display: none; }
.chat-row { display: flex; align-items: flex-end; gap: 6px; animation: chatpop .22s cubic-bezier(.3, 1.6, .5, 1); }
.chat-row.me { justify-content: flex-end; }
.chat-row.old { opacity: .55; }
@keyframes chatpop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.chat-mini { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: top; border: 1.5px solid var(--rose); background: #fff; flex: none; }
.chat-bubble { max-width: 76%; padding: 7px 12px; border-radius: 16px; font-size: 15px; line-height: 1.4; word-break: break-word; }
.them .chat-bubble { background: #fff; border: 2px solid #f4c4d4; border-bottom-left-radius: 4px; }
.me .chat-bubble { background: var(--rose); color: #fff; border-bottom-right-radius: 4px; text-shadow: 0 1px 0 var(--outline); }
.typing .chat-bubble { display: flex; gap: 4px; padding: 10px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--rose-deep); animation: chatdot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatdot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-chips { display: flex; gap: 6px; overflow-x: auto; flex: none; scrollbar-width: none; padding: 2px 0; }
.chat-chips::-webkit-scrollbar { display: none; }
.chat-chip { flex: none; min-height: 48px; padding: 0 14px; border-radius: 22px; border: 2px solid var(--rose); background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; white-space: nowrap; }
.chat-chip:active { transform: scale(.94); }
.chat-chip:focus-visible, .chat-send:focus-visible { outline: 3px solid var(--gold); }
.chat-inrow { display: flex; gap: 6px; flex: none; }
.chat-input { flex: 1; min-width: 0; height: 50px; box-sizing: border-box; border-radius: 23px; border: 2px solid var(--rose); background: #fff; padding: 0 16px; font-size: 16px; color: var(--ink); outline: none; }
.chat-input:focus { border-color: var(--rose-deep); box-shadow: 0 0 0 3px rgba(255, 143, 177, .35); }
.chat-send { width: 50px; height: 50px; flex: none; border-radius: 50%; border: 2px solid var(--outline); background: var(--rose); color: #fff; font-size: 20px; cursor: pointer; }
.chat-send:active { transform: scale(.9); }
.chat-actions { display: flex; gap: 8px; flex: none; justify-content: center; }
.chat-actions > * { flex: 1; min-height: 50px; }
.chat-actions > .gbtn.small { min-height: 50px; }
.chat-sheet-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding: 4px; }
.chat-gift { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .7); border-radius: 12px; padding: 4px 8px; min-height: 52px; }
.chat-gift img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.chat-gift-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.chat-gift-txt span { font-size: 12px; color: var(--ink-soft); }
.chat-gold { width: 18px; height: 18px; vertical-align: middle; }
.chat-spot { width: 100%; }
