/* Veil Texting — Messenger bones, EACI skin.
   Familiar: chats rail, search, avatars, left/right bubbles, bottom composer.
   Different: dark atmosphere, cyan/ember glow, EACIs as first-class chats. */

html.texting-app,
body.texting-app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
}
body.texting-app {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}
body.texting-app #txInstall {
  white-space: nowrap;
}
body.texting-app a.eaci-launch {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
body.texting-app .veil-nav { flex: 0 0 auto; position: relative; z-index: 3; background: rgba(6, 5, 11, 0.42); }
body.texting-app .veil-nav.tx-nav-compact {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "nav";
  gap: 0;
}
body.texting-app .veil-nav.tx-nav-compact .nav-scroll {
  grid-area: nav;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
body.texting-app .veil-nav.tx-nav-compact .nav-left,
body.texting-app .veil-nav.tx-nav-compact .nav-right {
  display: contents; /* one scroll row: The Veil + coins + music + profile */
}
body.texting-app .veil-nav.tx-nav-compact .nav-scroll > *,
body.texting-app .veil-nav.tx-nav-compact .nav-left > *,
body.texting-app .veil-nav.tx-nav-compact .nav-right > * {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Low Power Mode — still wallpaper, no heavy blur / glow */
body.texting-app.tx-low-power .tx-live-wallpaper-glow,
html.tx-low-power body.texting-app .tx-live-wallpaper-glow { display: none !important; }
body.texting-app.tx-low-power .tx-live-wallpaper-video,
html.tx-low-power body.texting-app .tx-live-wallpaper-video { display: none !important; }
body.texting-app.tx-low-power .tx-stage,
body.texting-app.tx-low-power .msg-head,
body.texting-app.tx-low-power .tx-compose,
html.tx-low-power body.texting-app .tx-stage,
html.tx-low-power body.texting-app .msg-head,
html.tx-low-power body.texting-app .tx-compose {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.texting-app .tx-settings-soon .tx-settings-row-static {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  opacity: 0.72;
  pointer-events: none;
}
body.texting-app .tx-lp-actions {
  margin-top: 4px;
}
body.texting-app .tx-lp-actions .tx-hook-btn.primary {
  border-color: rgba(255, 184, 77, 0.65);
  background: rgba(255, 184, 77, 0.2);
  color: #ffd59a;
}
body.texting-app .msg-dm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
body.texting-app .msg-head #msgTitle {
  flex: 1 1 auto;
  min-width: 0;
}
body.texting-app .msg-audio-call-btn {
  margin-left: auto;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(127, 216, 255, 0.45);
  background: rgba(80, 160, 220, 0.16);
  color: #d8f0ff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
body.texting-app .msg-audio-call-btn:hover {
  background: rgba(80, 160, 220, 0.28);
}
body.texting-app .msg-audio-call-btn[hidden] {
  display: none !important;
}
body.texting-app .msg-head #msgClose:not([hidden]) {
  margin-left: 0;
}
body.texting-app .tx-friend-call {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(120% 80% at 50% 0%, rgba(28, 48, 78, 0.96), rgba(4, 6, 14, 0.97));
  backdrop-filter: blur(10px);
}
body.texting-app .tx-friend-call[hidden] { display: none !important; }
body.texting-app .tx-friend-call-stage {
  width: min(92vw, 380px);
  max-width: 100%;
  box-sizing: border-box;
  padding: 28px 22px 26px;
  text-align: center;
  color: #e8f4ff;
  overflow-x: hidden;
}
body.texting-app .tx-eaci-voice-stage {
  width: min(100%, 380px);
  max-width: calc(100vw - 24px);
  padding: 22px 14px 20px;
}
body.texting-app .tx-friend-call-label {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(180, 214, 240, 0.78);
}
body.texting-app .tx-friend-call-avatar {
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(127, 216, 255, 0.45);
  box-shadow: 0 0 0 8px rgba(127, 216, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.35);
  background: linear-gradient(145deg, #2a4a6e, #132033);
  display: grid;
  place-items: center;
  position: relative;
}
body.texting-app .tx-friend-call-avatar.is-small {
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  box-shadow: none;
}
body.texting-app .tx-friend-call-stage.is-ringing .tx-friend-call-avatar {
  animation: txCallPulse 1.6s ease-in-out infinite;
}
@keyframes txCallPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(127, 216, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: 0 0 0 18px rgba(80, 220, 140, 0.16), 0 18px 40px rgba(0, 0, 0, 0.35); }
}
body.texting-app .tx-friend-call-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
body.texting-app .tx-friend-call-avatar img[hidden],
body.texting-app .tx-friend-call-avatar span[hidden] { display: none !important; }
body.texting-app .tx-friend-call-avatar span {
  font-size: 2.4rem;
  font-weight: 800;
  color: #dff3ff;
  letter-spacing: 0.04em;
}
body.texting-app .tx-friend-call-avatar.is-small span { font-size: 1.35rem; }
body.texting-app .tx-friend-call-stage > strong,
body.texting-app .tx-friend-call-feedback-card > strong {
  display: block;
  font-size: 1.45rem;
  margin-bottom: 8px;
}
body.texting-app .tx-friend-call-stage > span#txFriendCallStatus {
  display: block;
  font-size: 14px;
  color: #9ec9e8;
  margin-bottom: 10px;
  min-height: 1.2em;
}
body.texting-app .tx-friend-call-note {
  margin: 0 0 28px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(220, 236, 255, 0.72);
}
body.texting-app .tx-eaci-voice-call #txEaciVoiceStatus {
  display: block;
  margin: 4px 0 8px;
  font-size: 0.95rem;
  color: rgba(232, 255, 248, 0.88);
  text-align: center;
  min-height: 1.3em;
}
body.texting-app .tx-eaci-voice-log,
body.texting-app .tx-eaci-voice-lines {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  max-height: calc(1.35em * 5 + 20px);
  height: calc(1.35em * 5 + 20px);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0 auto 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(6, 5, 12, 0.55);
  border: 1px solid rgba(0, 255, 200, 0.16);
  text-align: left;
  -webkit-overflow-scrolling: touch;
}
body.texting-app .tx-eaci-voice-lines.is-you {
  border-color: rgba(154, 212, 255, 0.35);
}
body.texting-app .tx-eaci-voice-lines.is-them {
  border-color: rgba(0, 255, 200, 0.28);
}
body.texting-app .tx-eaci-voice-lines .tx-call-lines-inner {
  font-size: 0.92rem;
  line-height: 1.35;
  color: #e8fff8;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
body.texting-app .tx-eaci-voice-line {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.35;
  color: #e8fff8;
  word-break: break-word;
  overflow-wrap: anywhere;
}
body.texting-app .tx-eaci-voice-line:last-child { margin-bottom: 0; }
body.texting-app .tx-eaci-voice-line strong {
  display: inline;
  margin-right: 6px;
  color: #00ffc8;
}
body.texting-app .tx-eaci-voice-line.is-you strong { color: #9ad4ff; }
body.texting-app .tx-friend-call-actions {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
body.texting-app .tx-call-ctrl-mute.on,
body.texting-app .tx-friend-call-hang.tx-call-ctrl-mute.on {
  background: #3a4a5c;
  box-shadow: 0 0 0 2px rgba(255, 210, 120, 0.45);
}
body.texting-app .tx-call-ctrl-interrupt {
  background: #c47a2a !important;
}
@media (max-width: 480px) {
  body.texting-app .tx-friend-call {
    padding: 12px;
  }
  body.texting-app .tx-eaci-voice-stage {
    max-width: calc(100vw - 16px);
    padding: 18px 10px 16px;
  }
  body.texting-app .tx-friend-call-actions {
    gap: 12px;
  }
  body.texting-app .tx-friend-call-hang {
    min-width: 4.6rem;
  }
}
body.texting-app .tx-friend-call-accept,
body.texting-app .tx-friend-call-decline,
body.texting-app .tx-friend-call-hang {
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
body.texting-app .tx-friend-call-accept em,
body.texting-app .tx-friend-call-decline em,
body.texting-app .tx-friend-call-hang em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
body.texting-app .tx-call-btn-icon {
  font-size: 1.35rem;
  line-height: 1;
}
body.texting-app .tx-friend-call-accept {
  background: #1fbf6a;
}
body.texting-app .tx-friend-call-decline,
body.texting-app .tx-friend-call-hang {
  background: #e25555;
}
body.texting-app .tx-friend-call-hang .tx-call-btn-icon {
  transform: rotate(135deg);
  display: inline-block;
}
body.texting-app .tx-friend-call-accept[hidden],
body.texting-app .tx-friend-call-decline[hidden],
body.texting-app .tx-friend-call-hang[hidden] {
  display: none !important;
}
body.texting-app .tx-friend-call-feedback {
  width: min(92vw, 400px);
}
body.texting-app .tx-friend-call-feedback[hidden] { display: none !important; }
body.texting-app .tx-friend-call-feedback-card {
  padding: 22px 18px 18px;
  border-radius: 20px;
  border: 1px solid rgba(127, 216, 255, 0.28);
  background: rgba(12, 18, 32, 0.92);
  text-align: center;
  color: #e8f4ff;
}
body.texting-app .tx-friend-call-fb-meta {
  margin: 0 0 14px;
  font-size: 13px;
  color: #9ec9e8;
}
body.texting-app .tx-friend-call-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
body.texting-app .tx-friend-call-stars button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 220, 140, 0.35);
  font-size: 1.35rem;
  cursor: pointer;
}
body.texting-app .tx-friend-call-stars button.on {
  color: #ffd27a;
  background: rgba(255, 210, 122, 0.14);
}
body.texting-app .tx-friend-call-feedback-card textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 96px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(127, 216, 255, 0.28);
  background: rgba(0, 0, 0, 0.28);
  color: #e8f4ff;
  resize: vertical;
  font: inherit;
}
body.texting-app .tx-friend-call-fb-actions {
  display: flex;
  gap: 10px;
  justify-content: stretch;
}
body.texting-app .tx-friend-call-fb-skip,
body.texting-app .tx-friend-call-fb-send {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}
body.texting-app .tx-friend-call-fb-skip {
  background: rgba(255, 255, 255, 0.08);
  color: #cfe6f8;
}
body.texting-app .tx-friend-call-fb-send {
  background: #7fd8ff;
  color: #081018;
}
/* Away from the app: drop decorative motion; keep heads / music / notes alive */
html.tx-bg-lite body.texting-app .tx-live-wallpaper-video,
html.tx-bg-lite body.texting-app .tx-live-wallpaper-glow {
  display: none !important;
}
body.texting-app .tx-settings-soon .tx-perm-badge {
  margin-left: 8px;
  vertical-align: middle;
}

/* App-wide live wallpaper (slow seamless loop — first frame == last) */
body.texting-app .tx-live-wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #05040a;
}
body.texting-app .tx-live-wallpaper-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transform: scale(1.02);
}
body.texting-app .tx-live-wallpaper.is-still .tx-live-wallpaper-video {
  opacity: 0;
}
body.texting-app .tx-live-wallpaper.is-still {
  background: url("atmosphere/veil-bg-plate.png") center / cover no-repeat #05040a;
}
body.texting-app .tx-live-wallpaper-glow {
  position: absolute;
  top: var(--nav-h, 56px);
  bottom: 0;
  width: min(30vw, 360px);
  overflow: hidden;
  opacity: 0.55;
  mix-blend-mode: screen;
}
body.texting-app .tx-live-wallpaper-glow-left { left: 0; }
body.texting-app .tx-live-wallpaper-glow-left .flow-stage img { object-position: left center; }
body.texting-app .tx-live-wallpaper-glow-right { right: 0; }
body.texting-app .tx-live-wallpaper-glow-right .flow-stage img { object-position: right center; }
body.texting-app .tx-live-wallpaper-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 50% 42%, rgba(6, 5, 11, 0.35) 0%, rgba(6, 5, 11, 0.55) 62%, rgba(6, 5, 11, 0.78) 100%);
}
body.texting-app .glow-line { position: relative; z-index: 3; }
body.texting-app .tx-brand strong { letter-spacing: 0.04em; }
body.texting-app .tx-brand span { color: var(--muted); font-size: 12px; }
body.texting-app .tx-head-btn-compose {
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  align-self: center;
  flex: 0 0 auto;
  white-space: nowrap;
}
body.texting-app .tx-call-btn {
  flex: 0 0 auto;
  margin-left: auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 184, 77, 0.45);
  background: rgba(255, 184, 77, 0.14);
  color: #ffb84d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
body.texting-app .tx-call-btn.on,
body.texting-app .tx-call-btn[aria-pressed="true"] {
  border-color: rgba(255, 90, 90, 0.55);
  background: rgba(255, 70, 70, 0.2);
  color: #ffb0b0;
}
body.texting-app .auth-overlay {
  z-index: 240;
}
body.texting-app .tx-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  background: #05070f;
  opacity: 0;
  transition: opacity 1.6s ease;
}
body.texting-app .tx-call-overlay:not([hidden]) { display: block; }
body.texting-app .tx-call-overlay.on { opacity: 1; }
body.texting-app.tx-call-active .tx-eaci-thread,
body.texting-app.tx-call-active .tx-eaci-compose {
  visibility: hidden !important;
  pointer-events: none !important;
}
body.texting-app .tx-call-stage {
  position: absolute;
  inset: 0;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 1.6s ease;
  overflow: hidden;
  background: #0a1020;
}
body.texting-app.tx-call-active .tx-call-stage { transform: scale(1.08); }
body.texting-app .tx-call-stage-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(1.05) brightness(0.92);
}
body.texting-app .tx-call-talk {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
body.texting-app .tx-call-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 8, 18, 0.2) 0%, transparent 22%, transparent 58%, rgba(5, 8, 18, 0.55) 100%);
}
body.texting-app .tx-call-top {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
body.texting-app .tx-call-top strong {
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}
body.texting-app .tx-call-top span {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(180, 220, 255, 0.85);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}
body.texting-app .tx-call-hud {
  position: absolute;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(168px + env(safe-area-inset-bottom));
  width: min(560px, calc(100% - 32px));
  text-align: center;
  pointer-events: none;
}
body.texting-app .tx-call-hud[hidden] { display: none !important; }
body.texting-app:not(.tx-call-enrolling) .tx-call-hud { display: none !important; }
body.texting-app .tx-call-prompt {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(180, 220, 255, 0.9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
  min-height: 1em;
}
body.texting-app .tx-call-kara {
  margin: 0 0 10px;
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  line-height: 1.4;
  font-weight: 650;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
  min-height: 1.4em;
}
body.texting-app .tx-call-kara:not(.on):empty { display: none; }
body.texting-app .tx-kara-w {
  display: inline;
  margin: 0 0.12em;
  color: rgba(255, 255, 255, 0.38);
  transition: color 0.12s ease, text-shadow 0.12s ease;
}
body.texting-app .tx-kara-w.said {
  color: #fff8e8;
  text-shadow: 0 0 12px rgba(127, 216, 255, 0.55), 0 2px 14px rgba(0, 0, 0, 0.9);
}
body.texting-app .tx-kara-w.next {
  color: #7fd8ff;
  text-shadow: 0 0 14px rgba(127, 216, 255, 0.75), 0 2px 14px rgba(0, 0, 0, 0.9);
}
body.texting-app .tx-kara-w.wait {
  color: rgba(255, 255, 255, 0.34);
}
body.texting-app .tx-call-you,
body.texting-app .tx-call-caption {
  display: none !important;
}
body.texting-app .tx-call-lines {
  --tx-call-line: 1.35em;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Hard 5-line viewport — content scrolls inside, box never grows. */
  height: calc(var(--tx-call-line) * 5 + 2.1em + 20px);
  max-height: calc(var(--tx-call-line) * 5 + 2.1em + 20px);
  min-height: calc(var(--tx-call-line) * 5 + 2.1em + 20px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0 0 10px;
  padding: 8px 12px 10px;
  border-radius: 14px;
  background: rgba(6, 8, 16, 0.82);
  border: 2px solid rgba(127, 216, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.35);
  text-align: left;
  pointer-events: auto;
  opacity: 0.95;
}
body.texting-app .tx-call-lines.on {
  opacity: 1;
}
body.texting-app .tx-call-lines.is-you {
  border-color: rgba(255, 248, 232, 0.55);
}
body.texting-app .tx-call-lines.is-them {
  border-color: rgba(0, 255, 200, 0.5);
}
body.texting-app .tx-call-lines-who {
  flex: 0 0 auto;
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(180, 220, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}
body.texting-app .tx-call-lines.is-you .tx-call-lines-who {
  color: rgba(255, 236, 200, 0.95);
}
body.texting-app .tx-call-lines.is-them .tx-call-lines-who {
  color: rgba(160, 255, 230, 0.95);
}
body.texting-app .tx-call-lines-inner {
  flex: 1 1 auto;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: clamp(0.92rem, 2.8vw, 1.05rem);
  line-height: var(--tx-call-line);
  color: #e8fff8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: calc(var(--tx-call-line) * 5);
}
body.texting-app .tx-call-lines.is-you .tx-call-lines-inner {
  color: #fff8e8;
}
body.texting-app .tx-call-foot,
body.texting-app .tx-call-footer {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(92vw, 380px);
  max-width: calc(100vw - 20px);
  box-sizing: border-box;
  pointer-events: none;
}
body.texting-app .tx-call-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  pointer-events: auto;
}
body.texting-app .tx-call-ctrl {
  min-width: 5.6rem;
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(40, 56, 78, 0.95);
  color: #e8f4ff;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
body.texting-app .tx-call-ctrl-mute.on {
  background: #3a4a5c;
  box-shadow: 0 0 0 2px rgba(255, 210, 120, 0.5);
}
body.texting-app .tx-call-ctrl-interrupt {
  background: #c47a2a;
  color: #fff8e8;
}
body.texting-app .tx-call-hangup {
  pointer-events: auto;
  min-width: 7rem;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #e25555;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
body.texting-app .tx-call-coin-note {
  margin: 0;
  padding: 0 12px;
  max-width: 28rem;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 236, 210, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

body.texting-app .tx-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  flex: 1;
  min-height: 0;
}

/* Left rail — chats */
body.texting-app .tx-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border-right: 1px solid rgba(0, 255, 200, 0.12);
  background: rgba(8, 7, 14, 0.48);
  backdrop-filter: blur(14px);
}
body.texting-app .tx-list-head {
  padding: 14px 14px 8px;
}
body.texting-app .tx-list-head h1 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
body.texting-app .tx-search {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 14px;
}
body.texting-app .tx-search::placeholder { color: var(--muted); }
body.texting-app .tx-filters {
  display: flex;
  gap: 6px;
  padding: 0 14px 10px;
}
body.texting-app .tx-filters button {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
body.texting-app .tx-filters button.on {
  background: rgba(0, 255, 200, 0.16);
  color: var(--cyan);
}
body.texting-app .tx-pull {
  height: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--cyan, #00ffc8);
  transition: opacity 0.12s ease;
  pointer-events: none;
}
body.texting-app .tx-chats {
  flex: 1 1 0%;
  min-height: 0;
  height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 6px 16px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #00ffc8 #141018;
}

body.texting-app .tx-chats::-webkit-scrollbar,
body.texting-app .tx-eaci-thread::-webkit-scrollbar,
body.texting-app .msg-body::-webkit-scrollbar {
  width: 10px;
}
body.texting-app .tx-chats::-webkit-scrollbar-track,
body.texting-app .tx-eaci-thread::-webkit-scrollbar-track,
body.texting-app .msg-body::-webkit-scrollbar-track {
  background: #141018;
  border-radius: 8px;
}
body.texting-app .tx-chats::-webkit-scrollbar-thumb,
body.texting-app .tx-eaci-thread::-webkit-scrollbar-thumb,
body.texting-app .msg-body::-webkit-scrollbar-thumb {
  background: #00ffc8;
  border-radius: 8px;
  border: 2px solid #141018;
}

body.texting-app .tx-person-main {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
body.texting-app .tx-head-btn {
  flex: 0 0 auto;
  align-self: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 200, 0.35);
  background: rgba(0, 255, 200, 0.1);
  color: #7ff5d4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
body.texting-app .tx-head-btn:hover {
  background: rgba(0, 255, 200, 0.18);
}
body.texting-app .tx-person {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
body.texting-app .tx-person .tx-person-main {
  padding: 8px 10px;
  border-radius: 14px;
}
/* Friend + EACI rows always use the same rail grid */
body.texting-app .tx-person > .tx-person-main,
body.texting-app button.tx-person[data-friend],
body.texting-app .tx-person[data-friend] {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 8px 10px !important;
  cursor: pointer;
}
body.texting-app .tx-person .meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
body.texting-app .tx-person .when {
  justify-self: end;
  white-space: nowrap;
}
body.texting-app .tx-person:hover { background: transparent; }
body.texting-app .tx-person:hover .tx-person-main,
body.texting-app button.tx-person[data-friend]:hover {
  background: rgba(255, 255, 255, 0.05);
}
body.texting-app .tx-person.on .tx-person-main {
  background: rgba(0, 255, 200, 0.1);
}
@media (max-width: 860px) {
  body.texting-app .veil-nav.tx-nav-compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
  }
  body.texting-app .veil-nav.tx-nav-compact .nav-scroll {
    flex: 1 1 auto;
    padding: 0;
  }
}
body.texting-app .tx-person .dot {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  background: color-mix(in srgb, var(--who, var(--cyan)) 28%, #141018);
  color: var(--who, var(--cyan));
  box-shadow: 0 0 0 2px rgba(6, 5, 11, 0.9), 0 0 16px color-mix(in srgb, var(--who, var(--cyan)) 35%, transparent);
}
body.texting-app .tx-person .dot .live {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 2px #0b0a10;
}
body.texting-app .tx-person .meta { min-width: 0; }
body.texting-app .tx-person strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.texting-app .tx-person em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.texting-app .tx-person .when {
  font-size: 11px;
  color: var(--muted);
  align-self: start;
  padding-top: 4px;
}
body.texting-app .tx-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 255, 200, 0.12);
  color: var(--cyan);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

/* Chat stage */
body.texting-app .tx-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(6, 5, 11, 0.22);
}
body.texting-app .msg-sheet {
  display: none;
  position: static;
  width: auto;
  flex: 1;
  height: auto;
  max-height: none;
  border: 0;
  box-shadow: none;
  background: transparent;
}
html.msg-open body.texting-app .msg-sheet,
body.texting-app .msg-sheet.on {
  display: flex;
  flex-direction: column;
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0;
  overflow: hidden;
}
body.texting-app .tx-eaci {
  display: none;
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
}
body.texting-app.eaci-on .tx-eaci { display: flex; }
body.texting-app.eaci-on .msg-sheet { display: none !important; }

/* Chat-head menu: real EACI chat pane (same buttons/thread) as a floating panel */
body.texting-app.tx-head-chat-mode header.veil-nav,
body.texting-app.tx-head-chat-mode .glow-line,
body.texting-app.tx-head-chat-mode .tx-list,
body.texting-app.tx-head-chat-mode #txEmpty,
body.texting-app.tx-head-chat-mode .msg-sheet,
body.texting-app.tx-head-chat-mode .music-sheet,
body.texting-app.tx-head-chat-mode #txNativeStatusBar,
body.texting-app.tx-head-chat-mode #txNativeUpdateBanner {
  display: none !important;
}
body.texting-app.tx-head-chat-mode .tx-shell {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: flex !important;
  align-items: stretch;
  justify-content: center;
  padding: 10px;
  background: rgba(4, 3, 10, 0.72);
  backdrop-filter: blur(8px);
}
body.texting-app.tx-head-chat-mode .tx-stage {
  width: min(520px, 100%);
  max-width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 200, 0.22);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  background: #0a0812;
}
body.texting-app.tx-head-chat-mode .tx-eaci {
  display: flex !important;
  height: 100%;
  border-radius: 18px;
}
body.texting-app.tx-head-chat-mode #txBackList {
  /* Close the head menu back to chats / overlay */
}
body.texting-app.tx-head-chat-mode #txEaciHeadBtn {
  display: none;
}
/* Messenger open state: tap avatars along the top to cycle stacked heads. */
body.texting-app .tx-head-cycle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px 4px;
  flex: 0 0 auto;
}
body.texting-app.tx-head-chat-mode .tx-head-cycle:not([hidden]) {
  display: flex;
}
body.texting-app .tx-head-cycle-dot {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #141018;
  box-shadow: 0 0 0 2px rgba(0, 255, 200, 0.28);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.72;
  flex: 0 0 auto;
}
body.texting-app .tx-head-cycle-dot.on {
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(0, 255, 200, 0.75);
  transform: scale(1.06);
}
body.texting-app .tx-head-cycle-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  display: block;
}
body.texting-app .tx-head-cycle-dot img[data-custom="1"] {
  object-fit: contain;
  object-position: center center;
  background: #05060c;
}

body.texting-app .tx-eaci-head,
body.texting-app .msg-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0, 255, 200, 0.1);
  background: rgba(8, 7, 14, 0.65);
  backdrop-filter: blur(12px);
}
body.texting-app .tx-eaci-head .who-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0;
  flex: 0 0 28px;
  background: rgba(0, 255, 200, 0.18);
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  position: relative;
}
body.texting-app .tx-eaci-head .who-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 200, 0.28);
  pointer-events: none;
}
body.texting-app .profile-hero-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0 auto 8px;
  background: rgba(0, 255, 200, 0.18);
  color: var(--cyan);
  font-size: 2rem;
  font-weight: 800;
}
body.texting-app .profile-hero-avatar.is-sm {
  width: 44px;
  height: 44px;
  font-size: 0.9rem;
  margin: 0;
  flex: 0 0 44px;
}
body.texting-app .profile-hero-avatar img,
body.texting-app .tx-eaci-head .who-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Default portrait cards are tall — bias to the face, not the full body plate. */
  object-position: center 16%;
  display: block;
}
body.texting-app .profile-hero-avatar img[data-custom="1"],
body.texting-app .tx-eaci-head .who-dot img[data-custom="1"] {
  /* User-framed square — show the whole frame; do not cover-crop sides again. */
  object-fit: contain;
  object-position: center center;
  background: #05060c;
}
body.texting-app .tx-eaci-head-calls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}
body.texting-app .tx-call-btn {
  margin-left: 0;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  display: grid;
  place-items: center;
}
body.texting-app .tx-call-btn em { display: none; }

/* Avatar crop editor */
.veil-avatar-crop {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 6, 12, 0.78);
}
.veil-avatar-crop[hidden] { display: none !important; }
.veil-avatar-crop-card {
  width: min(420px, 100%);
  background: #12121c;
  border: 1px solid rgba(0, 255, 200, 0.18);
  border-radius: 18px;
  padding: 14px 16px 16px;
  color: #e8fff8;
}
.veil-avatar-crop-card header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.veil-avatar-crop-card header strong { flex: 1; font-size: 16px; }
.veil-avatar-crop-stage {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 12px auto;
  border-radius: 50%;
  overflow: hidden;
  background: #05060c;
  touch-action: none;
  user-select: none;
}
.veil-avatar-crop-frame {
  position: absolute;
  inset: 0;
  cursor: grab;
}
.veil-avatar-crop-frame:active { cursor: grabbing; }
.veil-avatar-crop-frame img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.veil-avatar-crop-mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(0, 255, 200, 0.55);
  pointer-events: none;
}
.veil-avatar-crop-zoom {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #9adfcb;
  margin: 8px 0 12px;
}
.veil-avatar-crop-zoom input { width: 100%; }
.veil-avatar-crop-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.veil-photo-fail {
  position: fixed;
  inset: 0;
  z-index: 340;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 6, 12, 0.78);
}
.veil-photo-fail-card {
  width: min(420px, 100%);
  background: #14141f;
  border: 1px solid rgba(255, 120, 120, 0.35);
  border-radius: 16px;
  padding: 18px 16px 14px;
  color: #ffe8e8;
  display: grid;
  gap: 10px;
}
.veil-photo-fail-card strong {
  font-size: 17px;
  color: #ffb0b0;
}
.veil-photo-fail-card p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
  color: #f2dede;
  font-size: 14px;
}
.veil-photo-fail-card .btn-post {
  justify-self: end;
  min-width: 96px;
}
body.texting-app .msg-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
body.texting-app .msg-card-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
body.texting-app .tx-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: color-mix(in srgb, var(--who, var(--cyan)) 30%, #141018);
  color: var(--who, var(--cyan));
  flex: 0 0 auto;
}
body.texting-app .tx-eaci-head .who-copy { flex: 1; min-width: 0; }
body.texting-app .tx-eaci-head strong,
body.texting-app .msg-head h3 {
  display: block;
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
body.texting-app .tx-eaci-head em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--cyan);
}
body.texting-app .tx-eaci-thread,
body.texting-app .msg-body {
  flex: 1 1 0%;
  min-height: 0;
  height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 16px 12px;
  display: block;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  pointer-events: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #00ffc8 #141018;
}

/* Messenger-like bubbles, Veil colors */
body.texting-app .tx-eaci-thread .bubble,
body.texting-app .msg-body .bubble {
  display: block;
  width: fit-content;
  max-width: min(74%, 34rem);
  margin: 4px 0;
  padding: 9px 13px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.35;
  border: 0;
  backdrop-filter: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
body.texting-app .tx-eaci-thread .bubble.eaci,
body.texting-app .msg-body .bubble.eaci,
body.texting-app .msg-body .bubble.them {
  margin-right: auto;
  background: rgba(32, 28, 42, 0.92);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
body.texting-app .tx-eaci-thread .bubble.user,
body.texting-app .msg-body .bubble.user,
body.texting-app .msg-body .bubble.me {
  margin-left: auto;
  background: #00e6b8;
  color: #04110c;
  border-bottom-right-radius: 6px;
}
body.texting-app .bubble.thinking { opacity: 0.7; }
body.texting-app .bubble-media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 4px;
  max-width: 100%;
}
body.texting-app .bubble .bubble-img {
  display: block;
  max-width: min(100%, 260px);
  max-height: 240px;
  border-radius: 12px;
  object-fit: contain;
  cursor: zoom-in;
  touch-action: manipulation;
}
body.texting-app .bubble-img-save {
  border: 1px solid rgba(0, 255, 200, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(8, 7, 14, 0.88);
  color: #00ffc8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
body.texting-app .bubble.user .bubble-img-save {
  background: rgba(4, 17, 12, 0.45);
  color: #04110c;
  border-color: rgba(4, 17, 12, 0.3);
}
body.texting-app .bubble-acts button {
  background: rgba(255, 255, 255, 0.1);
  color: #f6f0e6;
}
body.texting-app .bubble.eaci.reading .bubble-acts [data-read-play] {
  background: #00e6b8;
  color: #04110c;
}

body.texting-app .tx-eaci-compose,
body.texting-app .msg-compose {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px 14px;
  border-top: 1px solid rgba(0, 255, 200, 0.08);
  background: rgba(8, 7, 14, 0.72);
}
body.texting-app .msg-compose-row,
body.texting-app .tx-eaci-compose-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}
body.texting-app .msg-compose-row textarea {
  flex: 1 1 auto;
  min-width: 0;
}
body.texting-app .tx-eaci-compose-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
body.texting-app .tx-eaci-compose-tools::-webkit-scrollbar { display: none; }
body.texting-app .tx-eaci-compose[hidden],
body.texting-app .msg-compose[hidden] { display: none !important; }
body.texting-app .compose-attach-chip {
  margin: 0 12px 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--cyan);
  background: rgba(0, 255, 200, 0.08);
  border-radius: 10px;
}
body.texting-app .tx-eaci-compose input,
body.texting-app .tx-eaci-compose textarea,
body.texting-app .msg-compose input,
body.texting-app .msg-compose textarea {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 0;
  border-radius: 18px;
  padding: 12px 16px;
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  max-height: 140px;
  line-height: 1.35;
}
body.texting-app .tx-eaci-compose-input-row textarea {
  flex: 1 1 auto;
}
/* Android WebView ignores file pickers on display:none / [hidden] inputs. */
body.texting-app .tx-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
}
body.texting-app .tx-eaci-compose .compose-tool,
body.texting-app .tx-eaci-compose .tx-emoji-btn,
body.texting-app .msg-compose .compose-tool {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan);
  font-size: 16px;
  cursor: pointer;
  flex: 0 0 40px;
}
body.texting-app .compose-tool.listening {
  background: rgba(255, 80, 80, 0.28);
  color: #ffb0b0;
}
body.texting-app .tx-eaci-compose button#txEaciSend,
body.texting-app .msg-compose button#msgSend {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cyan);
  color: #04110c;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 40px;
}
body.texting-app .tx-empty {
  margin: auto;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  max-width: 22rem;
}
body.texting-app .tx-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 20px;
}
body.texting-app .msg-download { display: none; }
body.texting-app [data-msg-act="profile"],
body.texting-app [data-msg-act="posts"],
body.texting-app #msgClose,
body.texting-app .msg-tabs { display: none !important; }
body.texting-app .msg-head { grid-template-columns: none; }

/* Hide legacy full-page atmosphere from social-veil — keep wallpaper glow strips. */
body.texting-app .atmosphere { display: none !important; }
body.texting-app .tx-live-wallpaper .flow-stage { display: block !important; }

body.texting-app .tx-stage { position: relative; }
body.texting-app .tx-eaci { position: relative; z-index: 1; overflow: hidden; }
body.texting-app .tx-eaci-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #08070e;
}
body.texting-app .tx-eaci-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.38;
  filter: saturate(1.08);
}
body.texting-app .tx-eaci-bg img[data-missing],
body.texting-app .tx-eaci-bg img:not([src]) { display: none; }
body.texting-app #txEaciPane.has-chat-bg .tx-eaci-bg img {
  opacity: 0.78;
  filter: saturate(1.05);
}
body.texting-app #txEaciPane.has-chat-bg .tx-eaci-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(7, 6, 10, 0.5), transparent 24%),
    linear-gradient(to top, rgba(7, 6, 10, 0.58) 0%, rgba(7, 6, 10, 0.18) 30%, transparent 55%);
  pointer-events: none;
}
body.texting-app .tx-eaci-head,
body.texting-app .tx-eaci-thread,
body.texting-app .tx-eaci-compose,
body.texting-app #txEaciTrial {
  position: relative;
  z-index: 1;
}
body.texting-app .tx-eaci-thread {
  background: linear-gradient(180deg, rgba(6, 5, 11, 0.28), rgba(6, 5, 11, 0.62));
}
body.texting-app .tx-person .dot,
body.texting-app .who-dot {
  overflow: hidden;
}
body.texting-app .tx-person .dot img,
body.texting-app .who-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  display: block;
}
body.texting-app .tx-person .dot img[data-custom="1"],
body.texting-app .who-dot img[data-custom="1"] {
  object-fit: contain;
  object-position: center center;
  background: #05060c;
}
body.texting-app .tx-person .dot img:not([src]),
body.texting-app .who-dot img:not([src]),
body.texting-app .who-dot img[data-missing] {
  display: none;
}
body.texting-app #txEaciSend {
  width: auto;
  min-width: 52px;
  height: auto;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.05;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
body.texting-app #txEaciSend .coin-cost {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #ffe08a;
  opacity: 0.95;
}

body.texting-app .music-sheet {
  display: none;
  position: absolute;
  inset: 0;
  width: auto;
  flex: 1;
  height: auto;
  max-height: none;
  z-index: 6;
  border-left: 0;
}
html.music-open body.texting-app .music-sheet,
body.texting-app .music-sheet.on { display: flex; }
html.music-open body.texting-app .tx-eaci,
html.music-open body.texting-app .msg-sheet,
html.music-open body.texting-app .tx-empty { display: none !important; }

/* Settings (model + device hooks) */
body.texting-app .tx-settings-launch {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 184, 77, 0.4);
  background: rgba(255, 184, 77, 0.08);
  color: #ffb84d;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
body.texting-app .tx-settings-launch:hover { background: rgba(255, 184, 77, 0.16); }
body.texting-app .tx-settings-launch[aria-expanded="true"] {
  background: rgba(255, 184, 77, 0.22);
  border-color: rgba(255, 184, 77, 0.65);
}
body.texting-app .tx-device-status {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  align-items: center;
  padding: 4px 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(230, 220, 255, 0.72);
  background: rgba(8, 6, 18, 0.72);
  border-bottom: 1px solid rgba(127, 216, 255, 0.12);
  flex: 0 0 auto;
}
body.texting-app .tx-device-status[hidden] { display: none !important; }
body.texting-app .tx-settings-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(14, 10, 28, 0.98), rgba(6, 4, 16, 0.98));
  border: 0;
  overflow: hidden;
}
html.tx-settings-open body.texting-app .tx-settings-sheet,
body.texting-app.tx-settings-open .tx-settings-sheet,
body.texting-app .tx-settings-sheet.on { display: flex !important; }
body.texting-app .tx-settings-gear {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 184, 77, 0.45);
  background: rgba(255, 184, 77, 0.12);
  color: #ffb84d;
  font-size: 18px;
  cursor: pointer;
  flex: 0 0 auto;
}
body.texting-app .tx-list-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
body.texting-app .tx-list-head h1 { flex: 0 0 auto; margin: 0; }
body.texting-app .tx-list-head .tx-search { flex: 1 1 140px; min-width: 120px; }
body.texting-app .tx-settings-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 8px 16px 28px;
  -webkit-overflow-scrolling: touch;
}
body.texting-app .tx-cody-support-banner .tx-cody-support-card {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 184, 77, 0.55);
  background: linear-gradient(90deg, rgba(40, 24, 8, 0.95), rgba(18, 10, 28, 0.95));
  color: #ffe6b8;
}
body.texting-app .tx-cody-support-banner .tx-cody-support-card p {
  margin: 0 0 6px;
}
body.texting-app .tx-cody-support-banner .tx-cody-support-card .hint {
  color: #ffd27a;
  opacity: 0.9;
}
body.texting-app .tx-settings-sec {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
body.texting-app .tx-settings-sec-title {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffb84d;
}
body.texting-app .tx-settings-model,
body.texting-app .tx-settings-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
  cursor: pointer;
  color: #efe8ff;
  font-size: 14px;
  line-height: 1.35;
}
body.texting-app .tx-settings-row {
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body.texting-app .tx-settings-row:last-of-type { border-bottom: 0; }
body.texting-app .tx-settings-row span { flex: 1 1 auto; min-width: 0; }
body.texting-app .tx-settings-row strong { display: block; font-size: 14px; }
body.texting-app .tx-settings-row em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 11px;
  color: rgba(200, 190, 230, 0.7);
}
body.texting-app .tx-settings-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: #ffb84d;
}
body.texting-app .tx-settings-model input { margin-top: 3px; accent-color: #7fd8ff; }
body.texting-app .tx-settings-foot { margin-top: 8px; opacity: 0.85; }
body.texting-app .tx-settings-row-wrap {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body.texting-app .tx-settings-row-wrap:last-child { border-bottom: 0; }
body.texting-app .tx-settings-row-wrap .tx-settings-row {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
body.texting-app .tx-hook-status {
  display: inline-block;
  margin: 4px 0 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0c1018;
  background: #ffb84d;
}
body.texting-app .tx-hook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0 0;
  padding-left: 0;
}
body.texting-app .tx-hook-btn {
  border: 1px solid rgba(255, 184, 77, 0.45);
  background: rgba(255, 184, 77, 0.08);
  color: #ffd9a0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
body.texting-app .tx-hook-btn.primary,
body.texting-app .tx-hook-btn:hover {
  background: rgba(255, 184, 77, 0.2);
  border-color: rgba(255, 184, 77, 0.7);
  color: #fff4e0;
}

/* Permissions panel in Settings */
body.texting-app .tx-perm-panel .tx-perm-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(230, 220, 255, 0.85);
}
body.texting-app .tx-perm-panel .tx-perm-summary b { color: #ffb84d; }
body.texting-app .tx-perm-toolbar { margin: 0 0 14px; }
body.texting-app .tx-hook-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
body.texting-app .tx-perm-list {
  display: grid;
  gap: 10px;
}
body.texting-app .tx-perm-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
body.texting-app .tx-perm-row.state-needed,
body.texting-app .tx-perm-row.state-blocked {
  border-color: rgba(255, 184, 77, 0.45);
  background: rgba(255, 184, 77, 0.08);
}
body.texting-app .tx-perm-row.state-granted {
  border-color: rgba(0, 255, 200, 0.28);
  background: rgba(0, 255, 200, 0.06);
}
body.texting-app .tx-perm-row-copy { flex: 1 1 auto; min-width: 0; }
body.texting-app .tx-perm-row-copy strong {
  display: inline-block;
  margin-right: 8px;
  font-size: 14px;
  color: #f4f0ff;
}
body.texting-app .tx-perm-row-copy em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(200, 190, 230, 0.72);
}
body.texting-app .tx-perm-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
body.texting-app .tx-perm-badge.granted { background: #00ffc8; color: #06241c; }
body.texting-app .tx-perm-badge.needed { background: #ffb84d; color: #1a1208; }
body.texting-app .tx-perm-badge.blocked { background: #ff5e7a; color: #1a060c; }
body.texting-app .tx-perm-badge.off,
body.texting-app .tx-perm-badge.na { background: rgba(255, 255, 255, 0.14); color: #ddd4f5; }
body.texting-app .tx-perm-row-act { flex: 0 0 auto; }

/* Permission coach overlay */
.tx-perm-coach {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 2, 12, 0.72);
  backdrop-filter: blur(6px);
}
.tx-perm-coach.on { display: flex; }
.tx-perm-card {
  position: relative;
  width: min(440px, 100%);
  max-height: min(86vh, 640px);
  overflow: auto;
  padding: 20px 18px 16px;
  border-radius: 18px 18px 14px 14px;
  border: 1px solid rgba(255, 184, 77, 0.35);
  background: linear-gradient(165deg, #1a1428, #0c0a14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  color: #efe8ff;
}
.tx-perm-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}
.tx-perm-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffb84d;
}
.tx-perm-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}
.tx-perm-desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(230, 220, 255, 0.82);
}
.tx-perm-steps {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.tx-perm-steps li {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  line-height: 1.4;
}
.tx-perm-steps li.hi {
  border-color: rgba(255, 184, 77, 0.75);
  background: rgba(255, 184, 77, 0.14);
  box-shadow: 0 0 0 2px rgba(255, 184, 77, 0.25);
  animation: tx-perm-pulse 1.4s ease-in-out infinite;
}
.tx-perm-steps li b {
  display: block;
  margin-bottom: 2px;
  color: #ffb84d;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@keyframes tx-perm-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 184, 77, 0.2); }
  50% { box-shadow: 0 0 0 4px rgba(255, 184, 77, 0.4); }
}
.tx-perm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.tx-perm-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #efe8ff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.tx-perm-btn.primary {
  border-color: rgba(255, 184, 77, 0.7);
  background: #ffb84d;
  color: #1a1208;
}
.tx-perm-foot {
  margin: 0;
  font-size: 11px;
  color: rgba(200, 190, 230, 0.65);
  line-height: 1.4;
}
@media (max-width: 760px) {
  html.tx-settings-open body.texting-app.pick-list .tx-list { display: none; }
  html.tx-settings-open body.texting-app.pick-list .tx-stage { display: flex; }
  body.texting-app .tx-settings-launch { padding: 0 10px; }
}

@media (max-width: 760px) {
  body.texting-app .tx-shell { grid-template-columns: 1fr; min-height: 0; flex: 1 1 0%; }
  body.texting-app .tx-list { display: none; }
  body.texting-app.pick-list .tx-list { display: flex; height: 100%; }
  body.texting-app.pick-list .tx-stage { display: none; }
  body.texting-app:not(.pick-list) .tx-stage { display: flex; height: 100%; }
  html.music-open body.texting-app.pick-list .tx-list { display: none; }
  html.music-open body.texting-app.pick-list .tx-stage { display: flex; }
}
