:root {
  --bg: #000000;
  --panel: #05070d;
  --panel-2: #080d18;
  --text: #e9edef;
  --muted: #8696a0;
  --accent: #00d9ff;
  --bubble: #0a1322;
  --bubble-mine: #073b66;
  --border: rgba(134, 150, 160, 0.22);
}

* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }

.snake-screen { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; padding: 20px; background: radial-gradient(circle at top, rgba(0, 217, 255, 0.18), #000 48%); }
.snake-panel { width: min(440px, calc(100vw - 40px)); padding: 18px; border: 1px solid rgba(0, 217, 255, 0.22); border-radius: 28px; background: rgba(5, 7, 13, .94); box-shadow: 0 24px 80px rgba(0,0,0,.42), 0 0 42px rgba(0,217,255,.08); }
.snake-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.snake-topbar h1 { font-size: clamp(2.1rem, 8vw, 3.4rem); }
.snake-score { min-width: 96px; padding: 10px 14px; border: 1px solid rgba(0,217,255,.38); background: rgba(0,217,255,.12); color: var(--accent); box-shadow: none; }
.snake-board-wrap { padding: 10px; border-radius: 22px; border: 1px solid rgba(0,217,255,.18); background: radial-gradient(circle at center, rgba(0,217,255,.07), rgba(8,13,24,.95)); }
#snakeCanvas { display: block; width: 100%; aspect-ratio: 1 / 1; height: auto; border-radius: 16px; background: #02050a; box-shadow: inset 0 0 0 1px rgba(0,217,255,.16); }
.snake-controls { width: min(230px, 78vw); margin: 14px auto 0; display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 54px); gap: 8px; justify-content: center; align-items: center; }
.snake-controls button { width: 100%; height: 100%; min-height: 0; padding: 0; border-radius: 18px; background: rgba(0,217,255,.14); color: var(--text); border: 1px solid rgba(0,217,255,.28); box-shadow: none; font-size: 1.15rem; line-height: 1; }
.snake-controls .snake-arrow { background: linear-gradient(135deg, rgba(0,217,255,.20), rgba(7,59,102,.58)); color: var(--accent); text-shadow: 0 0 14px rgba(0,217,255,.35); }
.snake-controls .snake-start { grid-column: 2; grid-row: 2; border-radius: 50%; background: var(--accent); color: #001018; box-shadow: 0 0 24px rgba(0,217,255,.28); font-size: 1rem; }
.snake-up { grid-column: 2; grid-row: 1; }
.snake-left { grid-column: 1; grid-row: 2; }
.snake-right { grid-column: 3; grid-row: 2; }
.snake-down { grid-column: 2; grid-row: 3; }
button { border: 0; border-radius: 999px; padding: 12px 18px; background: var(--accent); color: #001018; box-shadow: 0 0 24px rgba(0, 217, 255, .28); font-weight: 800; cursor: pointer; }
input, select, textarea { width: 100%; border: 1px solid rgba(0, 217, 255, 0.22); border-radius: 12px; background: var(--panel-2); color: var(--text); padding: 13px 14px; outline: none; }
.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.password-field input { min-width: 0; }
.password-toggle { align-self: stretch; min-width: 78px; border-radius: 12px; padding: 0 14px; background: rgba(0, 217, 255, .12); color: var(--text); border: 1px solid rgba(0, 217, 255, .28); box-shadow: none; }
textarea { resize: none; max-height: 140px; }
label { display: block; margin: 14px 0 8px; color: var(--muted); font-size: 0.86rem; font-weight: 700; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; min-height: 100dvh; min-height: var(--app-viewport-height, 100dvh); }
.login-screen { min-height: 100vh; display: grid; place-content: center; padding: 20px; background: radial-gradient(circle at top, rgba(0, 217, 255, 0.16), #000 46%); }
.login-panel { width: min(440px, calc(100vw - 40px)); }
.brand-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.brand-mark, .avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #001018; box-shadow: 0 0 24px rgba(0, 217, 255, .28); font-weight: 900; }
.avatar.small { width: 42px; height: 42px; font-size: 1.1rem; }
.eyebrow { margin: 0 0 4px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; font-weight: 900; }
h1, h2 { margin: 0; line-height: 1.05; }
h1 { font-size: clamp(2.2rem, 9vw, 3.8rem); }
.intro, .user-info, .status-text, .empty-state { color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0 10px; padding: 5px; border-radius: 999px; background: rgba(32, 44, 51, 0.72); }
.tab { background: transparent; color: var(--muted); }
.tab.active { background: var(--accent); color: #001018; box-shadow: 0 0 24px rgba(0, 217, 255, .28); }
.login-card { padding: 20px; border: 1px solid rgba(0, 217, 255, 0.22); border-radius: 24px; background: rgba(17, 27, 33, 0.92); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.chat-screen { height: 100vh; height: 100dvh; height: var(--app-viewport-height, 100dvh); display: grid; grid-template-columns: 360px minmax(0, 1fr); overflow: hidden; }
.sidebar { border-right: 1px solid var(--border); background: var(--panel); min-height: 0; overflow: hidden; }
.app-header, .conversation-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--panel-2); }
.app-header > div:nth-child(2), .conversation-main { min-width: 0; flex: 1; }
.round-button { background: rgba(134,150,160,.14); color: var(--text); padding: 10px 14px; }
.round-button { width: 40px; height: 40px; padding: 0; font-size: 1.45rem; }
.notification-toggle.enabled { background: rgba(37,211,102,.16); color: #8dffb2; border: 1px solid rgba(37,211,102,.35); }
.notification-toggle.push-pending { background: rgba(255,193,7,.14); color: #ffd36b; border: 1px solid rgba(255,193,7,.35); }
.notification-toggle.push-ready { background: rgba(37,211,102,.18); color: #8dffb2; border: 1px solid rgba(37,211,102,.45); }
.unread-status-bar { display: inline-flex; align-items: center; width: fit-content; min-height: 20px; margin: 5px 0 0; padding: 3px 8px; border-radius: 999px; background: rgba(255, 193, 7, .14); border: 1px solid rgba(255, 193, 7, .34); color: #ffd36b; font-size: .72rem; font-weight: 900; letter-spacing: .01em; }
.chat-list-panel { padding: 16px 12px; min-height: 0; overflow-y: auto; }
.add-contact-form { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 8px; margin: 0 8px 12px; }
.add-contact-form input { min-height: 42px; padding: 10px 12px; border-radius: 14px; font-size: .9rem; }
.add-contact-form button { width: 42px; height: 42px; padding: 0; border-radius: 14px; }
.add-contact-result { min-height: 1.1em; margin: -4px 10px 10px; color: var(--muted); font-size: .78rem; }
.conversation { min-width: 0; min-height: 0; display: grid; grid-template-rows: max-content max-content minmax(0, 1fr) max-content max-content; background: #000; }
.conversation-main { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 12px; }
.conversation-meta { min-width: 0; }
.conversation-meta h2, .conversation-meta .user-info { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operational-status { min-width: 0; width: 100%; padding: 0; border-bottom: 0; background: transparent; }
.ops-card { position: relative; width: 100%; overflow: hidden; border: 1px solid rgba(0, 217, 255, .18); border-radius: 16px; padding: 10px 12px; background: linear-gradient(135deg, rgba(8, 16, 31, .98), rgba(4, 7, 13, .96)); box-shadow: 0 10px 26px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04); }
.ops-card::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(0,217,255,.18), transparent 68%); pointer-events: none; }
.ops-card.is-running { border-color: rgba(0, 217, 255, .42); box-shadow: 0 0 0 1px rgba(0,217,255,.06), 0 18px 56px rgba(0,217,255,.10); }
.ops-card-head { position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 0; border-radius: 0; background: transparent; color: var(--text); box-shadow: none; text-align: left; }
.ops-kicker { margin: 0 0 4px; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .64rem; font-weight: 900; }
.ops-card h3 { margin: 0; font-size: clamp(1rem, 2.2vw, 1.28rem); line-height: 1.1; }
.ops-title { min-width: 0; }
.ops-title h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-head-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ops-chevron { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.07); color: var(--muted); font-size: .95rem; line-height: 1; }
.ops-orb { width: 13px; height: 13px; margin-top: 2px; flex: 0 0 auto; border-radius: 50%; background: #4b5563; box-shadow: 0 0 0 5px rgba(75,85,99,.15); }
.ops-orb.warn { background: #ffd36b; box-shadow: 0 0 0 5px rgba(255,211,107,.14), 0 0 20px rgba(255,211,107,.35); }
.ops-orb.pulse { background: var(--accent); box-shadow: 0 0 0 5px rgba(0,217,255,.14), 0 0 24px rgba(0,217,255,.55); animation: opsPulse 1.5s ease-in-out infinite; }
.ops-summary { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ops-summary-text { min-width: 0; flex: 1 1 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .78rem; font-weight: 700; }
.ops-body { display: none; margin-top: 10px; }
.ops-card.is-expanded .ops-body { display: block; }
.ops-card.is-collapsed { padding: 12px 14px; }
.ops-card.is-collapsed .ops-summary { margin-top: 8px; }
.ops-row { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ops-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(0, 217, 255, .22); background: rgba(0, 217, 255, .08); color: var(--text); font-size: .74rem; font-weight: 900; letter-spacing: .01em; }
.ops-chip.waiting { border-color: rgba(255, 193, 7, .50); background: rgba(255, 193, 7, .12); color: #ffd36b; }
.ops-chip.running, .ops-chip.status-running { border-color: rgba(0, 217, 255, .62); background: rgba(0, 217, 255, .16); color: var(--accent); }
.ops-chip.status-completed { border-color: rgba(42, 211, 111, .45); background: rgba(42, 211, 111, .12); color: #7dffa8; }
.ops-chip.status-failed, .ops-chip.status-blocked { border-color: rgba(255, 95, 95, .45); background: rgba(255, 95, 95, .12); color: #ff9b9b; }
.ops-chip.idle { color: var(--muted); }
.ops-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 10px; margin-bottom: 10px; }
.ops-metric { min-width: 0; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); }
.ops-metric small { display: block; margin-bottom: 4px; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ops-metric strong { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-size: .9rem; line-height: 1.25; }
.ops-detail { position: relative; display: grid; gap: 5px; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.ops-detail span { overflow-wrap: anywhere; }
@keyframes opsPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.72); opacity: .72; } }
@keyframes messageEnter {
  0% { opacity: 0; filter: blur(7px); transform: translate3d(-14px, 18px, 0) scale(.96); }
  55% { opacity: 1; filter: blur(0); transform: translate3d(2px, -3px, 0) scale(1.015); }
  100% { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes messageEnterMine {
  0% { opacity: 0; filter: blur(7px); transform: translate3d(18px, 20px, 0) scale(.95); box-shadow: 0 0 0 rgba(37, 211, 102, 0); }
  58% { opacity: 1; filter: blur(0); transform: translate3d(-2px, -3px, 0) scale(1.018); box-shadow: 0 0 24px rgba(37, 211, 102, .22); }
  100% { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes sendPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 217, 255, 0); }
  50% { transform: scale(1.06); box-shadow: 0 0 24px rgba(0, 217, 255, .28); }
  100% { transform: scale(1); }
}
.conversation-header { grid-row: 1; }
.message-selection-bar { grid-row: 2; }
.messages-list { grid-row: 3; display: flex; flex-direction: column; gap: 8px; padding: 20px clamp(14px, 4vw, 54px); overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 18px 18px; }
.messages-list.has-messages .message-item:first-child { margin-top: auto; }
.messages-list.has-messages::after { content: ""; flex: 0 0 2px; }
.message-item { position: relative; max-width: min(680px, 78%); align-self: flex-start; padding: 8px 10px 6px; border-radius: 0 12px 12px 12px; background: var(--bubble); box-shadow: 0 1px 1px rgba(0,0,0,.18); }
.message-item.mine { align-self: flex-end; border-radius: 12px 0 12px 12px; background: var(--bubble-mine); }
.message-item.sticker-message { background: transparent; box-shadow: none; padding: 0; }
.message-item.sticker-message.mine { background: transparent; }
.message-item.sticker-message .message-foot { width: fit-content; max-width: 100%; margin-top: 2px; padding: 2px 7px; border-radius: 999px; background: rgba(8, 13, 24, .56); backdrop-filter: blur(8px); }
.message-item.sticker-message.mine .message-foot { margin-left: auto; }
.message-item.optimistic { opacity: .72; }
.message-item.message-enter { animation: messageEnter .42s cubic-bezier(.18,.92,.22,1.12) both; will-change: transform, opacity, filter; }
.message-item.delete-armed { outline: 2px solid rgba(255, 76, 76, .58); outline-offset: 3px; filter: brightness(1.08); }
.message-item.mine.message-enter { animation-name: messageEnterMine; }
.message-item p { margin: 0 0 4px; white-space: pre-wrap; line-height: 1.35; }
.message-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: rgba(233, 237, 239, 0.62); font-size: 0.68rem; }
.message-item:not(.mine) .message-foot { justify-content: space-between; }
.message-foot-meta { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.message-channel-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 7px; border: 1px solid rgba(42, 211, 111, .32); background: rgba(42, 211, 111, .11); color: #8dffb2; font-weight: 900; letter-spacing: .01em; }
.message-channel-badge.pending { border-color: rgba(255, 193, 7, .36); background: rgba(255, 193, 7, .10); color: #ffd36b; }
.message-selection-bar { display: grid; grid-template-columns: 40px minmax(0, 1fr) 44px; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid rgba(0,217,255,.14); background: rgba(5,7,13,.98); }
.message-selection-bar strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: .92rem; }
.selection-close, .selection-trash { width: 40px; height: 40px; min-width: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; box-shadow: none; }
.selection-close { background: rgba(255,255,255,.08); color: var(--text); font-size: 1.35rem; }
.selection-trash { background: rgba(255,95,95,.16); color: #ffb4b4; border: 1px solid rgba(255,95,95,.35); font-size: 1.08rem; }
.conversation.selection-mode .message-item { cursor: pointer; }
.message-item.selected { outline: 2px solid rgba(0,217,255,.78); outline-offset: 3px; filter: brightness(1.12); }
.message-item.selected::after { content: "✓"; position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #001018; font-size: .82rem; font-weight: 1000; box-shadow: 0 0 0 3px rgba(0,217,255,.18); }
.message-action-button {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: rgba(233,237,239,.62);
  box-shadow: none;
  font-size: 1rem;
  line-height: 1;
}
.message-action-button:hover { background: rgba(255,255,255,.08); color: var(--text); }
.message-action-menu {
  position: fixed;
  z-index: 100;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(8, 13, 24, .98);
  box-shadow: 0 18px 60px rgba(0,0,0,.46);
}
.message-action-menu button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-align: left;
  font-size: .86rem;
}
.message-action-menu button:hover { background: rgba(0,217,255,.10); }
.message-action-menu button:disabled { opacity: .45; cursor: not-allowed; }
.message-attachment { display: block; width: min(320px, 100%); padding: 0; margin: 0 0 7px; overflow: hidden; border-radius: 14px; background: rgba(0,0,0,.28); box-shadow: none; border: 1px solid rgba(255,255,255,.08); }
.message-attachment img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.message-attachment.media-attachment { padding: 10px; display: grid; gap: 7px; }
.message-attachment.media-attachment audio { width: 100%; }
.message-attachment.media-attachment video { display: block; width: 100%; max-height: 360px; border-radius: 12px; background: #000; }
.message-attachment.media-attachment span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: .82rem; font-weight: 700; }
.message-attachment.file-attachment { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px; color: var(--text); text-decoration: none; }
.message-attachment.file-attachment strong, .message-attachment.file-attachment small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-attachment.file-attachment small { color: var(--muted); font-size: .74rem; margin-top: 2px; }
.attachment-file-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(0,217,255,.14); color: var(--accent); font-size: .72rem; font-weight: 900; letter-spacing: .06em; }
.message-attachment.sticker-attachment { width: min(160px, 48vw); border: 0; background: transparent; }
.message-attachment.sticker-attachment img { max-height: 160px; object-fit: contain; }
.message-attachment.lottie-sticker-shell { min-height: 160px; display: grid; place-items: center; }
.lottie-sticker { display: block; width: min(160px, 48vw); height: min(160px, 48vw); }
.lottie-sticker svg { display: block; width: 100% !important; height: 100% !important; }
.lottie-sticker-failed { display: grid; place-items: center; color: var(--muted); font-size: .8rem; text-align: center; }
.composer { grid-row: 5; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: end; padding: 10px 14px; background: var(--panel-2); }
.composer-main { min-width: 0; display: grid; gap: 8px; }
.composer textarea { border-radius: 22px; background: #0b1220; font-size: 16px; line-height: 1.35; transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease; }
.composer.is-sending textarea { border-color: rgba(0, 217, 255, .72); box-shadow: 0 0 0 3px rgba(0, 217, 255, .10), 0 0 22px rgba(0, 217, 255, .22); transform: translateY(-1px); }
.composer.is-sending > button:last-of-type { animation: sendPulse .48s ease both; }
.keyboard-toggle { min-width: 42px; }
.keyboard-toggle:not(.active) { opacity: .68; background: rgba(255,255,255,.06); }
.attach-button { min-width: 46px; height: 46px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 999px; background: rgba(0, 217, 255, .16); color: var(--accent); border: 1px solid rgba(0, 217, 255, .38); box-shadow: none; font-size: .88rem; line-height: 1; }
.attach-button span { font-size: 1.45rem; line-height: 1; }
.attach-button strong { font-size: .78rem; letter-spacing: .01em; }
.sticker-button { color: var(--accent); border-color: rgba(0,217,255,.38); background: rgba(0,217,255,.12); }
.sticker-panel { display: grid; gap: 12px; width: min(100%, 620px); max-height: min(44vh, 360px); overflow: auto; padding: 12px; border-radius: 18px; border: 1px solid rgba(0,217,255,.20); background: rgba(8, 13, 24, .98); box-shadow: 0 18px 60px rgba(0,0,0,.38), 0 0 30px rgba(0,217,255,.08); }
.picker-tabs { position: sticky; top: -10px; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 0 8px; background: rgba(8, 13, 24, .98); }
.picker-tab { min-height: 34px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid rgba(255,255,255,.08); box-shadow: none; font-size: .78rem; }
.picker-tab.active { background: rgba(0,217,255,.16); color: var(--accent); border-color: rgba(0,217,255,.38); }
.picker-content { display: grid; gap: 12px; }
.emoji-section { display: grid; gap: 7px; }
.emoji-section h4 { margin: 0; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.emoji-option { min-height: 48px; padding: 0; border-radius: 14px; background: rgba(255,255,255,.06); color: var(--text); box-shadow: none; font-size: 1.55rem; line-height: 1; }
.emoji-option:hover { background: rgba(0,217,255,.14); box-shadow: inset 0 0 0 1px rgba(0,217,255,.20); }
.sticker-card { position: relative; min-height: 100px; }
.sticker-option { width: 100%; min-height: 100px; padding: 8px; border-radius: 16px; background: transparent; border: 0; box-shadow: none; }
.sticker-option:hover { background: rgba(0,217,255,.11); }
.sticker-card.delete-armed .sticker-option { background: rgba(255, 76, 76, .16); outline: 2px solid rgba(255, 76, 76, .55); transform: scale(.96); }
.sticker-panel-hint { margin: -2px 2px 0; color: var(--muted); font-size: .75rem; }
.sticker-option img { width: 100%; height: 96px; object-fit: contain; display: block; }
.sticker-option-lottie { width: 100%; height: 96px; }
.sticker-panel-empty { margin: 0; color: var(--muted); font-size: .84rem; }
.sticker-panel-status { margin: 2px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(0,217,255,.10); border: 1px solid rgba(0,217,255,.18); color: var(--accent); font-size: .82rem; font-weight: 700; }
.sticker-guide { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(0,217,255,.08); border: 1px solid rgba(0,217,255,.16); }
.sticker-guide-text { color: rgba(0,217,255,.92); font-size: .82rem; font-weight: 700; line-height: 1.4; }
.sticker-guide-dismiss { width: 26px; height: 26px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.07); color: var(--muted); border: 0; box-shadow: none; font-size: 1rem; line-height: 1; cursor: pointer; }
.sticker-guide-dismiss:hover { background: rgba(255,255,255,.14); color: var(--text); }
.sticker-import { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.sticker-import-input { min-height: 36px; padding: 0 12px; border-radius: 10px; background: #0b1220; color: var(--text); border: 1px solid rgba(255,255,255,.08); font-size: .82rem; }
.sticker-import-input::placeholder { color: var(--muted); }
.sticker-import-input:focus { border-color: rgba(0,217,255,.38); box-shadow: 0 0 0 2px rgba(0,217,255,.08); }
.sticker-import-button { min-height: 36px; padding: 0 14px; border-radius: 10px; background: rgba(0,217,255,.16); color: var(--accent); border: 1px solid rgba(0,217,255,.38); box-shadow: none; font-size: .82rem; white-space: nowrap; }
.sticker-import-button:hover { background: rgba(0,217,255,.24); }
.attachment-preview { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px; border-radius: 14px; border: 1px solid rgba(0,217,255,.18); background: rgba(0,217,255,.08); }
.attachment-preview img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; }
.attachment-preview .attachment-preview-lottie { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; }
.attachment-preview .attachment-file-icon { width: 44px; height: 44px; }
.attachment-preview span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: .82rem; font-weight: 700; }
.attachment-preview button { width: 30px; height: 30px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.09); color: var(--text); box-shadow: none; }
.status-text { min-height: 1.2em; margin: 12px 0 0; font-size: 0.9rem; }
.message-status { margin: 0; padding: 0 16px 8px; background: var(--panel-2); }
.empty-state { margin: auto; text-align: center; }
@media (max-width: 760px) {
  body { overflow: hidden; }
  .app-shell { height: 100dvh; height: var(--app-viewport-height, 100dvh); overflow: hidden; }
  .chat-screen {
    height: 100dvh;
    height: var(--app-viewport-height, 100dvh);
    display: block;
    overflow: hidden;
  }
  .sidebar {
    height: 100dvh;
    height: var(--app-viewport-height, 100dvh);
    display: grid;
    grid-template-rows: max-content minmax(0, 1fr);
    border-right: 0;
    background: #000;
  }
  .conversation {
    display: none;
    height: 100dvh;
    height: var(--app-viewport-height, 100dvh);
    grid-template-rows: max-content max-content minmax(0, 1fr) max-content max-content;
  }
  .composer { grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 7px; padding: 9px 10px; }
  .attach-button { min-width: 42px; height: 42px; padding: 0 10px; }
  .attach-button strong { display: none; }
  .sticker-panel { width: 100%; max-height: min(42vh, 320px); padding: 11px; }
  .composer-main .sticker-panel {
    width: calc(100vw - 20px);
    margin-left: 0;
    transform: translateX(-98px);
  }
  .emoji-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 7px; }
  .sticker-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
  .emoji-option { min-height: 44px; font-size: 1.45rem; }
  .sticker-card, .sticker-option { min-height: 88px; }
  .sticker-option img { height: 84px; }
  .chat-screen.conversation-open .sidebar { display: none; }
  .chat-screen.conversation-open .conversation { display: grid; }

  .app-header {
    min-height: 76px;
    padding: max(12px, env(safe-area-inset-top)) 16px 12px;
    border-bottom: 1px solid rgba(0, 217, 255, .12);
    background: #05070d;
  }
  .app-header .avatar { width: 42px; min-width: 42px; max-width: 42px; height: 42px; min-height: 42px; max-height: 42px; flex: 0 0 42px; font-size: .78rem; }
  .app-header h2 { font-size: 1.35rem; }
  .app-header .user-info { font-size: .82rem; margin: 4px 0 0; }
  .round-button { width: 38px; height: 38px; font-size: 1.2rem; }

  .chat-list-panel {
    min-height: 0;
    padding: 16px 10px max(16px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    background: #000;
  }
  .chat-list-title {
    display: block;
    margin: 0 8px 14px;
    color: var(--text);
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 900;
  }
  .chat-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .chat-contact {
    width: 100%;
    min-width: 0;
    max-width: none;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 10px;
    border-radius: 18px;
    background: transparent;
    color: var(--text);
    box-shadow: none;
  }
  .chat-contact.active { background: rgba(0, 217, 255, .11); box-shadow: none; }
  .contact-avatar {
    width: 54px;
    height: 54px;
    font-size: .82rem;
  }
  .contact-main strong { font-size: 1rem; line-height: 1.2; }
  .contact-main small { font-size: .84rem; color: var(--muted); }

  .conversation-header {
    min-height: 64px;
    padding: max(8px, env(safe-area-inset-top)) 6px 8px 10px;
    border-bottom: 1px solid rgba(0, 217, 255, .12);
    background: #05070d;
  }
  .back-button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 40px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--accent);
    box-shadow: none;
    font-size: 1.8rem;
    line-height: 1;
    opacity: .68;
  }
  .conversation-header .avatar { width: 40px; min-width: 40px; height: 40px; flex: 0 0 40px; font-size: .82rem; }
  .conversation-header h2 { font-size: 1.05rem; }
  .conversation-header .user-info { font-size: .78rem; margin: 4px 0 0; }
  .icon-button { padding: 8px 10px; font-size: .78rem; }

  .messages-list {
    min-height: 0;
    padding: 12px 10px;
    overflow-y: auto;
  }
  .message-item { max-width: 86%; }
  .composer {
    grid-template-columns: auto auto minmax(0, 1fr) auto auto;
    gap: 8px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  }
  .attach-button { min-width: 44px; height: 44px; padding: 0 12px; }
  .keyboard-toggle strong { display: none; }
  .keyboard-toggle { min-width: 40px; padding: 0 10px; }
  .composer textarea { min-height: 44px; padding: 12px 14px; font-size: 16px; line-height: 1.35; }
  .composer button { min-height: 44px; padding: 0 14px; }

  .message-action-menu {
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: calc(74px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    border-radius: 18px;
    z-index: 80;
  }

  .message-status { display: none; }
}

.back-button { display: none; }
.avatar-button { width: 44px; min-width: 44px; max-width: 44px; height: 44px; min-height: 44px; max-height: 44px; aspect-ratio: 1 / 1; border: 0; padding: 0; flex: 0 0 44px; border-radius: 50%; overflow: hidden; }
.avatar-button span { display: grid; place-items: center; width: 100%; height: 100%; line-height: 1; }
.conversation-avatar-button {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  aspect-ratio: 1 / 1;
  padding: 0;
  flex: 0 0 42px;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  cursor: default;
}
.conversation-avatar-button.editable {
  cursor: pointer;
  outline: 2px solid rgba(0, 217, 255, .28);
  outline-offset: 2px;
}
.conversation-avatar-button.editable:hover {
  transform: translateY(-1px);
}
.conversation-menu { position: relative; flex: 0 0 auto; min-width: 84px; display: inline-flex; align-items: center; justify-content: flex-end; justify-self: end; gap: 8px; margin-left: auto; }
.conversation-menu-button {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: rgba(233, 237, 239, .72);
  box-shadow: none;
  font-size: 1.45rem;
  line-height: 1;
}
.conversation-menu-button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.voice-call-button { background: rgba(37,211,102,.16); color: #8dffb2; border: 1px solid rgba(37,211,102,.38); font-size: 1.02rem; }
.voice-call-button:hover { background: rgba(37,211,102,.25); color: #c9ffdc; }
.conversation-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(8, 13, 24, .98);
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.conversation-menu-panel button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: #ffb4b4;
  box-shadow: none;
  text-align: left;
  font-size: .86rem;
}
.conversation-menu-panel button:hover { background: rgba(255,95,95,.10); }
.voice-call-modal { position: fixed; inset: 0; z-index: 160; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.72); backdrop-filter: blur(10px); }
.voice-call-card { width: min(420px, calc(100vw - 32px)); display: grid; gap: 12px; justify-items: center; padding: 24px; border: 1px solid rgba(0,217,255,.26); border-radius: 28px; background: linear-gradient(180deg, rgba(8,13,24,.98), rgba(1,4,10,.98)); box-shadow: 0 28px 90px rgba(0,0,0,.58), 0 0 44px rgba(0,217,255,.10); text-align: center; }
.voice-call-orb { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,217,255,.12); border: 1px solid rgba(0,217,255,.28); color: var(--accent); font-size: 2rem; box-shadow: 0 0 32px rgba(0,217,255,.18); }
.voice-call-detail { min-height: 2.8em; margin: 0; color: var(--muted); line-height: 1.35; }
.voice-call-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.voice-call-actions button { min-height: 54px; border-radius: 18px; }
.voice-call-actions .voice-hangup { grid-column: 1 / -1; background: #ff5f5f; color: #fff; }
.voice-accept { background: #25d366; color: #00150a; }
.voice-reject { background: rgba(255,95,95,.16); color: #ffb4b4; border: 1px solid rgba(255,95,95,.38); }
.voice-secondary { background: rgba(0,217,255,.12); color: var(--text); border: 1px solid rgba(0,217,255,.28); box-shadow: none; }
.voice-secondary.active { background: rgba(255,193,7,.18); color: #ffd36b; border-color: rgba(255,193,7,.48); }
.voice-call-card small { color: rgba(233,237,239,.62); line-height: 1.35; }
.voice-call-card audio { width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.avatar.has-photo, .contact-avatar.has-photo { background-size: cover; background-position: center; background-repeat: no-repeat; color: transparent; }
.chat-list-title { margin: 0 8px 14px; color: var(--text); font-size: 1.5rem; line-height: 1; font-weight: 900; }
.chat-list { display: flex; flex-direction: column; gap: 2px; }
.chat-contact { position: relative; width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 8px; border-radius: 14px; background: transparent; color: var(--text); box-shadow: none; text-align: left; }
.chat-contact:hover, .chat-contact.active { background: rgba(0, 217, 255, .10); }
.chat-contact.active { box-shadow: inset 3px 0 0 var(--accent); }
.contact-avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 217, 255, .14); color: var(--accent); border: 1px solid rgba(0, 217, 255, .28); font-weight: 900; }
.contact-main { min-width: 0; display: grid; gap: 3px; }
.contact-main strong, .contact-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-main small { color: var(--muted); font-weight: 600; }
.contact-title-row { min-width: 0; display: flex; align-items: center; gap: 8px; }
.contact-title-row strong { min-width: 0; flex: 1 1 auto; }
.contact-title-row time { flex: 0 0 auto; color: rgba(165, 243, 252, .72); font-size: .72rem; font-weight: 800; }
.contact-last-message { color: rgba(230, 247, 255, .78) !important; font-weight: 700 !important; }
.chat-contact.has-last-message .contact-subtitle { font-size: .72rem; opacity: .78; }
.whatsapp-contact { border: 1px solid rgba(42, 211, 111, .10); }
.whatsapp-contact.active { background: rgba(42, 211, 111, .10); box-shadow: inset 3px 0 0 #25d366; }
.whatsapp-avatar { background: linear-gradient(135deg, rgba(37,211,102,.28), rgba(18,140,126,.20)); color: #adffc9; border-color: rgba(37,211,102,.40); font-size: .78rem; }
.contact-channel-badge { position: absolute; right: 8px; top: 8px; padding: 3px 7px; border-radius: 999px; border: 1px solid rgba(37,211,102,.30); background: rgba(37,211,102,.10); color: #8dffb2; font-size: .62rem; font-weight: 900; letter-spacing: .02em; }
.unread-badge { position: absolute; right: 8px; top: 8px; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 7px; border-radius: 999px; background: linear-gradient(135deg, #ffd36b, #ff9f1c); color: #120b00; font-size: .72rem; font-weight: 1000; box-shadow: 0 0 0 3px rgba(255, 193, 7, .14), 0 8px 24px rgba(255, 159, 28, .22); }
.chat-contact.has-unread { background: rgba(255, 193, 7, .08); }
.chat-contact.has-unread .contact-avatar { border-color: rgba(255, 193, 7, .45); box-shadow: 0 0 0 3px rgba(255, 193, 7, .10); }
.chat-contact.has-unread .contact-last-message { color: #fff4c2 !important; font-weight: 900 !important; }
.chat-contact.has-unread .contact-main { padding-right: 34px; }
.whatsapp-contact .contact-main { padding-right: 70px; }
.empty-state.small { margin: 12px 8px; font-size: .9rem; }

@media (max-width: 760px) {
  .chat-list-panel { padding: 16px 10px max(16px, env(safe-area-inset-bottom)); }
  .chat-contact { grid-template-columns: 54px minmax(0, 1fr); padding: 11px 10px; border-radius: 18px; background: transparent; }
  .chat-contact.active { background: rgba(0, 217, 255, .11); box-shadow: none; }
  .contact-avatar { width: 54px; height: 54px; }
  .contact-main strong { font-size: 1rem; }
  .contact-main small { font-size: .84rem; }
}

@media (max-width: 760px) {
  .operational-status { padding: 0; }
  .ops-card { border-radius: 16px; padding: 10px; }
  .ops-head-actions .ops-chip { display: none; }
  .ops-summary { gap: 6px; }
  .ops-summary-text { flex-basis: 100%; font-size: .74rem; }
  .ops-grid { grid-template-columns: 1fr; gap: 8px; }
  .ops-detail { font-size: .78rem; }
}


@media (max-width: 760px) {
  .conversation-header {
    min-height: 64px;
    display: grid;
    grid-template-columns: 34px 40px minmax(0, 1fr) max-content;
    gap: 8px;
    align-items: center;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  }
  .conversation-main {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(78px, .75fr) minmax(116px, 1fr);
    gap: 8px;
    align-items: center;
  }
  .conversation-meta h2 { font-size: 1rem; }
  .conversation-meta .user-info { font-size: .72rem; margin: 3px 0 0; }
  .operational-status { padding: 0; }
  .ops-card { border-radius: 999px; padding: 6px 8px; }
  .ops-card.is-expanded { border-radius: 14px; padding: 9px; }
  .ops-kicker { display: none; }
  .ops-card h3 { max-width: 108px; font-size: .72rem; line-height: 1.05; }
  .ops-summary { display: none; }
  .ops-card.is-expanded .ops-summary { display: flex; }
  .ops-head-actions { gap: 5px; }
  .ops-orb { width: 9px; height: 9px; box-shadow: 0 0 0 3px rgba(75,85,99,.15); }
  .ops-chevron { width: 18px; height: 18px; font-size: .8rem; }

}


@media (max-width: 760px) {
  .conversation-header {
    position: relative;
    overflow: visible;
    min-height: 64px;
    grid-template-columns: 34px 40px minmax(0, 1fr) max-content;
  }
  .conversation-main {
    grid-template-columns: minmax(82px, max-content) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }
  .operational-status {
    width: 100%;
    justify-self: stretch;
  }
  .operational-status.expanded {
    position: fixed;
    left: 10px;
    right: 10px;
    top: calc(env(safe-area-inset-top) + 76px);
    width: auto;
    z-index: 50;
  }
  .operational-status.expanded .ops-card {
    width: 100%;
    max-height: calc(100dvh - 166px);
    overflow-y: auto;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 24px 80px rgba(0,0,0,.62), 0 0 0 1px rgba(0,217,255,.18);
  }
  .ops-card.is-collapsed {
    width: 100%;
    min-height: 44px;
    border-radius: 999px;
    padding: 7px 10px;
  }
  .ops-card.is-collapsed .ops-card-head {
    gap: 8px;
  }
  .ops-card.is-collapsed .ops-title {
    min-width: 0;
    flex: 1 1 auto;
  }
  .ops-card.is-collapsed .ops-title h3 {
    max-width: none;
    font-size: .82rem;
  }
  .ops-card.is-expanded .ops-title h3 {
    max-width: none;
    font-size: 1.04rem;
  }
  .ops-card.is-expanded .ops-kicker {
    display: block;
  }
  .ops-card.is-expanded .ops-summary {
    display: flex;
  }
  .ops-card.is-expanded .ops-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ops-card.is-expanded .ops-detail {
    font-size: .9rem;
    line-height: 1.45;
  }
  .ops-summary-text {
    flex: 1 1 auto;
    min-width: 0;
  }
  .composer {
    grid-template-columns: 42px 42px minmax(0, 1fr) 40px 46px;
    gap: 7px;
    align-items: start;
  }
  .attach-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 16px;
  }
  .attach-button strong { display: none; }
  .attach-button span { font-size: 1.55rem; }
  .composer textarea {
    min-height: 42px;
    padding: 10px 13px;
    font-size: 16px;
    line-height: 1.35;
  }
  .composer > button:last-of-type {
    width: 46px;
    min-width: 46px;
    min-height: 42px;
    padding: 0;
    border-radius: 16px;
    font-size: 0;
    display: grid;
    place-items: center;
  }
  .composer > button:last-of-type::before {
    content: "➤";
    font-size: 1.05rem;
    transform: translateX(1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .messages-list { scroll-behavior: auto; }
  .message-item.message-enter,
  .composer.is-sending > button:last-of-type {
    animation: none;
  }
  .composer textarea { transition: none; }
}


@media (max-width: 760px) {
  .conversation.codex-mode .conversation-main {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  .conversation.codex-mode .conversation-meta {
    display: none;
  }
  .conversation.codex-mode .operational-status {
    width: 100%;
  }
  .conversation.codex-mode .ops-card.is-collapsed {
    min-height: 46px;
    padding: 7px 11px;
  }
  .conversation.codex-mode .ops-card.is-collapsed .ops-title h3 {
    max-width: none;
    font-size: .88rem;
  }
  .conversation.codex-mode .ops-card.is-collapsed .ops-head-actions {
    margin-left: auto;
  }
  .conversation.codex-mode .ops-card.is-collapsed .ops-orb {
    width: 10px;
    height: 10px;
  }
  .conversation.codex-mode .ops-card.is-collapsed .ops-chevron {
    width: 22px;
    height: 22px;
  }
}


@media (max-width: 760px) {
  .conversation.codex-mode .conversation-header {
    grid-template-columns: 40px minmax(0, 1fr) max-content;
    gap: 10px;
    padding-left: 24px;
  }
  .conversation.codex-mode .back-button {
    position: absolute;
    left: 2px;
    top: max(10px, env(safe-area-inset-top));
    display: grid;
    width: 22px;
    height: 42px;
    font-size: 1.55rem;
    opacity: .48;
    z-index: 2;
  }
  .conversation.codex-mode #conversationAvatar {
    grid-column: 1;
  }
  .conversation.codex-mode .conversation-main {
    grid-column: 2;
    width: 100%;
    min-width: 0;
  }
  .conversation-menu { min-width: 76px; gap: 6px; justify-self: end; margin-left: auto; }
  .conversation-menu-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    font-size: 1.28rem;
    opacity: .88;
  }
  .voice-call-button { font-size: .98rem; }
  .conversation.codex-mode .operational-status,
  .conversation.codex-mode .ops-card,
  .conversation.codex-mode .ops-card-head {
    width: 100% !important;
    min-width: 0;
  }
  .conversation.codex-mode .ops-card.is-collapsed {
    display: block;
    min-height: 48px;
    padding: 7px 12px;
  }
  .conversation.codex-mode .ops-card.is-collapsed .ops-title h3 {
    max-width: none !important;
    width: 100%;
    font-size: .92rem;
  }
  .conversation.codex-mode .ops-card.is-collapsed .ops-head-actions {
    flex: 0 0 auto;
  }
}


@media (max-width: 420px) {
  .conversation-header { grid-template-columns: 28px 36px minmax(0, 1fr) max-content; gap: 6px; padding-right: 6px; }
  .conversation-header .avatar { width: 36px; min-width: 36px; height: 36px; flex-basis: 36px; }
  .conversation-menu { min-width: 76px; gap: 6px; justify-self: end; margin-left: auto; }
  .conversation-menu-button { width: 34px; min-width: 34px; height: 34px; }
  .conversation-meta h2 { font-size: .94rem; }
  .conversation-meta .user-info { font-size: .68rem; }
}

.voice-security-status { width: 100%; margin: 0; padding: 10px 12px; border: 1px solid rgba(255,193,7,.30); border-radius: 14px; background: rgba(255,193,7,.08); color: #ffd36b; font-size: .78rem; font-weight: 800; line-height: 1.35; white-space: pre-line; }
.voice-security-status.verified { border-color: rgba(37,211,102,.42); background: rgba(37,211,102,.10); color: #8dffb2; }
.voice-security-status.pending { border-color: rgba(255,193,7,.30); background: rgba(255,193,7,.08); color: #ffd36b; }
.voice-verify { grid-column: 1 / -1; }


.snake-screen.snake-incoming-call { position: fixed; inset: 0; z-index: 190; padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); background: radial-gradient(circle at 50% 0%, rgba(37,211,102,.22), rgba(0,0,0,.96) 54%); animation: incomingPulse 1.45s ease-in-out infinite; }
.snake-screen.snake-incoming-call .snake-panel { width: min(520px, calc(100vw - 26px)); min-height: min(760px, calc(100dvh - 28px)); align-content: center; border-color: rgba(37,211,102,.48); box-shadow: 0 0 80px rgba(37,211,102,.22), 0 30px 90px rgba(0,0,0,.70); }
.snake-screen.snake-incoming-call .eyebrow::after { content: " · reto extra"; color: #8dffb2; }
.snake-screen.snake-incoming-call .snake-board-wrap { border-color: rgba(37,211,102,.36); box-shadow: inset 0 0 32px rgba(37,211,102,.10); }
.snake-screen.snake-incoming-call .snake-arrow { opacity: .28; pointer-events: none; }
.snake-screen.snake-incoming-call .snake-start { transform: scale(var(--answer-scale, 1)); transition: transform .18s ease, box-shadow .18s ease; background: #25d366; color: #00150a; box-shadow: 0 0 34px rgba(37,211,102,.54), 0 0 calc(22px * var(--answer-scale, 1)) rgba(37,211,102,.38); }
.snake-screen.snake-incoming-call #snakeHint { color: #8dffb2; font-weight: 900; }
@keyframes incomingPulse { 0%, 100% { filter: saturate(1); } 50% { filter: saturate(1.28); } }

/* WhatsApp conversation polish: clearer channel context and more professional chat surface. */
.chat-contact.whatsapp-contact { border: 1px solid rgba(37, 211, 102, .10); }
.chat-contact.whatsapp-contact.active { background: linear-gradient(135deg, rgba(37, 211, 102, .14), rgba(0, 217, 255, .08)); box-shadow: inset 3px 0 0 #25d366, 0 10px 30px rgba(0,0,0,.14); }
.contact-channel-badge, .message-channel-badge { letter-spacing: .02em; text-transform: uppercase; }
.messages-list { background-color: #020711; background-image: radial-gradient(circle at 18% 12%, rgba(37, 211, 102, .08), transparent 26%), radial-gradient(circle at 82% 0%, rgba(0, 217, 255, .07), transparent 28%), radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px); }
.message-item { border: 1px solid rgba(255,255,255,.055); box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.message-item.mine { border-color: rgba(0, 217, 255, .16); background: linear-gradient(135deg, #074878, #06345c); }
.message-item:not(.mine) { background: linear-gradient(135deg, #0b1526, #08101e); }
.composer { border-top: 1px solid rgba(255,255,255,.07); box-shadow: 0 -14px 34px rgba(0,0,0,.20); }
.composer textarea { border-color: rgba(255,255,255,.11); background: rgba(3, 8, 18, .92); }


/* Secure location sharing UI. */
.location-button span, .live-location-button span { filter: drop-shadow(0 0 8px rgba(37,211,102,.22)); }
.live-location-button.active { border-color: rgba(255, 83, 83, .55); background: rgba(255, 83, 83, .12); color: #ffd7d7; }
.location-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-width: min(340px, 72vw); padding: 12px; margin-bottom: 7px; border-radius: 16px; border: 1px solid rgba(37,211,102,.28); background: linear-gradient(135deg, rgba(37,211,102,.14), rgba(0,217,255,.08)); color: var(--text); text-decoration: none; }
.location-card-pin { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(37,211,102,.16); font-size: 1.35rem; }
.location-card-body { min-width: 0; display: grid; gap: 3px; }
.location-card-body strong { font-size: .95rem; }
.location-card-body small { color: rgba(233,237,239,.72); line-height: 1.3; }
.location-card-action { padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.08); color: #8dffb2; font-size: .72rem; font-weight: 900; }


/* Compact composer action menu: one small + opens all secondary actions. */
.composer-options-button { width: 42px; min-width: 42px; padding: 0; font-size: 1.2rem; }
.composer-options-button.active { border-color: rgba(37,211,102,.48); background: rgba(37,211,102,.14); color: #8dffb2; }
.composer-action-sheet { display: grid; grid-template-columns: repeat(5, minmax(72px, 1fr)); gap: 8px; }
.composer-action-sheet button { min-height: 74px; display: grid; place-items: center; gap: 3px; padding: 9px 7px; border-radius: 16px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.045); color: var(--text); box-shadow: none; text-align: center; }
.composer-action-sheet button:hover { border-color: rgba(0,217,255,.30); background: rgba(0,217,255,.09); }
.composer-action-sheet span { font-size: 1.35rem; line-height: 1; }
.composer-action-sheet strong { font-size: .78rem; line-height: 1; }
.composer-action-sheet small { color: var(--muted); font-size: .66rem; line-height: 1.15; }
@media (max-width: 760px) {
  .composer { grid-template-columns: 42px minmax(0, 1fr) 42px auto; }
  .composer-main .sticker-panel { transform: translateX(-58px); }
  .composer-action-sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .composer-action-sheet button { min-height: 68px; }
}
@media (max-width: 420px) {
  .composer-action-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* PrivateLink ID identity and contact trust UI. */
.identity-toggle { font-size: .78rem; font-weight: 1000; letter-spacing: .04em; }
.identity-modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.62); backdrop-filter: blur(10px); }
.identity-modal { position: relative; width: min(440px, 100%); display: grid; gap: 12px; padding: 18px; border-radius: 24px; border: 1px solid rgba(0,217,255,.22); background: rgba(5,7,13,.98); box-shadow: 0 26px 90px rgba(0,0,0,.52); }
.identity-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; padding: 0; }
.identity-kicker { margin: 0; color: var(--accent); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.identity-modal h2 { margin: 0; }
.identity-code-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 12px; border-radius: 18px; border: 1px solid rgba(37,211,102,.24); background: rgba(37,211,102,.09); }
.identity-code-card span { font-size: 1.25rem; font-weight: 1000; letter-spacing: .08em; }
.identity-note, .identity-status { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.identity-qr-fallback { padding: 10px; border-radius: 14px; background: rgba(255,255,255,.045); color: rgba(233,237,239,.75); font-size: .75rem; word-break: break-all; }
.identity-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trust-badge { width: fit-content; display: inline-flex; align-items: center; margin-top: 3px; padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); color: var(--muted); font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.trust-badge.basic { border-color: rgba(0,217,255,.22); color: #90eaff; }
.trust-badge.invited { border-color: rgba(255,193,7,.32); color: #ffd36b; }
.trust-badge.verified { border-color: rgba(37,211,102,.38); color: #8dffb2; }
@media (max-width: 420px) { .identity-actions { grid-template-columns: 1fr; } }



/* --- v0.4.96 fullscreen editor --- */
.photo-editor-canvas {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(0,217,255,.18);
  background: #010308;
  touch-action: none;
  cursor: crosshair;
}
.photo-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(0,217,255,.12);
  background: rgba(5,7,13,.94);
}
.editor-tools, .editor-colors, .editor-sizes, .editor-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.editor-tool-btn, .editor-color-swatch, .editor-size-btn, .editor-action-btn {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: .9rem;
  box-shadow: none;
  cursor: pointer;
}
.editor-tool-btn.active, .editor-size-btn.active {
  border-color: rgba(0,217,255,.38);
  background: rgba(0,217,255,.14);
  color: var(--accent);
}
.editor-color-swatch {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  padding: 0;
}
.editor-color-swatch.active {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.editor-done-btn {
  min-width: 52px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(37,211,102,.24);
  background: rgba(37,211,102,.12);
  color: #8dffb2;
  font-size: .82rem;
  font-weight: 800;
  box-shadow: none;
  cursor: pointer;
}
.attachment-edit-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0,217,255,.14);
  color: var(--accent);
  font-size: .9rem;
  box-shadow: none;
  cursor: pointer;
}
.editor-action-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Upload progress bar. */
.send-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,.56);
  z-index: 10;
}
.send-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #005f73, #00d9ff, #90eaff);
  border-radius: 0 2px 2px 0;
  transition: width .22s ease;
}
.send-progress-percent {
  position: absolute;
  right: 8px;
  color: var(--accent);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .04em;
}

@media (max-width: 480px) {
  .photo-editor-toolbar { gap: 3px; padding: 4px; }
  .editor-tool-btn, .editor-size-btn, .editor-action-btn { min-width: 30px; height: 30px; font-size: .8rem; }
  .editor-color-swatch { width: 24px; min-width: 24px; height: 24px; }
}

/* E2EE message indicator badge. */
.e2ee-badge { display: inline-flex; align-items: center; margin-top: 3px; padding: 1px 6px; border-radius: 999px; border: 1px solid rgba(37,211,102,.28); color: #8dffb2; font-size: .6rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }


/* QR code canvas and scanner UI. */
.identity-qr-container { display: grid; place-items: center; padding: 8px; border-radius: 16px; background: #fff; }
.identity-qr-canvas { display: block; width: 180px; height: 180px; border-radius: 10px; }
.qr-scanner-view { position: relative; width: 100%; min-height: 180px; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.035); overflow: hidden; }
.qr-scanner-video { display: block; width: 100%; border-radius: 16px; }
.qr-scanner-hint { color: var(--muted); font-size: .84rem; text-align: center; }
.qr-file-button { display: grid; place-items: center; padding: 10px; border-radius: 14px; border: 1px solid rgba(0,217,255,.18); background: rgba(0,217,255,.06); color: var(--accent); font-size: .82rem; cursor: pointer; }


/* Ephemeral messages: timer badge and options strip. */
.ephemeral-badge { display: inline-flex; align-items: center; margin-top: 3px; padding: 1px 6px; border-radius: 999px; border: 1px solid rgba(255,193,7,.28); color: #ffd36b; font-size: .6rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.composer-options-button.ephemeral-active { border-color: rgba(255,193,7,.48); background: rgba(255,193,7,.14); color: #ffd36b; }
.ephemeral-timer-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.06); }
.ephemeral-timer-strip small { color: var(--muted); font-size: .7rem; }
.ephemeral-option { padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); color: var(--text); font-size: .7rem; }
.ephemeral-option.active { border-color: rgba(255,193,7,.38); background: rgba(255,193,7,.12); color: #ffd36b; }
.ephemeral-option.ephemeral-off { border-color: rgba(255,95,95,.28); color: #ffb4b4; }

/* Message loading skeleton — shimmer placeholder while messages load. */
.messages-loading { display: flex; flex-direction: column; gap: 14px; padding: 14px 10px; }
.skeleton-message { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; max-width: 80%; }
.skeleton-message.mine { align-items: flex-end; align-self: flex-end; }
.skeleton-line { height: 13px; border-radius: 7px; background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.6s ease-in-out infinite; }
.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-90 { width: 90%; }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Connection status banner. */
.connection-banner { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(255, 193, 7, .12); border-bottom: 1px solid rgba(255, 193, 7, .25); color: #ffd36b; font-size: .82rem; font-weight: 600; }
.connection-banner.offline { background: rgba(255, 83, 83, .12); border-color: rgba(255, 83, 83, .25); color: #ffb4b4; }
.connection-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex-shrink: 0; animation: connection-pulse 1.8s ease-in-out infinite; }
@keyframes connection-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Pull-to-refresh indicator. */
.pull-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; height: 0; overflow: hidden; transition: height .18s ease; color: var(--muted); font-size: .78rem; }
.pull-indicator.active { height: 42px; }
.pull-indicator.refreshing { height: 42px; color: var(--accent); }
.pull-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.15); border-top-color: currentColor; border-radius: 50%; animation: pull-spin .7s linear infinite; opacity: 0; transition: opacity .14s; }
.pull-indicator.refreshing .pull-spinner { opacity: 1; }
@keyframes pull-spin { to { transform: rotate(360deg); } }

/* Sticker catalog: curated sticker packs. */
.sticker-catalog { margin-bottom: 18px; }
.sticker-catalog-header { margin: 0 0 10px; color: var(--text); font-size: 1rem; font-weight: 900; }
.sticker-catalog-search { min-height: 38px; width: 100%; padding: 0 14px; border-radius: 10px; background: #0b1220; color: var(--text); border: 1px solid rgba(255,255,255,.08); font-size: .84rem; margin-bottom: 12px; }
.sticker-catalog-search::placeholder { color: var(--muted); }
.sticker-catalog-search:focus { border-color: rgba(0,217,255,.38); box-shadow: 0 0 0 2px rgba(0,217,255,.08); }
.sticker-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sticker-catalog-card { display: grid; gap: 6px; padding: 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.025); }
.sticker-catalog-card-title { color: var(--text); font-size: .84rem; font-weight: 800; line-height: 1.2; }
.sticker-catalog-card-category { color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sticker-catalog-card-import { justify-self: start; min-height: 30px; padding: 0 12px; border-radius: 8px; background: rgba(0,217,255,.16); color: var(--accent); border: 1px solid rgba(0,217,255,.28); box-shadow: none; font-size: .74rem; font-weight: 800; cursor: pointer; }
.sticker-catalog-card-import:hover { background: rgba(0,217,255,.24); }

/* Sticker import progress bar */
.sticker-import-progress {
  width: 100%;
  height: 6px;
  margin: 6px 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.sticker-import-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.38);
  transition: width 0.3s ease;
}
.sticker-catalog-card-import:disabled,
.sticker-import-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.35);
}
.sticker-import-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .sticker-catalog { margin-bottom: 14px; }
  .sticker-catalog-header { font-size: .92rem; }
  .sticker-catalog-search { min-height: 36px; padding: 0 12px; font-size: .8rem; }
  .sticker-catalog-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 7px; }
  .sticker-catalog-card { padding: 10px; gap: 5px; }
  .sticker-catalog-card-title { font-size: .8rem; }
  .sticker-catalog-card-category { font-size: .64rem; }
  .sticker-catalog-card-import { min-height: 28px; padding: 0 10px; font-size: .7rem; }
}

@media (max-width: 420px) {
  .sticker-catalog-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .sticker-catalog-card { padding: 9px; border-radius: 12px; }
  .sticker-catalog-card-title { font-size: .76rem; }
  .sticker-catalog-card-category { font-size: .62rem; }
}

/* Collapsible catalog toggle button. */
.sticker-catalog-toggle {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 217, 255, .18);
  background: transparent;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 900;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  transition: background .18s ease;
}
.sticker-catalog-toggle:hover { background: rgba(0, 217, 255, .08); }

/* Catalog body with max-height animation. */
.sticker-catalog-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.sticker-catalog-body.expanded {
  max-height: 1600px;
  overflow: visible;
}

/* + Agregar pack toggle. */
.sticker-import-toggle {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(0, 217, 255, .08);
  color: var(--accent);
  border: 1px solid rgba(0, 217, 255, .18);
  box-shadow: none;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
  transition: background .18s ease;
}
.sticker-import-toggle:hover { background: rgba(0, 217, 255, .14); }

/* Sent feedback animation on sticker cards. */
@keyframes stickerSentPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.14); filter: brightness(1.32); }
  100% { transform: scale(1); }
}
.sticker-sent-feedback {
  animation: stickerSentPulse .62s ease;
}

/* Fade-in/out for "Sticker enviado" result text. */
@keyframes messageResultFadeInOut {
  0% { opacity: 0; }
  12% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}
.message-result-fade {
  animation: messageResultFadeInOut 2.2s ease forwards;
}

/* ── Group chat list entries ── */

.new-group-button {
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0, 217, 255, .10);
  color: var(--accent);
  border: 1px dashed rgba(0, 217, 255, .32);
  box-shadow: none;
  font-size: .92rem;
  font-weight: 800;
  text-align: center;
}
.new-group-button:hover {
  background: rgba(0, 217, 255, .18);
  border-style: solid;
}

.group-contact .contact-avatar {
  background: linear-gradient(135deg, rgba(141, 255, 178, .24), rgba(0, 217, 255, .18));
  color: #8dffb2;
  border-color: rgba(141, 255, 178, .35);
}

.group-avatar {
  background: linear-gradient(135deg, rgba(141, 255, 178, .28), rgba(0, 217, 255, .22)) !important;
  color: #8dffb2 !important;
  border-color: rgba(141, 255, 178, .45) !important;
}

/* ── Group creation modal ── */

.group-modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px;
  background: rgba(0,0,0,.62); backdrop-filter: blur(10px);
}

.group-modal {
  position: relative; width: min(440px, 100%); max-height: 85vh; display: grid; gap: 12px; padding: 18px;
  overflow-y: auto;
  border-radius: 24px; border: 1px solid rgba(0,217,255,.22); background: rgba(5,7,13,.98);
  box-shadow: 0 26px 90px rgba(0,0,0,.52);
}

.group-member-picker {
  display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto;
  padding: 4px; border-radius: 14px; border: 1px solid rgba(0,217,255,.14);
  background: rgba(8,13,24,.58);
}

.group-member-chip {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px;
  border-radius: 12px; cursor: pointer; transition: background .15s;
  color: var(--text);
}
.group-member-chip:hover { background: rgba(0,217,255,.08); }
.group-member-chip.selected { background: rgba(0,217,255,.12); border: 1px solid rgba(0,217,255,.28); }

.group-member-chip input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0; flex: 0 0 auto;
  accent-color: var(--accent);
}

.group-member-chip > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

.group-member-chip .trust-badge { flex: 0 0 auto; }

/* ── Empty group conversation ── */

.messages-placeholder {
  display: grid; place-items: center; padding: 48px 20px;
}
.messages-placeholder p {
  color: var(--muted); font-size: .92rem; text-align: center;
}

.quoted-message { width: 100%; min-height: 44px; display: grid; gap: 2px; margin: 0 0 7px; padding: 7px 9px; border: 0; border-inline-start: 3px solid var(--accent); border-radius: 7px; background: rgba(0,0,0,.22); color: var(--text); box-shadow: none; text-align: start; }
.quoted-message strong, .quoted-message span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quoted-message strong { color: var(--accent); font-size: .72rem; } .quoted-message span { font-size: .78rem; opacity: .82; }
.message-item.reply-target-highlight { outline: 2px solid var(--accent); outline-offset: 3px; }
.reply-draft-bar { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: center; gap: 8px; padding: 7px 9px; border-inline-start: 3px solid var(--accent); border-radius: 8px; background: rgba(0,0,0,.28); }
.reply-draft-bar > span { min-width: 0; display: grid; } .reply-draft-bar strong { color: var(--accent); font-size: .75rem; } .reply-draft-bar small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.reply-draft-bar button { width: 44px; min-width: 44px; height: 44px; padding: 0; border-radius: 50%; background: transparent; box-shadow: none; font-size: 1.2rem; }
.message-action-menu button { min-height: 44px; }
