/* Fixed composer geometry: input, heart, emoji picker and send never change places. */
.locket-phone-card :is(.feed-reply-pill,.chat-input-pill-wrap) { position: relative; display: flex; align-items: center; gap: 2px; height: 52px; min-height: 52px; padding: 6px 6px 6px 16px; border: 1px solid var(--locket-ui-border); border-radius: 28px; background: var(--locket-ui-raised); box-shadow: 0 2px 12px #0001; }
.locket-phone-card :is(.feed-reply-input,.chat-text-input) { flex: 1 1 0; min-width: 0; width: 0; height: 38px; padding: 0 6px 0 0; line-height: normal; font-size: 15px; font-weight: 600; color: var(--locket-ui-text); caret-color: var(--bs-primary); }
.locket-phone-card :is(.feed-reply-input,.chat-text-input)::placeholder { color: var(--locket-ui-muted); font-weight: 500; }
.locket-phone-card :is(.feed-quick-emoji,.feed-more-emoji-btn) { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 38px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--locket-ui-muted); font-size: 23px; transition: color .18s,background .18s; }
.locket-phone-card .feed-quick-emoji .ui-icon { width: 22px; height: 22px; }
.locket-phone-card :is(.feed-quick-emoji,.feed-more-emoji-btn):hover { transform: none; color: var(--bs-primary); background: rgba(var(--bs-primary-rgb),.08); }
.locket-phone-card .feed-quick-emoji:active .ui-icon { transform: scale(.86); }
.locket-phone-card .chat-send-btn { position: relative; display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; margin-left: 2px; border-radius: 50%; background: rgba(var(--bs-primary-rgb),.15); color: var(--bs-primary); box-shadow: none; transition: background .18s,color .18s,transform .18s; }
.locket-phone-card .chat-send-btn:hover { transform: none; }
.locket-phone-card .chat-send-btn:active { transform: scale(.92); }
.locket-phone-card :is(.has-text,[data-send-state="pending"],[data-send-state="success"]) .chat-send-btn { background: var(--bs-primary); color: var(--locket-accent-ink); }
.locket-phone-card .chat-send-btn:disabled { opacity: 1; }
.send-glyph { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .2s cubic-bezier(.2,.8,.2,1),opacity .16s; pointer-events: none; }
.send-glyph .ui-icon { width: 23px; height: 23px; }
.send-check { opacity: 0; transform: translateY(5px) scale(.65); }
.send-progress { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3px; opacity: 0; transition: opacity .16s; }
.send-progress i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
[data-send-state="pending"] .send-arrow { opacity: 0; transform: translateY(-7px) scale(.8); }
[data-send-state="pending"] .send-progress { opacity: 1; }
[data-send-state="pending"] .send-progress i { animation: send-dot .85s ease-in-out infinite; }
[data-send-state="pending"] .send-progress i:nth-child(2) { animation-delay: .12s; }
[data-send-state="pending"] .send-progress i:nth-child(3) { animation-delay: .24s; }
[data-send-state="success"] .send-arrow { opacity: 0; transform: translateY(-7px) scale(.8); }
[data-send-state="success"] .send-check { opacity: 1; transform: none; }
[data-send-state="success"] .send-check .ui-icon { stroke-dasharray: 22; animation: send-tick .26s ease-out both; }
[data-reaction-state="pending"] .feed-quick-emoji .ui-icon { animation: reaction-wait .8s ease-in-out infinite alternate; color: var(--bs-primary); }
/* Non-error announcements stay available to screen readers without adding a row. */
:is(#chatSendStatus,#feedStatusToast,#mdSendStatus):not([data-state="error"]) { position: absolute !important; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:is(#chatSendStatus,#feedStatusToast,#mdSendStatus)[data-state="error"] { position: absolute; z-index: 8; bottom: calc(72px + env(safe-area-inset-bottom,0px)); left: 16px; right: 16px; width: auto; padding: 10px 14px; border: 1px solid var(--locket-ui-border); border-radius: 14px; background: var(--locket-ui-card); color: var(--locket-ui-text); font-size: 12px; line-height: 1.5; box-shadow: 0 6px 22px #0003; }
.feed-bottom-chrome #feedStatusToast[data-state="error"] { bottom: calc(100% + 8px); }
.md-bottom { position: relative; }
.chat-bubble-row { animation: none; }
.chat-bubble-row.just-sent { animation: sent-bubble .28s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom right; }
.chat-bubble-row.emoji-message .chat-bubble { font-family: 'Apple Color Emoji','Segoe UI Emoji',sans-serif; font-size: 28px; line-height: 1.25; padding: 7px 12px; }
.md-emoji-btn.is-reacting { animation: reaction-wait .8s ease-in-out infinite alternate; }
.reaction-feedback { position: absolute; z-index: 15; top: 50%; left: 50%; width: 80px; height: 80px; margin: -40px 0 0 -40px; display: grid; place-items: center; pointer-events: none; color: var(--bs-primary); animation: reaction-out .9s ease both; }
.reaction-feedback::before { content: ''; position: absolute; inset: 6px; border: 1px solid currentColor; border-radius: 50%; animation: reaction-ring .65s ease-out both; }
.reaction-feedback-glyph { width:46px; height:46px; color:var(--bs-primary); filter:drop-shadow(0 6px 12px color-mix(in srgb,var(--bs-primary) 22%,transparent)); animation:reaction-pop .62s cubic-bezier(.2,.8,.2,1) both; }
.reaction-float-glyph { width:28px; height:28px; color:var(--bs-primary); filter:drop-shadow(0 4px 8px color-mix(in srgb,var(--bs-primary) 20%,transparent)); }
.feed-media-card .emoji-burst-float { bottom:20%; line-height:0; animation:reaction-float .8s cubic-bezier(.22,.7,.3,1) both; }
@keyframes reaction-float { from { opacity:0; transform:translate3d(-50%,12px,0) scale(.7); } 25% { opacity:1; } to { opacity:0; transform:translate3d(-50%,-80px,0) scale(1); } }
.reaction-feedback > i { position: absolute; inset: 0; transform: rotate(calc(var(--spark-index)*120deg + 15deg)); }
.reaction-feedback > i::after { content: ''; position: absolute; left: 50%; top: -3px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: reaction-spark .65s ease-out both; }
@keyframes send-dot { 0%,60%,100% { opacity: .45; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes send-tick { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }
@keyframes sent-bubble { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes reaction-wait { to { opacity: .35; } }
@keyframes reaction-pop { 0% { opacity: 0; transform: scale(.45); } 28% { opacity: 1; transform: scale(1.08); } 48%,76% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: translateY(-18px) scale(.85); } }
@keyframes reaction-ring { from { opacity: .5; transform: scale(.6); } to { opacity: 0; transform: scale(1.5); } }
@keyframes reaction-spark { from { opacity: .9; transform: translateY(12px); } to { opacity: 0; transform: translateY(-12px); } }
@keyframes reaction-out { 0%,75% { opacity: 1; } 100% { opacity: 0; } }
/* Equal side columns keep the friend selector on the actual center line. */
@media (max-width: 1024px), (pointer: coarse) {
  .locket-phone-card :is(.locket-top-bar,.history-top-bar) { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; height: 64px; padding: 10px 12px; }
  .locket-phone-card :is(.locket-top-bar,.history-top-bar) .locket-avatar-btn { justify-self: start; width: 40px; height: 40px; border-width: 2px; margin: 0; }
  .locket-phone-card :is(.locket-top-bar,.history-top-bar) .locket-friends-pill { position: static; left: auto; justify-self: center; transform: none; min-width: 0; max-width: 100%; height: 40px; min-height: 40px; padding: 0 12px; gap: 6px; font-size: 15px; line-height: 1; }
  .locket-phone-card .locket-friends-pill > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .locket-phone-card .locket-header-actions { justify-self: end; gap: 4px; }
  .locket-phone-card .locket-header-actions :is(.palette-button,.locket-circle-icon) { display: grid; place-items: center; flex-basis: 40px; width: 40px; height: 40px; padding: 8px; margin: 0; background: var(--locket-ui-raised); }
  .locket-phone-card .locket-header-actions svg { width: 22px; height: 22px; }
  .locket-phone-card .palette-button { color: var(--bs-primary); }
  .locket-phone-card .chat-input-bar { padding: 8px 12px calc(8px + env(safe-area-inset-bottom,0px)); }
  .locket-phone-card .detail-chat-input-bar { padding: 0; }
  .locket-phone-card .feed-bottom-chrome { padding-inline: 12px; }
  .locket-phone-card :is(.feed-reply-input,.chat-text-input) { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .send-glyph,.send-progress,.locket-phone-card .chat-send-btn { transition: none; }
  .send-progress i,.send-check .ui-icon,.chat-bubble-row.just-sent,.reaction-feedback,.reaction-feedback::before,.reaction-feedback-glyph,.reaction-feedback > i::after,.md-emoji-btn.is-reacting,[data-reaction-state="pending"] .feed-quick-emoji .ui-icon { animation: none !important; }
  .reaction-feedback::before,.reaction-feedback > i { display: none; }
}
