/* BUILD 6849 — preserves the Build 6844 WhatsApp video layout. */
#callOverlay.call-overlay.hidden{
  display:none !important;
}

/* BUILD 6864 — reliable mobile back navigation; AI draft assistant retained. */
.workspace-chat .composer > #composerAiBtn{
  grid-area:ai !important;
  display:grid;
  place-items:center;
  align-content:center;
  gap:0;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid rgba(139,77,232,.65);
  border-radius:50%;
  background:linear-gradient(145deg,#7441dc,#a855f7);
  color:#fff;
  box-shadow:0 5px 15px rgba(116,65,220,.28);
  line-height:1;
}

@media(max-width:800px){
  #backBtn.back-btn{
    position:relative;
    z-index:100;
    display:grid;
    width:48px;
    height:48px;
    min-width:48px;
    min-height:48px;
    place-items:center;
    pointer-events:auto;
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }
}
.workspace-chat .composer > #composerAiBtn.hidden{display:none !important}
.workspace-chat .composer > #composerAiBtn:disabled{opacity:.45;cursor:not-allowed}
.workspace-chat .composer > #composerAiBtn span{font-size:17px;line-height:.85}
.workspace-chat .composer > #composerAiBtn small{font-size:9px;font-weight:900;line-height:1}
.workspace-chat .composer{
  grid-template-columns:auto auto auto minmax(0,1fr) auto auto auto !important;
  grid-template-areas:
    "voice voice voice voice voice voice voice"
    "emoji attach camera entry ai mic send" !important;
}
.chat-ai-assistant{
  position:absolute;
  left:50%;
  bottom:88px;
  z-index:80;
  width:min(620px,calc(100% - 32px));
  max-height:min(72dvh,650px);
  overflow:auto;
  padding:18px;
  border:1px solid rgba(139,77,232,.48);
  border-radius:24px;
  background:rgba(15,25,43,.98);
  color:#f8fafc;
  box-shadow:0 20px 55px rgba(5,12,25,.46);
  transform:translateX(-50%);
  -webkit-backdrop-filter:blur(18px);
  backdrop-filter:blur(18px);
}
.chat-ai-assistant.hidden{display:none !important}
.chat-ai-assistant-head,.chat-ai-assistant-head>div{display:flex;align-items:center;gap:10px}
.chat-ai-assistant-head{justify-content:space-between}
.chat-ai-assistant-head h3{margin:0;font-size:23px}
.chat-ai-mark{display:grid;place-items:center;width:39px;height:39px;border-radius:50%;background:linear-gradient(145deg,#7441dc,#a855f7);font-size:21px}
.chat-ai-assistant-head>button{width:38px;height:38px;border:1px solid rgba(255,255,255,.18);border-radius:50%;background:#202d42;color:#fff;font-size:25px}
.chat-ai-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:16px}
.chat-ai-actions button{min-height:44px;border:1px solid rgba(168,85,247,.55);border-radius:999px;padding:8px 10px;background:#17243a;color:#f2eaff;font-weight:800}
.chat-ai-actions button:hover,.chat-ai-actions button:focus-visible{background:#2d2052;outline:2px solid #a855f7;outline-offset:1px}
.chat-ai-actions button:disabled{opacity:.6}
.chat-ai-status{margin:14px 2px 10px;color:#b7c1d2;font-size:13px}
.chat-ai-draft-box{display:grid;gap:10px;padding:14px;border:1px solid rgba(255,255,255,.16);border-radius:17px;background:#111c2f}
.chat-ai-draft-box.hidden{display:none !important}
.chat-ai-draft-box label{font-size:16px;font-weight:900}
.chat-ai-draft-box textarea{width:100%;min-height:112px;max-height:250px;resize:vertical;border:1px solid #42506a;border-radius:13px;padding:12px;background:#17243a;color:#fff;font:inherit;line-height:1.45;outline:none;box-sizing:border-box}
.chat-ai-draft-box textarea:focus{border-color:#a855f7;box-shadow:0 0 0 3px rgba(168,85,247,.18)}
.chat-ai-draft-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.chat-ai-draft-buttons button{min-height:46px;border:1px solid rgba(255,255,255,.18);border-radius:13px;background:#26344a;color:#fff;font-weight:900}
.chat-ai-draft-buttons button.primary{border-color:#43ad8c;background:#43ad8c}
.chat-ai-draft-box>small{text-align:center;color:#aeb8c8}
@media(max-width:760px){
  .workspace-chat .composer{
    grid-template-columns:auto auto auto minmax(0,1fr) auto auto !important;
    grid-template-areas:
      "voice voice voice voice voice voice"
      "emoji attach camera entry ai mic" !important;
  }
  .workspace-chat .composer > #composerAiBtn{width:40px;height:40px}
  .chat-ai-assistant{position:absolute;left:8px;right:8px;bottom:76px;width:auto;max-height:calc(100dvh - 150px);padding:14px;border-radius:21px;transform:none}
  .chat-ai-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .chat-ai-assistant-head h3{font-size:20px}
}
@media(max-width:390px){
  .workspace-chat .composer > #composerAiBtn{width:36px;height:36px}
  .chat-ai-draft-buttons{grid-template-columns:1fr}
}

/* BUILD 6859 — telephone-style incoming calls, tones, and call timers.
   Connected video geometry, camera filters, and capture controls are unchanged. */
#callOverlay .call-status-line{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  color:#bdc7d8;
}
#callOverlay #callTimer{
  display:none;
  align-items:center;
  justify-content:center;
  min-width:58px;
  padding:3px 9px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  background:rgba(255,255,255,.09);
  color:#fff;
  font-size:13px;
  font-variant-numeric:tabular-nums;
  letter-spacing:.04em;
}
#callOverlay.call-connected #callTimer{display:inline-flex}
html body #callOverlay.call-overlay.audio-call #videoStage.video-stage{
  background:radial-gradient(circle at 50% 42%,#26344a 0,#172238 44%,#101827 100%) !important;
}
html body #callOverlay.call-overlay.audio-call #videoStage.video-stage #remoteVideo,
html body #callOverlay.call-overlay.audio-call #videoStage.video-stage #localVideo{
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}
html body #callOverlay.call-overlay.audio-call #videoStage.video-stage::before{
  content:"☎" !important;
  position:absolute !important;
  inset:auto !important;
  display:grid !important;
  place-items:center !important;
  width:150px !important;
  height:150px !important;
  border:2px solid rgba(255,255,255,.72) !important;
  border-radius:50% !important;
  background:rgba(36,50,75,.95) !important;
  color:#fff !important;
  box-shadow:0 0 0 18px rgba(255,255,255,.06),0 20px 55px rgba(0,0,0,.42) !important;
  font-size:70px !important;
  line-height:1 !important;
  z-index:3 !important;
  animation:none !important;
}
html body #callOverlay.call-overlay.audio-call.incoming-call #videoStage.video-stage::before,
html body #callOverlay.call-overlay.audio-call.outgoing-call #videoStage.video-stage::before{
  animation:connectchat-call-ring 1.5s ease-in-out infinite !important;
}
html body #callOverlay.call-overlay.video-call #videoStage.video-stage #remoteVideo,
html body #callOverlay.call-overlay.video-call #videoStage.video-stage #localVideo{
  display:block !important;
  opacity:1 !important;
  visibility:visible !important;
}
#callOverlay.incoming-call .call-controls{
  grid-template-columns:repeat(2,minmax(130px,190px)) !important;
}
#callOverlay.incoming-call .accept-call,
#callOverlay.incoming-call .decline-call{
  display:block !important;
  min-height:52px !important;
  font-size:16px !important;
}
@keyframes connectchat-call-ring{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.06)}
}
@media(max-width:800px){
  html body #callOverlay.call-overlay.audio-call #videoStage.video-stage::before{
    width:128px !important;
    height:128px !important;
    font-size:60px !important;
  }
  #callOverlay .call-status-line{gap:7px}
  #callOverlay #callTimer{min-width:54px;padding:3px 7px;font-size:12px}
}
#callOverlay .call-filter-native{
  min-height:48px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:5px 12px;
  border:2px solid #8b4de8;
  border-radius:999px;
  background:linear-gradient(135deg,#793de1,#df3ca5);
  color:#fff;
  box-shadow:0 6px 18px rgba(130,55,200,.28);
}
#callOverlay .call-filter-native.hidden{display:none !important}
#callOverlay .call-filter-native select{
  max-width:170px;
  border:0;
  outline:0;
  background:transparent;
  color:#fff;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
#callOverlay .call-filter-native select option{color:#111;background:#fff}
@media(max-width:600px){
  #callOverlay .call-filter-native{min-height:44px;padding:4px 9px}
  #callOverlay .call-filter-native select{max-width:145px;font-size:14px}
}

/* BUILD 6854 — clean full-screen result and one explicit share arrow.
   The approved shutter and front/rear-switch anchors stay unchanged. */
#captureSwitchBtn svg{display:block;width:27px;height:27px;overflow:visible}
#captureSwitchBtn .switch-camera-body,
#captureSwitchBtn .switch-camera-lens,
#captureSwitchBtn .switch-camera-arrow{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.capture-result-share{
  position:absolute;
  right:18px;
  bottom:18px;
  z-index:72;
  display:grid;
  place-items:center;
  width:62px;
  height:62px;
  padding:0 0 1px 3px;
  border:2px solid rgba(255,255,255,.9);
  border-radius:50%;
  background:#43ad8c;
  color:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
  font-size:29px;
  line-height:1;
}
.capture-result-share.hidden{display:none !important}
.capture-result-actions{
  position:absolute;
  inset:0;
  z-index:100;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:18px max(14px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
  background:rgba(0,0,0,.62);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
}
.capture-result-actions.hidden{display:none !important}
.capture-result-actions-card{
  width:min(100%,480px);
  display:grid;
  gap:9px;
  padding:15px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:22px;
  background:#151515;
  color:#fff;
  box-shadow:0 20px 55px rgba(0,0,0,.55);
}
.capture-result-actions-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 2px 4px 7px;font-size:18px}
.capture-result-actions-head button{width:38px;height:38px;border:0;border-radius:50%;background:#292929;color:#fff;font-size:26px}
.capture-result-actions-card>button{
  min-height:50px;
  border:0;
  border-radius:999px;
  padding:10px 16px;
  background:#292929;
  color:#fff;
  font:inherit;
  font-weight:800;
}
.capture-result-actions-card>.capture-result-current{background:#43ad8c}

/* The legacy review/action surfaces are intentionally retired in Build 6854. */
#captureOverlay.result-ready .capture-actions,
#captureOverlay .capture-photo-review{display:none !important}

@media (pointer:coarse) and (max-width:1024px){
  #captureOverlay.photo-mode:not(.result-ready) .capture-actions #captureSwitchBtn{
    position:absolute !important;
    left:auto !important;
    right:max(27px,env(safe-area-inset-right)) !important;
    top:auto !important;
    bottom:max(27px,env(safe-area-inset-bottom)) !important;
    z-index:2 !important;
    display:grid !important;
    place-items:center !important;
    width:52px !important;
    min-width:52px !important;
    height:52px !important;
    min-height:52px !important;
    margin:0 !important;
    padding:0 !important;
    border:1px solid rgba(255,255,255,.3) !important;
    border-radius:50% !important;
    background:rgba(25,25,25,.82) !important;
    color:#fff !important;
    box-shadow:0 6px 18px rgba(0,0,0,.32) !important;
    pointer-events:auto !important;
  }
  #captureOverlay.photo-mode.capture-landscape:not(.result-ready) .capture-actions #captureSwitchBtn{
    right:max(27px,env(safe-area-inset-right)) !important;
    top:calc(50% + 58px) !important;
    bottom:auto !important;
  }
  #captureOverlay.photo-mode.result-ready .capture-shell{
    position:relative !important;
    display:block !important;
    width:100vw !important;
    height:100dvh !important;
    max-width:none !important;
    max-height:100dvh !important;
    overflow:hidden !important;
    background:#000 !important;
  }
  #captureOverlay.photo-mode.result-ready .capture-preview{
    position:absolute !important;
    inset:0 !important;
    display:block !important;
    width:100% !important;
    height:100% !important;
    min-width:0 !important;
    min-height:0 !important;
  }
  #captureOverlay.photo-mode.result-ready .capture-preview video,
  #captureOverlay.photo-mode.result-ready .capture-preview canvas{
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:none !important;
    max-height:none !important;
    object-fit:cover !important;
    border-radius:0 !important;
  }
  #captureOverlay.photo-mode.result-ready .capture-preview .hidden{display:none !important}
  #captureOverlay.photo-mode.result-ready .capture-top,
  #captureOverlay.photo-mode.result-ready .capture-tabs,
  #captureOverlay.photo-mode.result-ready .capture-filter-control,
  #captureOverlay.photo-mode.result-ready .capture-actions,
  #captureOverlay.photo-mode.result-ready #captureSwitchBtn{display:none !important}
  #captureOverlay.photo-mode.result-ready .capture-result-share{
    right:max(18px,env(safe-area-inset-right)) !important;
    bottom:max(18px,env(safe-area-inset-bottom)) !important;
  }
}

/* AmalChat v0.2 — Free / Trial / Pro plan controls. */
.amalchat-plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}
.amalchat-plan-grid article,.personal-plan-card{display:grid;gap:6px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.personal-plan-card{width:100%;min-width:0;color:var(--text);font:inherit;text-align:left;cursor:pointer;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
.personal-plan-card:not(:disabled):hover{transform:translateY(-2px);border-color:#7c5cff;box-shadow:0 8px 20px rgba(90,75,190,.14)}
.personal-plan-card.selected{border-color:#7c5cff;box-shadow:0 0 0 2px rgba(124,92,255,.14)}
.personal-plan-card:disabled{cursor:default;opacity:1}
.amalchat-plan-grid article.featured,.personal-plan-card.featured{border-color:#7c5cff;box-shadow:0 0 0 2px rgba(124,92,255,.12)}
.amalchat-plan-grid b{font-size:14px}.amalchat-plan-grid strong{font-size:17px;color:var(--text)}
.amalchat-plan-grid small{font-size:11px;line-height:1.55;color:var(--muted)}
.personal-plan-action{display:block;margin-top:6px;padding:8px 9px;border-radius:9px;background:#6558ef;color:#fff;font-size:11px;font-weight:900;text-align:center}
.personal-plan-action.disabled{background:rgba(105,110,130,.12);color:var(--muted)}
.personal-plan-card.featured:not(:disabled) .personal-plan-action{background:#5a4be5}
.personal-plan-note{display:block;margin:-2px 0 12px!important;color:var(--muted);line-height:1.45}
.plan-request-badge{display:inline-flex;padding:2px 7px;border-radius:999px;background:#fff0c2;color:#7b5200;font-size:10px;font-style:normal;font-weight:900}
.administrator-plan-summary{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;margin:15px 0;padding:15px;border:1px solid rgba(0,128,105,.22);border-radius:14px;background:rgba(0,128,105,.06)}
.administrator-plan-summary>span{font-size:25px}.administrator-plan-summary b{display:block;color:var(--text)}.administrator-plan-summary small{display:block;margin-top:3px;color:var(--muted);line-height:1.4}
.administrator-plan-summary button,.administrator-username-form button{min-height:40px;border:0;border-radius:10px;padding:9px 13px;background:#5d54eb;color:#fff;font:inherit;font-weight:900;cursor:pointer}
.administrator-username-form{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:10px;margin:0 0 14px;padding:15px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.administrator-username-form h3,.administrator-username-form p{grid-column:1/-1;margin:0}.administrator-username-form h3{font-size:15px}.administrator-username-form p{color:var(--muted);font-size:11px}
.administrator-username-form label{display:grid;gap:5px;color:var(--muted);font-size:11px;font-weight:800}.administrator-username-form input{min-height:40px;border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:var(--bg);color:var(--text);font:inherit}
.administrator-username-form>small{grid-column:1/-1;min-height:14px;color:#c9364d;font-size:11px}
@media(max-width:720px){.administrator-plan-summary{grid-template-columns:auto 1fr}.administrator-plan-summary button{grid-column:1/-1}.administrator-username-form{grid-template-columns:1fr}.administrator-username-form h3,.administrator-username-form p,.administrator-username-form>small{grid-column:auto}}
.upgrade-pro-btn{width:100%;min-height:46px;margin:0 0 12px;border-radius:12px;font-weight:900}
.admin-plan-select{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}
.admin-plan-select select{min-height:34px;border:1px solid var(--border);border-radius:9px;padding:5px 8px;background:var(--panel);color:var(--text);font:inherit;font-weight:800}
@media(max-width:720px){.amalchat-plan-grid{grid-template-columns:1fr}.admin-plan-select{width:100%}.admin-plan-select select{flex:1}}

/* BUILD 6848 — mobile orientation-aware selfie layout. */
#captureOverlay.capture-landscape .capture-shell{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(260px,34vw) !important;
  grid-template-rows:auto auto 1fr auto !important;
  width:100% !important;
  max-width:none !important;
}
#captureOverlay.capture-landscape .capture-top{grid-column:1/-1;grid-row:1;padding:6px 12px !important}
#captureOverlay.capture-landscape .capture-preview{grid-column:1;grid-row:2/5;min-width:0;min-height:0}
#captureOverlay.capture-landscape .capture-tabs{grid-column:2;grid-row:2;padding:5px 8px !important}
#captureOverlay.capture-landscape .capture-filter-control{grid-column:2;grid-row:3;width:100% !important;margin:4px 0 !important;align-self:start}
#captureOverlay.capture-landscape .capture-actions{grid-column:2;grid-row:4;width:100% !important;min-height:72px !important;padding:8px 10px max(8px,env(safe-area-inset-bottom)) !important}
#captureOverlay.capture-landscape.result-ready:not(.video-mode) .capture-actions{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  grid-template-areas:"retake preview" "save share" "send send" !important;
}
#captureOverlay.capture-landscape .capture-photo-review,
#captureOverlay.capture-landscape .capture-recipient-picker{grid-column:1/-1;grid-row:1/-1}

/* Build 6848 — approved-user picker for internal ConnectChat sharing. */
.capture-recipient-picker{
  position:absolute;
  inset:0;
  z-index:95;
  display:grid;
  place-items:center;
  padding:calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  background:rgba(0,0,0,.76);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
}
.capture-recipient-picker.hidden{display:none !important}
.capture-recipient-card{
  width:min(92vw,520px);
  max-height:min(84dvh,680px);
  display:grid;
  grid-template-rows:auto auto minmax(120px,1fr) auto auto;
  gap:10px;
  padding:16px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:22px;
  background:#151515;
  color:#fff;
  box-shadow:0 22px 60px rgba(0,0,0,.5);
}
.capture-recipient-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.capture-recipient-head div{display:grid;gap:3px}.capture-recipient-head small{color:#aaa}
.capture-recipient-head button{width:38px;height:38px;border:0;border-radius:50%;background:#292929;color:#fff;font-size:25px}
#captureRecipientSearch{width:100%;min-height:44px;border:1px solid #444;border-radius:12px;padding:8px 12px;background:#222;color:#fff;font:inherit}
.capture-recipient-list{min-height:120px;overflow:auto;display:grid;align-content:start;gap:5px;padding-right:2px}
.capture-recipient-row{display:grid;grid-template-columns:auto 42px 1fr;align-items:center;gap:10px;padding:8px;border-radius:13px;background:#202020}
.capture-recipient-row input{width:20px;height:20px;accent-color:#43ad8c}
.capture-recipient-row .avatar{width:40px;height:40px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#344054}
.capture-recipient-row .avatar img{width:100%;height:100%;object-fit:cover}
.capture-recipient-row>span:last-child{display:grid;gap:2px}.capture-recipient-row small{color:#aaa}
.capture-recipient-empty{padding:25px 10px;text-align:center;color:#aaa}
.capture-recipient-summary{font-size:13px;color:#bbb}
.capture-recipient-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:9px}
.capture-recipient-actions button{min-height:48px;border:0;border-radius:999px;padding:8px 12px;background:#292929;color:#fff;font-weight:800}
#captureRecipientSendBtn{background:#43ad8c}.capture-recipient-actions button:disabled{opacity:.45}

@media(max-height:520px) and (orientation:landscape){
  .capture-recipient-card{max-height:94dvh;grid-template-rows:auto auto minmax(80px,1fr) auto auto;padding:10px}
  .capture-recipient-row{padding:5px}.capture-recipient-row .avatar{width:34px;height:34px}
}

/* BUILD 6857 — mobile result must show only X and direct-send arrow.
   Higher specificity intentionally defeats the legacy result-button rules. */
@media (pointer:coarse) and (max-width:1024px){
  html body #captureOverlay.capture-overlay.result-ready .capture-actions #captureSaveBtn,
  html body #captureOverlay.capture-overlay.result-ready .capture-actions #captureShareBtn,
  html body #captureOverlay.capture-overlay.result-ready .capture-actions #captureRetakeBtn,
  html body #captureOverlay.capture-overlay.result-ready .capture-actions #capturePreviewBtn,
  html body #captureOverlay.capture-overlay.result-ready .capture-actions #captureMainBtn,
  html body #captureOverlay.capture-overlay.result-ready .capture-actions #captureSwitchBtn{
    display:none !important;
    visibility:hidden !important;
  }
  html body #captureOverlay.capture-overlay.result-ready .capture-actions #captureSendBtn{
    position:absolute !important;
    right:max(18px,env(safe-area-inset-right)) !important;
    bottom:max(18px,env(safe-area-inset-bottom)) !important;
    display:grid !important;
    visibility:visible !important;
  }
}

/* BUILD 6853 — unified filtered photo/video shutter.
   Tap takes a photo; hold records video; location remains orientation-anchored. */
@media (pointer:coarse) and (max-width:1024px){
  #captureOverlay.photo-mode:not(.result-ready) .capture-shell{
    position:relative !important;
    display:block !important;
    width:100vw !important;
    height:100dvh !important;
    max-width:none !important;
    max-height:100dvh !important;
  }
  #captureOverlay.photo-mode:not(.result-ready) .capture-preview{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
  }
  #captureOverlay.photo-mode:not(.result-ready) .capture-preview video,
  #captureOverlay.photo-mode:not(.result-ready) .capture-preview canvas{
    width:100% !important;
    height:100% !important;
    max-width:none !important;
    max-height:none !important;
    object-fit:cover !important;
  }
  #captureOverlay.photo-mode:not(.result-ready) .capture-top,
  #captureOverlay.photo-mode:not(.result-ready) .capture-tabs,
  #captureOverlay.photo-mode:not(.result-ready) .capture-filter-control,
  #captureOverlay.photo-mode:not(.result-ready) #captureSaveBtn,
  #captureOverlay.photo-mode:not(.result-ready) #captureShareBtn,
  #captureOverlay.photo-mode:not(.result-ready) #captureRetakeBtn,
  #captureOverlay.photo-mode:not(.result-ready) #capturePreviewBtn,
  #captureOverlay.photo-mode:not(.result-ready) #captureSendBtn{
    display:none !important;
  }
  #captureOverlay.photo-mode:not(.result-ready) .capture-actions{
    position:absolute !important;
    left:0 !important;
    right:0 !important;
    top:0 !important;
    bottom:0 !important;
    z-index:8 !important;
    width:100% !important;
    min-height:0 !important;
    padding:0 !important;
    background:transparent !important;
    pointer-events:none !important;
  }
  #captureOverlay.photo-mode:not(.result-ready) .capture-actions #captureMainBtn{
    position:absolute !important;
    left:50% !important;
    right:auto !important;
    top:auto !important;
    bottom:max(14px,env(safe-area-inset-bottom)) !important;
    display:block !important;
    width:78px !important;
    height:78px !important;
    margin:0 !important;
    transform:translateX(-50%) !important;
    pointer-events:auto !important;
    touch-action:none !important;
    user-select:none !important;
    -webkit-user-select:none !important;
    -webkit-touch-callout:none !important;
  }
  #captureOverlay.photo-mode.capture-landscape:not(.result-ready) .capture-actions #captureMainBtn{
    left:auto !important;
    right:max(14px,env(safe-area-inset-right)) !important;
    top:50% !important;
    bottom:auto !important;
    transform:translateY(-50%) !important;
  }
  #captureOverlay.photo-mode.show-capture-exit:not(.result-ready) .capture-top{
    position:absolute !important;
    inset:0 0 auto 0 !important;
    z-index:10 !important;
    display:block !important;
    padding:calc(10px + env(safe-area-inset-top)) 12px 0 !important;
    pointer-events:none !important;
  }
  #captureOverlay.photo-mode.show-capture-exit:not(.result-ready) .capture-top #captureCloseBtn{
    display:block !important;
    pointer-events:auto !important;
  }
  #captureOverlay.photo-mode.show-capture-exit:not(.result-ready) .capture-top #captureTitle,
  #captureOverlay.photo-mode.show-capture-exit:not(.result-ready) .capture-top #captureTimer{
    display:none !important;
  }
  #captureOverlay.photo-mode.show-capture-exit:not(.result-ready) .capture-filter-control{
    position:absolute !important;
    left:50% !important;
    right:auto !important;
    bottom:calc(108px + env(safe-area-inset-bottom)) !important;
    z-index:10 !important;
    display:flex !important;
    width:min(76vw,420px) !important;
    margin:0 !important;
    transform:translateX(-50%) !important;
    pointer-events:auto !important;
  }
  #captureOverlay.photo-mode.show-capture-exit:not(.result-ready) .capture-filter-control label{display:none !important}
  #captureOverlay.photo-mode.capture-landscape.show-capture-exit:not(.result-ready) .capture-filter-control{
    left:auto !important;
    right:calc(108px + env(safe-area-inset-right)) !important;
    top:50% !important;
    bottom:auto !important;
    width:min(38vw,360px) !important;
    transform:translateY(-50%) !important;
  }
  #captureOverlay.photo-mode.recording:not(.result-ready) .capture-actions #captureMainBtn{
    border-radius:50% !important;
    background:#ef1745 !important;
    border-color:#fff !important;
    transform:translateX(-50%) scale(.88) !important;
  }
  #captureOverlay.photo-mode.capture-landscape.recording:not(.result-ready) .capture-actions #captureMainBtn{
    transform:translateY(-50%) scale(.88) !important;
  }
}

/* BUILD 6847 — selfie review before upload, save and native share. */
#captureOverlay.result-ready:not(.video-mode) .capture-actions{
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  grid-template-areas:"retake preview save share send" !important;
  gap:8px !important;
}
#captureOverlay.result-ready:not(.video-mode) #captureRetakeBtn{grid-area:retake !important}
#captureOverlay.result-ready:not(.video-mode) #capturePreviewBtn{grid-area:preview !important}
#captureOverlay.result-ready:not(.video-mode) #captureSaveBtn{grid-area:save !important}
#captureOverlay.result-ready:not(.video-mode) #captureShareBtn{grid-area:share !important}
#captureOverlay.result-ready:not(.video-mode) #captureSendBtn{grid-area:send !important}
#captureOverlay.result-ready:not(.video-mode) #captureRetakeBtn,
#captureOverlay.result-ready:not(.video-mode) #capturePreviewBtn,
#captureOverlay.result-ready:not(.video-mode) #captureSaveBtn,
#captureOverlay.result-ready:not(.video-mode) #captureShareBtn,
#captureOverlay.result-ready:not(.video-mode) #captureSendBtn{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  min-height:48px !important;
  height:auto !important;
  padding:9px 8px !important;
  border-radius:999px !important;
  font-size:14px !important;
  white-space:nowrap !important;
}
#captureOverlay.result-ready:not(.video-mode) #captureCanvas{cursor:zoom-in}

.capture-photo-review{
  position:absolute;
  inset:0;
  z-index:80;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:calc(62px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  background:#000;
}
.capture-photo-review.hidden{display:none !important}
.capture-photo-review img{
  display:block;
  flex:1 1 auto;
  width:100%;
  height:auto;
  min-height:0;
  object-fit:contain;
  border-radius:12px;
}
.capture-review-close{
  position:absolute;
  top:calc(10px + env(safe-area-inset-top));
  left:14px;
  z-index:2;
  width:44px;
  height:44px;
  border:0;
  border-radius:50%;
  background:#242424;
  color:#fff;
  font-size:30px;
}
.capture-review-actions{
  flex:0 0 auto;
  width:min(100%,760px);
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
.capture-review-actions button{
  min-height:50px;
  border:0;
  border-radius:999px;
  padding:9px 10px;
  background:#292929;
  color:#fff;
  font-weight:800;
}
.capture-review-actions .capture-review-send{background:#43ad8c}

@media(max-width:600px){
  #captureOverlay.result-ready:not(.video-mode) .capture-actions{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    grid-template-areas:"retake preview save" "share share send" !important;
  }
  .capture-review-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* BUILD 6844 — one WhatsApp-style video layout on laptop and mobile. */
#callOverlay #videoStage{
  position:relative !important;
  display:block !important;
  overflow:hidden !important;
  width:min(960px,calc(100vw - 32px),calc((100vh - 220px) * 16 / 9)) !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:960px !important;
  max-height:calc(100vh - 220px) !important;
  aspect-ratio:16/9 !important;
  margin:0 auto !important;
  border-radius:20px !important;
  background:#070b12 !important;
  isolation:isolate !important;
}

#callOverlay #videoStage:not(.self-main) #remoteVideo,
#callOverlay #videoStage.self-main #localVideo{
  position:absolute !important;
  inset:0 !important;
  display:block !important;
  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:none !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  object-fit:cover !important;
  object-position:center center !important;
  border:0 !important;
  border-radius:0 !important;
  background:#070b12 !important;
  opacity:1 !important;
  visibility:visible !important;
  z-index:1 !important;
  cursor:pointer !important;
  touch-action:manipulation !important;
}

#callOverlay #videoStage:not(.self-main) #localVideo,
#callOverlay #videoStage.self-main #remoteVideo{
  position:absolute !important;
  inset:auto 14px 14px auto !important;
  display:block !important;
  width:clamp(132px,20%,190px) !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:190px !important;
  max-height:none !important;
  aspect-ratio:16/9 !important;
  object-fit:cover !important;
  object-position:center center !important;
  border:2px solid rgba(255,255,255,.9) !important;
  border-radius:14px !important;
  background:#263246 !important;
  box-shadow:0 8px 26px rgba(0,0,0,.48) !important;
  opacity:1 !important;
  visibility:visible !important;
  z-index:10 !important;
  cursor:pointer !important;
  touch-action:manipulation !important;
}

#callOverlay #videoStage video:focus-visible{
  outline:3px solid #7dd3fc !important;
  outline-offset:-4px !important;
}

#callOverlay #videoStage.screen-sharing:not(.self-main) #remoteVideo,
#callOverlay #videoStage.screen-sharing.self-main #localVideo{
  object-fit:contain !important;
}

@media(max-width:600px){
  #callOverlay #videoStage{
    width:calc(100vw - 28px) !important;
    max-width:none !important;
    max-height:none !important;
    aspect-ratio:16/9 !important;
    border-radius:16px !important;
  }

  #callOverlay #videoStage:not(.self-main) #localVideo,
  #callOverlay #videoStage.self-main #remoteVideo{
    inset:auto 10px 10px auto !important;
    width:clamp(112px,29vw,150px) !important;
    max-width:150px !important;
    border-radius:12px !important;
  }
}
#callOverlay .call-controls{
  position:relative !important;
  overflow:visible !important;
}
#callOverlay #callFilterTray,
#callOverlay .call-filter-tray{
  position:absolute !important;
  left:50% !important;
  right:auto !important;
  bottom:calc(100% + 8px) !important;
  transform:translateX(-50%) !important;
  z-index:30 !important;
  width:min(360px,calc(100vw - 36px)) !important;
  max-width:360px !important;
  max-height:min(54vh,410px) !important;
  display:flex !important;
  flex-direction:column !important;
  flex-wrap:nowrap !important;
  align-items:stretch !important;
  gap:2px !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  margin:0 !important;
  padding:10px !important;
  border:1px solid rgba(255,255,255,.72) !important;
  border-radius:24px !important;
  background:rgba(235,235,235,.82) !important;
  -webkit-backdrop-filter:blur(24px) saturate(135%) !important;
  backdrop-filter:blur(24px) saturate(135%) !important;
  box-shadow:0 18px 48px rgba(0,0,0,.38) !important;
  cursor:default !important;
  scroll-snap-type:none !important;
}
#callOverlay #callFilterTray.hidden,
#callOverlay .call-filter-tray.hidden{
  display:none !important;
}
#callOverlay #callFilterTray [data-call-filter],
#callOverlay .call-filter-tray [data-call-filter]{
  position:relative !important;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  min-height:44px !important;
  flex:0 0 auto !important;
  display:block !important;
  border:0 !important;
  border-radius:14px !important;
  padding:7px 10px 7px 42px !important;
  background:transparent !important;
  color:#111 !important;
  font:inherit !important;
  font-size:18px !important;
  font-weight:500 !important;
  text-align:left !important;
  cursor:pointer !important;
  scroll-snap-align:none !important;
}
#callOverlay #callFilterTray [data-call-filter]:hover,
#callOverlay #callFilterTray [data-call-filter]:focus-visible,
#callOverlay .call-filter-tray [data-call-filter]:hover,
#callOverlay .call-filter-tray [data-call-filter]:focus-visible{
  background:rgba(255,255,255,.45) !important;
  outline:none !important;
}
#callOverlay #callFilterTray [data-call-filter].active:before,
#callOverlay .call-filter-tray [data-call-filter].active:before{
  content:"✓";
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:#111;
  font-size:21px;
  font-weight:800;
}
#callOverlay #callFilterTray .filter-swatch,
#callOverlay .call-filter-tray .filter-swatch{
  display:none !important;
}
#callOverlay #callFilterTray [data-call-filter] b,
#callOverlay .call-filter-tray [data-call-filter] b{
  font:inherit !important;
}
@media(max-width:600px){
  #callOverlay #callFilterTray,
  #callOverlay .call-filter-tray{
    bottom:calc(100% + 5px) !important;
    width:calc(100vw - 28px) !important;
    max-height:min(52vh,420px) !important;
    padding:9px !important;
    border-radius:23px !important;
  }
  #callOverlay #callFilterTray [data-call-filter],
  #callOverlay .call-filter-tray [data-call-filter]{
    min-height:43px !important;
    padding-left:40px !important;
    font-size:17px !important;
  }
}

/* Build 6854 final precedence: no legacy result panel. */
#captureOverlay.result-ready .capture-actions,
#captureOverlay.result-ready:not(.video-mode) .capture-actions,
#captureOverlay.capture-landscape.result-ready:not(.video-mode) .capture-actions{
  display:none !important;
}
@media (pointer:coarse) and (max-width:1024px){
  #captureOverlay.photo-mode.result-ready .capture-shell{
    position:relative !important;
    display:block !important;
    width:100vw !important;
    height:100dvh !important;
    max-width:none !important;
    max-height:100dvh !important;
    overflow:hidden !important;
  }
  #captureOverlay.photo-mode.result-ready .capture-preview{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
  }
  #captureOverlay.photo-mode.result-ready .capture-preview video,
  #captureOverlay.photo-mode.result-ready .capture-preview canvas{
    width:100% !important;
    height:100% !important;
    max-width:none !important;
    max-height:none !important;
    object-fit:cover !important;
    border-radius:0 !important;
  }
  #captureOverlay.photo-mode.result-ready .capture-top,
  #captureOverlay.photo-mode.result-ready .capture-tabs,
  #captureOverlay.photo-mode.result-ready .capture-filter-control,
  #captureOverlay.photo-mode.result-ready #captureSwitchBtn{display:none !important}
}

/* BUILD 6855 — clean tappable result with photo zoom and pan. */
#captureOverlay.result-ready #captureCanvas{
  cursor:grab !important;
  touch-action:none !important;
  user-select:none !important;
  -webkit-user-select:none !important;
  transition:transform .16s ease-out;
}
#captureOverlay.result-ready #captureCanvas:active{cursor:grabbing !important;transition:none}
#captureOverlay.result-ready .capture-result-share{display:none !important}

/* BUILD 6856 — direct capture delivery and full chat media viewer. */
#captureOverlay .capture-tabs{display:none !important}
#captureOverlay.result-ready .capture-actions,
#captureOverlay.result-ready:not(.video-mode) .capture-actions,
#captureOverlay.capture-landscape.result-ready:not(.video-mode) .capture-actions{
  position:absolute !important;
  inset:0 !important;
  z-index:18 !important;
  display:block !important;
  width:100% !important;
  min-height:0 !important;
  padding:0 !important;
  background:transparent !important;
  pointer-events:none !important;
}
#captureOverlay.result-ready .capture-actions>button{display:none !important}
#captureOverlay.result-ready .capture-actions #captureSendBtn{
  position:absolute !important;
  right:max(18px,env(safe-area-inset-right)) !important;
  bottom:max(18px,env(safe-area-inset-bottom)) !important;
  z-index:2 !important;
  display:grid !important;
  place-items:center !important;
  width:62px !important;
  min-width:62px !important;
  height:62px !important;
  min-height:62px !important;
  padding:0 0 1px 3px !important;
  border:2px solid rgba(255,255,255,.92) !important;
  border-radius:50% !important;
  background:#20bf63 !important;
  color:#fff !important;
  box-shadow:0 9px 28px rgba(0,0,0,.38) !important;
  font-size:30px !important;
  pointer-events:auto !important;
}
#captureOverlay.result-ready .capture-top{
  position:absolute !important;
  inset:0 0 auto 0 !important;
  z-index:20 !important;
  display:block !important;
  padding:calc(10px + env(safe-area-inset-top)) 12px 0 !important;
  background:transparent !important;
  pointer-events:none !important;
}
#captureOverlay.result-ready .capture-top #captureCloseBtn{
  display:grid !important;
  place-items:center !important;
  width:52px !important;
  height:52px !important;
  padding:0 !important;
  border-radius:50% !important;
  background:rgba(24,24,24,.82) !important;
  pointer-events:auto !important;
}
#captureOverlay.result-ready .capture-top #captureTitle,
#captureOverlay.result-ready .capture-top #captureTimer,
#captureOverlay.result-ready .capture-filter-control{display:none !important}
#captureOverlay.result-ready #captureCanvas{cursor:default !important;touch-action:auto !important;transition:none !important}

/* Build 6902: usable photo/video review controls. This final rule replaces
   the obsolete full-screen invisible action layer from builds 6854-6857. */
#captureOverlay.result-ready .capture-actions,
#captureOverlay.result-ready:not(.video-mode) .capture-actions,
#captureOverlay.capture-landscape.result-ready:not(.video-mode) .capture-actions{
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  top:auto !important;
  bottom:0 !important;
  z-index:30 !important;
  display:grid !important;
  grid-template-columns:repeat(4,minmax(82px,auto)) 62px !important;
  justify-content:center !important;
  align-items:center !important;
  gap:10px !important;
  width:100% !important;
  min-height:86px !important;
  padding:12px 16px max(14px,env(safe-area-inset-bottom)) !important;
  background:linear-gradient(transparent,rgba(0,0,0,.9)) !important;
  pointer-events:auto !important;
}
#captureOverlay.result-ready .capture-actions>button{display:block !important;visibility:visible !important;position:static !important;width:auto !important;min-width:82px !important;height:46px !important;min-height:46px !important;padding:0 14px !important;border:1px solid rgba(255,255,255,.25) !important;border-radius:999px !important;background:rgba(35,35,35,.92) !important;color:#fff !important;font-size:14px !important;pointer-events:auto !important}
#captureOverlay.result-ready .capture-actions #captureMainBtn,
#captureOverlay.result-ready .capture-actions #captureSwitchBtn{display:none !important}
#captureOverlay.result-ready .capture-actions #captureSendBtn{display:grid !important;place-items:center !important;min-width:58px !important;width:58px !important;height:58px !important;min-height:58px !important;padding:0 0 1px 3px !important;border:2px solid #fff !important;background:#20bf63 !important;font-size:28px !important}
@media(max-width:700px){
  #captureOverlay.result-ready .capture-actions,
  #captureOverlay.result-ready:not(.video-mode) .capture-actions{
    grid-template-columns:repeat(4,1fr) 54px !important;
    gap:4px !important;
    padding-left:6px !important;
    padding-right:6px !important;
  }
  #captureOverlay.result-ready .capture-actions>button{min-width:0 !important;height:42px !important;min-height:42px !important;padding:0 5px !important;font-size:11px !important}
  #captureOverlay.result-ready .capture-actions #captureSendBtn{width:52px !important;min-width:52px !important;height:52px !important;min-height:52px !important;font-size:25px !important}
}

.chat-media-viewer.hidden{display:none !important}
.chat-media-viewer{
  position:fixed;
  inset:0;
  z-index:3600;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  width:100vw;
  height:100dvh;
  overflow:hidden;
  background:#000;
  color:#fff;
}
.chat-media-viewer-head{
  position:relative;
  z-index:4;
  display:grid;
  grid-template-columns:52px minmax(0,1fr) 52px;
  align-items:center;
  gap:10px;
  padding:calc(10px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left));
  background:rgba(10,10,10,.88);
}
.chat-media-viewer-head>button{
  width:46px;
  height:46px;
  border:0;
  border-radius:50%;
  background:#292929;
  color:#fff;
  font-size:28px;
}
.chat-media-viewer-head>div{min-width:0;display:grid;gap:2px;text-align:center}
.chat-media-viewer-head small{color:#aaa;font-size:10px;font-weight:900;letter-spacing:.1em}
.chat-media-viewer-head b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-media-viewer-stage{
  position:relative;
  min-width:0;
  min-height:0;
  display:grid;
  place-items:center;
  overflow:hidden;
  touch-action:none;
  cursor:grab;
}
.chat-media-viewer-stage.dragging{cursor:grabbing}
.chat-media-viewer-stage img{
  display:block;
  width:auto;
  height:auto;
  max-width:min(92vw,1200px);
  max-height:calc(100dvh - 150px);
  object-fit:contain;
  transform-origin:center center;
  user-select:none;
  -webkit-user-select:none;
  will-change:transform;
}
.chat-media-viewer-stage video{
  display:block;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  object-fit:contain;
  transform-origin:center center;
  user-select:none;
  -webkit-user-select:none;
  will-change:transform;
}
.chat-media-viewer.image-mode .chat-media-viewer-stage{background:#f6f6f6}
.chat-media-viewer-stage .hidden{display:none !important}
.chat-media-zoom-controls{
  position:absolute;
  left:50%;
  bottom:max(18px,env(safe-area-inset-bottom));
  z-index:7;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  gap:8px;
  padding:7px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:999px;
  background:rgba(20,20,20,.82);
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  backdrop-filter:blur(10px);
}
.chat-media-zoom-controls.hidden{display:none!important}
.chat-media-zoom-controls button{
  min-width:44px;
  height:40px;
  padding:0 12px;
  border:0;
  border-radius:999px;
  background:#303030;
  color:#fff;
  font:800 18px/1 system-ui,sans-serif;
  cursor:pointer;
}

@media(max-width:700px){
  .chat-media-viewer-stage img{max-width:94vw;max-height:calc(100dvh - 145px)}
  .chat-media-zoom-controls{bottom:max(12px,env(safe-area-inset-bottom))}
}
.chat-media-actions{
  position:absolute;
  top:calc(72px + env(safe-area-inset-top));
  right:max(12px,env(safe-area-inset-right));
  z-index:8;
  width:min(330px,calc(100vw - 24px));
  display:grid;
  gap:6px;
  padding:8px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:17px;
  background:#171717;
  box-shadow:0 18px 46px rgba(0,0,0,.58);
}
.chat-media-actions.hidden{display:none !important}
.chat-media-actions button{
  min-height:48px;
  border:0;
  border-radius:12px;
  padding:10px 14px;
  background:#292929;
  color:#fff;
  font:inherit;
  font-weight:800;
  text-align:left;
}
.chat-media-recipient-picker{
  position:absolute;
  inset:0;
  z-index:12;
  display:grid;
  place-items:center;
  padding:calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  background:rgba(0,0,0,.78);
  -webkit-backdrop-filter:blur(9px);
  backdrop-filter:blur(9px);
}
.chat-media-recipient-picker.hidden{display:none !important}
.chat-media-recipient-card{
  width:min(92vw,520px);
  max-height:min(86dvh,690px);
  display:grid;
  grid-template-rows:auto auto minmax(120px,1fr) auto auto;
  gap:10px;
  padding:16px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:22px;
  background:#151515;
}
.chat-media-recipient-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.chat-media-recipient-head>div{display:grid;gap:3px}.chat-media-recipient-head small{color:#aaa}
.chat-media-recipient-head button{width:38px;height:38px;border:0;border-radius:50%;background:#292929;color:#fff;font-size:25px}
#chatMediaRecipientSearch{width:100%;min-height:44px;border:1px solid #444;border-radius:12px;padding:8px 12px;background:#222;color:#fff;font:inherit}
.chat-media-recipient-list{min-height:120px;overflow:auto;display:grid;align-content:start;gap:5px}
.chat-media-recipient-row{display:grid;grid-template-columns:auto 42px 1fr;align-items:center;gap:10px;padding:8px;border-radius:13px;background:#202020}
.chat-media-recipient-row input{width:20px;height:20px;accent-color:#43ad8c}
.chat-media-recipient-row .avatar{width:40px;height:40px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#344054}
.chat-media-recipient-row .avatar img{width:100%;height:100%;object-fit:cover}
.chat-media-recipient-row>span:last-child{display:grid;gap:2px}.chat-media-recipient-row small{color:#aaa}
.chat-media-recipient-empty{padding:25px 10px;text-align:center;color:#aaa}
.chat-media-recipient-summary{color:#bbb;font-size:13px}
#chatMediaRecipientSendBtn{min-height:50px;border:0;border-radius:999px;background:#43ad8c;color:#fff;font-weight:900}
#chatMediaRecipientSendBtn:disabled{opacity:.45}
@media(max-height:520px) and (orientation:landscape){
  .chat-media-viewer-head{position:absolute;inset:0 0 auto 0;background:linear-gradient(rgba(0,0,0,.72),transparent)}
  .chat-media-viewer-stage{grid-row:1/-1}
  .chat-media-recipient-card{max-height:94dvh;grid-template-rows:auto auto minmax(70px,1fr) auto auto;padding:10px}
}

/* BUILD 6858 — elapsed video timer and guaranteed result escape. */
@media (pointer:coarse) and (max-width:1024px){
  html body #captureOverlay.capture-overlay.photo-mode.recording:not(.result-ready) .capture-top{
    position:absolute !important;
    inset:0 0 auto 0 !important;
    z-index:22 !important;
    display:block !important;
    padding:calc(10px + env(safe-area-inset-top)) 12px 0 !important;
    background:transparent !important;
    pointer-events:none !important;
  }
  html body #captureOverlay.capture-overlay.photo-mode.recording:not(.result-ready) .capture-top #captureCloseBtn,
  html body #captureOverlay.capture-overlay.photo-mode.recording:not(.result-ready) .capture-top #captureTitle{
    display:none !important;
  }
  html body #captureOverlay.capture-overlay.photo-mode.recording:not(.result-ready) .capture-top #captureTimer{
    position:absolute !important;
    left:50% !important;
    top:calc(12px + env(safe-area-inset-top)) !important;
    display:block !important;
    min-width:78px !important;
    padding:8px 13px !important;
    border-radius:999px !important;
    background:rgba(12,12,12,.82) !important;
    color:#fff !important;
    box-shadow:0 4px 16px rgba(0,0,0,.35) !important;
    font-size:17px !important;
    font-weight:900 !important;
    text-align:center !important;
    transform:translateX(-50%) !important;
  }
  html body #captureOverlay.capture-overlay.photo-mode.result-ready .capture-top{
    position:absolute !important;
    inset:0 0 auto 0 !important;
    z-index:22 !important;
    display:block !important;
    padding:calc(10px + env(safe-area-inset-top)) 12px 0 !important;
    background:transparent !important;
    pointer-events:none !important;
  }
  html body #captureOverlay.capture-overlay.photo-mode.result-ready .capture-top #captureCloseBtn{
    display:grid !important;
    visibility:visible !important;
    place-items:center !important;
    pointer-events:auto !important;
  }
  html body #captureOverlay.capture-overlay.photo-mode.result-ready .capture-top #captureTitle,
  html body #captureOverlay.capture-overlay.photo-mode.result-ready .capture-top #captureTimer{
    display:none !important;
  }
}

/* AmalChat v0.4 — in-workspace welcome dashboard and AI media workflow. */
.workspace-welcome-dashboard{position:absolute;inset:0;z-index:18;display:grid;place-items:center;padding:clamp(22px,5vw,72px);overflow:auto;background:radial-gradient(circle at 80% 78%,rgba(104,220,213,.18),transparent 31%),radial-gradient(circle at 20% 10%,rgba(105,85,255,.14),transparent 35%),#f6f8ff}
.workspace-welcome-card{width:min(950px,100%);padding:clamp(38px,5vw,58px);border:1px solid #e1e6f2;border-radius:34px;background:#fff;box-shadow:0 28px 70px rgba(47,60,101,.14);text-align:center}
.workspace-welcome-logo{width:78px;height:78px;margin-bottom:22px;filter:drop-shadow(0 10px 16px rgba(92,73,231,.25))}.workspace-welcome-card>small{display:block;color:#5f63ff;font-size:12px;font-weight:900;letter-spacing:.14em}.workspace-welcome-card>h1{margin:13px 0 2px;color:#07162f;font-size:clamp(38px,4.2vw,54px);letter-spacing:-.045em}.workspace-welcome-card>p{margin:0;color:#7d87a5;font-size:20px}
.workspace-welcome-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:min(570px,100%);margin:35px auto 15px}.workspace-welcome-actions button{min-height:60px;border:1px solid #dbe1ef;border-radius:14px;background:#fff;color:#101f3b;font:inherit;font-weight:900;cursor:pointer}.workspace-welcome-actions .workspace-download-btn{border:0;background:linear-gradient(135deg,#6553f1,#368cf0);color:#fff;box-shadow:0 12px 24px rgba(85,82,230,.24)}.workspace-welcome-note{display:block;color:#8c96b1;font-size:12px}
.workspace-quick-title{display:flex;align-items:center;gap:14px;margin:42px 0 25px;color:#a2aac0;font-size:12px;letter-spacing:.05em}.workspace-quick-title:before,.workspace-quick-title:after{content:"";height:1px;flex:1;background:#dce2ee}
.workspace-quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.workspace-quick-actions button{display:grid;grid-template-columns:48px 1fr;align-items:center;gap:12px;min-height:100px;padding:18px;border:1px solid #dfe5f1;border-radius:18px;background:#fafbff;color:#12203a;text-align:left;cursor:pointer}.workspace-quick-actions button:hover{border-color:#8274f4;box-shadow:0 8px 20px rgba(82,75,180,.1)}.workspace-quick-actions button>span{width:46px;height:46px;display:grid;place-items:center;border-radius:14px;background:#eff0ff;font-size:22px}.workspace-quick-actions button>div{display:grid;gap:4px}.workspace-quick-actions b{font-size:14px}.workspace-quick-actions small{color:#8791aa;font-size:11px;line-height:1.4}
.workspace-install-help{width:min(570px,100%);margin:18px auto 0;padding:14px;border-radius:12px;background:#eef2ff;color:#55617e;font-size:12px;line-height:1.55}.workspace-chat{position:relative}.app-v4.workspace-dashboard-open{grid-template-columns:var(--cc-rail-width) var(--cc-sidebar-width) minmax(420px,1fr)}.app-v4.workspace-dashboard-open .workspace-insights{display:none!important}.workspace-chat.welcome-dashboard-active>.chat-head,.workspace-chat.welcome-dashboard-active>.conversation-menu,.workspace-chat.welcome-dashboard-active>.date-chip,.workspace-chat.welcome-dashboard-active>.messages,.workspace-chat.welcome-dashboard-active>.smart-strip,.workspace-chat.welcome-dashboard-active>.typing,.workspace-chat.welcome-dashboard-active>.upload-status,.workspace-chat.welcome-dashboard-active>.ai-attachment-tray,.workspace-chat.welcome-dashboard-active>.chat-ai-assistant,.workspace-chat.welcome-dashboard-active>.composer{visibility:hidden}.workspace-chat:not(.welcome-dashboard-active)>.workspace-welcome-dashboard{display:none}
@media(max-width:800px){.workspace-welcome-dashboard{padding:15px}.workspace-welcome-card{padding:30px 18px;border-radius:24px}.workspace-welcome-actions,.workspace-quick-actions{grid-template-columns:1fr}.workspace-quick-title{margin-top:30px}.workspace-welcome-card>p{font-size:16px}.workspace-welcome-logo{width:62px;height:62px}.workspace-quick-actions button{min-height:82px}}

/* AmalChat v0.5 — admin-only two-way Telegram bridge. */
.telegram-workspace{height:min(720px,calc(100dvh - 190px));min-height:480px;display:grid;grid-template-columns:minmax(230px,30%) 1fr;overflow:hidden;border:1px solid #dfe5f1;border-radius:22px;background:#fff;box-shadow:0 16px 36px rgba(43,55,91,.08)}
.telegram-contact-panel{display:grid;grid-template-rows:auto 1fr;border-right:1px solid #e3e8f2;background:#f8faff}.telegram-contact-panel>header,.telegram-thread>header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:70px;padding:15px 18px;border-bottom:1px solid #e3e8f2}.telegram-contact-panel>header{display:grid}.telegram-contact-panel header small,.telegram-thread header small{color:#7f89a3}.telegram-contact-list{padding:10px;overflow:auto}.telegram-contact{width:100%;display:grid;grid-template-columns:40px 1fr;align-items:center;gap:10px;padding:11px;border:0;border-radius:13px;background:transparent;color:#17223b;text-align:left;cursor:pointer}.telegram-contact:hover,.telegram-contact.active{background:#eaeefe}.telegram-contact>span{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:#6258ed;color:#fff}.telegram-contact>div{min-width:0;display:grid;gap:3px}.telegram-contact b,.telegram-contact small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.telegram-contact small{color:#7f89a3}
.telegram-thread{min-width:0;min-height:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto}.telegram-thread>header>div{display:grid;gap:4px}.telegram-thread>header button{border:1px solid #dbe1ee;border-radius:10px;padding:9px 13px;background:#fff;color:#53607b;font-weight:800;cursor:pointer}.telegram-message-list{min-height:0;display:flex;flex-direction:column;gap:12px;padding:20px;overflow-y:auto;overscroll-behavior:contain;background:linear-gradient(150deg,#fafbff,#f4f7ff)}.telegram-message{flex:0 0 auto;align-self:flex-start;max-width:min(78%,650px);padding:11px 14px;border:1px solid #e0e5f0;border-radius:16px 16px 16px 5px;background:#fff;box-shadow:0 5px 13px rgba(51,63,98,.06)}.telegram-message.outbound{align-self:flex-end;border:0;border-radius:16px 16px 5px 16px;background:linear-gradient(135deg,#6857ef,#4c75ed);color:#fff}.telegram-message small{display:block;margin-bottom:5px;color:#8791aa;font-size:11px}.telegram-message.outbound small{color:#e5e7ff}.telegram-message p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45}.telegram-composer{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:14px;border-top:1px solid #e3e8f2;background:#fff}.telegram-composer textarea{resize:none;min-height:48px;max-height:130px;padding:12px;border:1px solid #d8deeb;border-radius:13px;font:inherit}.telegram-composer button{min-width:145px;border:0;border-radius:13px;background:#5e5af1;color:#fff;font-weight:900;cursor:pointer}.telegram-composer button:disabled,.telegram-composer textarea:disabled{opacity:.5}.telegram-empty{padding:30px 15px;color:#8993aa;text-align:center;line-height:1.55}
@media(max-width:800px){.telegram-workspace{height:calc(100dvh - 150px);min-height:520px;grid-template-columns:1fr;grid-template-rows:minmax(135px,32%) 1fr}.telegram-contact-panel{border-right:0;border-bottom:1px solid #e3e8f2}.telegram-contact-panel>header{min-height:55px;padding:9px 14px}.telegram-contact-list{display:flex;gap:7px;overflow:auto}.telegram-contact{min-width:190px}.telegram-thread>header{min-height:58px;padding:9px 12px}.telegram-message-list{padding:12px}.telegram-message{max-width:88%}.telegram-composer{grid-template-columns:1fr;padding:9px}.telegram-composer button{min-height:44px}}

/* AmalChat v0.6 — multi-business directory, catalogue and enquiry workspace. */
.business-platform{display:grid;grid-template-rows:auto 1fr;min-height:min(720px,calc(100dvh - 185px));border:1px solid #dfe5f1;border-radius:22px;overflow:hidden;background:#fff;box-shadow:0 16px 38px rgba(45,57,95,.08)}.business-tabs{display:flex;gap:8px;padding:12px 16px;border-bottom:1px solid #e3e8f2;background:#f8faff}.business-tabs button{min-height:42px;padding:9px 16px;border:1px solid #dbe1ed;border-radius:12px;background:#fff;color:#56617a;font-weight:850;cursor:pointer}.business-tabs button.active{border-color:#6159ed;background:#6159ed;color:#fff}.business-workspace-body{min-height:0;overflow:auto;padding:22px;background:linear-gradient(145deg,#fbfcff,#f4f7ff)}
.business-directory-head{display:flex;justify-content:space-between;align-items:end;gap:18px;margin-bottom:20px}.business-directory-head h2,.business-profile-hero h2,.business-owner-head h2{margin:0;color:#121d36}.business-directory-head p,.business-profile-hero p,.business-owner-head p{margin:6px 0 0;color:#7b86a0}.business-search{display:grid;grid-template-columns:minmax(230px,390px) auto;gap:8px}.business-search input,.business-setup-form input,.business-setup-form textarea,.business-offering-form input,.business-offering-form textarea,.business-offering-form select,.business-enquiry-card input,.business-enquiry-card textarea,.business-enquiry-reply textarea{width:100%;border:1px solid #d8dfec;border-radius:12px;padding:11px 13px;background:#fff;color:#182239;font:inherit}.business-search button,.business-card button,.business-enquiry-card button,.business-setup-form>button,.business-offering-form>button,.business-enquiry-reply button{border:0;border-radius:12px;padding:11px 16px;background:linear-gradient(135deg,#6557ee,#397ff0);color:#fff;font-weight:900;cursor:pointer}.business-directory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:14px}.business-card{display:grid;grid-template-columns:54px 1fr;gap:13px;padding:17px;border:1px solid #e0e5f0;border-radius:18px;background:#fff;box-shadow:0 8px 20px rgba(50,63,99,.06)}.business-card-icon,.business-hero-icon{display:grid;place-items:center;border-radius:16px;background:linear-gradient(135deg,#6558ef,#43a7e8);color:#fff;font-size:22px;font-weight:950}.business-card-icon{width:52px;height:52px}.business-card>div:nth-child(2){min-width:0}.business-card small,.business-profile-hero small,.business-owner-head small{color:#625bed;font-weight:850;text-transform:uppercase;letter-spacing:.04em}.business-card h3{margin:4px 0;color:#17223b}.business-card p{min-height:40px;margin:5px 0;color:#65718c;line-height:1.45}.business-card span{display:block;color:#929bb0;font-size:12px}.business-card button{grid-column:1/-1}.business-empty{padding:35px 20px;color:#8590a8;text-align:center;line-height:1.55}.business-back{margin-bottom:15px;border:0;background:transparent;color:#5751d8;font-weight:850;cursor:pointer}.business-profile-hero{display:grid;grid-template-columns:82px 1fr;gap:18px;padding:22px;border-radius:20px;background:#fff;border:1px solid #e1e6f0}.business-hero-icon{width:80px;height:80px;font-size:34px}.business-profile-hero span{display:block;margin-top:9px;color:#77829a}.business-profile-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.75fr);gap:18px;margin-top:18px}.business-profile-grid>section,.business-enquiry-card,.business-catalogue-manager,.business-offering-form{padding:20px;border:1px solid #e0e5ef;border-radius:18px;background:#fff}.business-profile-grid h3,.business-owner-grid h3{margin:0 0 14px}.business-offering-list{display:grid;gap:9px}.business-offering{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px;border-radius:13px;background:#f7f9ff}.business-offering h4{margin:3px 0}.business-offering p{margin:0;color:#707b94}.business-offering small{color:#7d70e9;text-transform:capitalize}.business-offering>b{white-space:nowrap;color:#303d5b}.business-enquiry-card,.business-offering-form{display:grid;align-content:start;gap:11px}.business-enquiry-card small{color:#8a94aa}.business-setup-form{max-width:900px;margin:auto;display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:24px;border:1px solid #e0e5ef;border-radius:20px;background:#fff}.business-setup-form>div,.business-setup-form>.wide,.business-setup-form>button{grid-column:1/-1}.business-setup-form label,.business-offering-form label{display:grid;gap:6px;color:#4d5972;font-size:13px;font-weight:800}.business-setup-form h2{margin:5px 0}.business-setup-form p{color:#7c879f}.business-owner-head{display:flex;justify-content:space-between;gap:15px;padding:20px;border:1px solid #e0e5ef;border-radius:18px;background:#fff}.business-status{align-self:start;padding:8px 12px;border-radius:999px;background:#fff4d9;color:#916b00;font-size:12px;font-weight:900;text-transform:uppercase}.business-status.approved{background:#e2f8ec;color:#107744}.business-status.suspended{background:#ffe6e9;color:#a51e35}.business-owner-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.7fr);gap:18px;margin-top:18px}.business-manage-offering{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border-bottom:1px solid #edf0f5}.business-manage-offering>div{display:grid;gap:3px}.business-manage-offering small{color:#7c879f}.business-manage-offering button{border:0;background:#fff0f2;color:#bd2941;border-radius:9px;padding:7px 10px;font-weight:800;cursor:pointer}.business-price-row{display:grid;grid-template-columns:1fr 90px;gap:9px}
.business-inbox{height:min(650px,calc(100dvh - 270px));min-height:470px;display:grid;grid-template-columns:minmax(230px,31%) 1fr;overflow:hidden;border:1px solid #e0e5ef;border-radius:18px;background:#fff}.business-inbox>aside{min-height:0;border-right:1px solid #e1e6ef;overflow:auto;background:#fafbff}.business-inbox>aside h3{margin:0;padding:17px;border-bottom:1px solid #e1e6ef}.business-enquiry-row{width:100%;display:grid;grid-template-columns:38px 1fr;align-items:center;gap:9px;padding:12px;border:0;border-bottom:1px solid #edf0f5;background:transparent;text-align:left;cursor:pointer}.business-enquiry-row.active{background:#eaeefe}.business-enquiry-row>span{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#6259ed;color:#fff}.business-enquiry-row>div{min-width:0;display:grid;gap:4px}.business-enquiry-row b,.business-enquiry-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.business-enquiry-row small{color:#7e89a1}.business-inbox-thread{min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}.business-inbox-thread>header{padding:15px 18px;border-bottom:1px solid #e1e6ef}.business-inbox-thread>header>div{display:grid;gap:4px}.business-inbox-thread header small{color:#7c879f}.business-enquiry-messages{min-height:0;display:flex;flex-direction:column;gap:10px;padding:17px;overflow-y:auto;background:#f6f8fe}.business-enquiry-messages article{align-self:flex-start;max-width:78%;padding:11px 13px;border:1px solid #e0e5ef;border-radius:15px 15px 15px 5px;background:#fff}.business-enquiry-messages article.business,.business-enquiry-messages article.customer{align-self:flex-end;border:0;border-radius:15px 15px 5px 15px;background:#5e5aee;color:#fff}.business-enquiry-messages small{font-size:11px;color:#8993aa}.business-enquiry-messages article.business small,.business-enquiry-messages article.customer small{color:#e1e3ff}.business-enquiry-messages p{margin:5px 0 0;white-space:pre-wrap}.business-enquiry-reply{display:grid;grid-template-columns:1fr auto;gap:9px;padding:12px;border-top:1px solid #e1e6ef;background:#fff}.business-enquiry-reply button{min-width:100px}
@media(max-width:800px){.business-platform{min-height:calc(100dvh - 145px)}.business-tabs{overflow-x:auto}.business-tabs button{white-space:nowrap}.business-workspace-body{padding:12px}.business-directory-head{align-items:stretch;flex-direction:column}.business-search{grid-template-columns:1fr auto}.business-profile-grid,.business-owner-grid{grid-template-columns:1fr}.business-profile-hero{grid-template-columns:60px 1fr}.business-hero-icon{width:58px;height:58px}.business-setup-form{grid-template-columns:1fr;padding:16px}.business-setup-form>*{grid-column:1!important}.business-inbox{height:calc(100dvh - 215px);grid-template-columns:1fr;grid-template-rows:minmax(125px,31%) 1fr}.business-inbox>aside{border-right:0;border-bottom:1px solid #e1e6ef}.business-inbox>aside h3{padding:9px 12px}.business-enquiry-reply{grid-template-columns:1fr}.business-enquiry-reply button{min-height:42px}}
.business-admin-queue{margin-top:18px;padding:18px;border:1px solid #e0e5ef;border-radius:18px;background:#fff}.business-admin-queue h3{margin:0 0 12px}.business-admin-queue>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px;border-top:1px solid #edf0f5}.business-admin-queue span{display:grid;gap:3px}.business-admin-queue small,.business-admin-queue p{color:#7d879e}.business-admin-queue button{border:0;border-radius:10px;padding:9px 13px;background:#e2f8ec;color:#107744;font-weight:900;cursor:pointer}
.business-admin-row>div{display:flex;align-items:center;gap:7px}.business-admin-row select{border:1px solid #d8dfec;border-radius:9px;padding:8px;font:inherit}.business-admin-row [data-save-business-plan]{background:#5f59eb;color:#fff}@media(max-width:700px){.business-admin-row{align-items:stretch!important;flex-direction:column}.business-admin-row>div{display:grid;grid-template-columns:1fr 1fr}.business-admin-row select{grid-column:1/-1}}
.business-staff-manager{margin-top:18px;padding:18px;border:1px solid #e0e5ef;border-radius:18px;background:#fff}.business-staff-manager h3{margin:0 0 12px}.business-staff-list>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px;border-bottom:1px solid #edf0f5}.business-staff-list span{display:grid;gap:2px}.business-staff-list small{color:#7d879e;text-transform:capitalize}.business-staff-list button{border:0;border-radius:8px;padding:6px 9px;background:#fff0f2;color:#b42941;font-weight:800}.business-staff-manager form{display:grid;grid-template-columns:1fr 120px auto;gap:8px;margin-top:12px}.business-staff-manager input,.business-staff-manager select{min-width:0;border:1px solid #d8dfec;border-radius:10px;padding:10px;font:inherit}.business-staff-manager form button{border:0;border-radius:10px;padding:9px 13px;background:#5f59eb;color:#fff;font-weight:900}@media(max-width:600px){.business-staff-manager form{grid-template-columns:1fr}.business-staff-manager form button{min-height:42px}}
.business-plan-summary{display:grid;grid-template-columns:minmax(220px,1fr) minmax(380px,1.5fr) auto;align-items:center;gap:18px;margin-top:16px;padding:18px;border:1px solid #dedffb;border-radius:18px;background:linear-gradient(135deg,#f1f0ff,#f8fbff)}.business-plan-summary h3{margin:4px 0;color:#29236f}.business-plan-summary p{margin:0;color:#737e98}.business-plan-summary>div>small{color:#5e58e9;font-weight:900}.business-plan-usage{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.business-plan-usage span{display:grid;gap:3px;padding:9px;border-radius:11px;background:#fff;text-align:center}.business-plan-usage small{color:#7c879e}.business-plan-summary>button,.business-admin-plan button{border:0;border-radius:11px;padding:11px 14px;background:#5e59ed;color:#fff;font-weight:900}.business-admin-plan{margin-top:18px;display:flex;align-items:center;gap:10px;padding:16px;border:1px solid #e0e5ef;border-radius:18px;background:#fff}.business-admin-plan h3{margin:0 auto 0 0}.business-admin-plan select{border:1px solid #d8dfec;border-radius:10px;padding:10px;font:inherit}.personal-free-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px;border-radius:22px;background:linear-gradient(135deg,#14244a,#5145c9);color:#fff}.personal-free-banner small{color:#bfc7ff;font-weight:900;letter-spacing:.08em}.personal-free-banner h2{margin:7px 0}.personal-free-banner p{margin:0;color:#e3e6ff}.personal-free-banner>span{padding:12px 20px;border-radius:999px;background:#fff;color:#3f3aaf;font-size:20px;font-weight:950}.business-pricing-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-top:18px}.business-pricing-card{display:grid;grid-template-rows:auto auto 1fr auto;gap:12px;padding:22px;border:1px solid #e0e5ef;border-radius:20px;background:#fff}.business-pricing-card.pro{border:2px solid #6259ed;box-shadow:0 14px 30px rgba(80,72,190,.14)}.business-pricing-card.plus{background:linear-gradient(160deg,#171d35,#2b285c);color:#fff}.business-pricing-card>small{color:#6259ed;font-weight:950;text-transform:uppercase}.business-pricing-card.plus>small{color:#b9b4ff}.business-pricing-card h2{margin:0;font-size:30px}.business-pricing-card h2 span{font-size:13px;color:#7d879e}.business-pricing-card ul{display:grid;align-content:start;gap:9px;margin:0;padding-left:20px;line-height:1.4}.business-pricing-card button{min-height:44px;border:0;border-radius:11px;background:#615aee;color:#fff;font-weight:900}.business-pricing-card.free button{background:#e9ecf5;color:#536079}.business-pricing-card.plus button{background:#fff;color:#29255e}.business-payment-note{text-align:center;color:#7d879e}.business-admin-plan+div{margin-top:18px}@media(max-width:900px){.business-plan-summary{grid-template-columns:1fr}.business-pricing-grid{grid-template-columns:1fr}.business-plan-usage{grid-template-columns:repeat(2,1fr)}.business-admin-plan{align-items:stretch;flex-direction:column}.business-admin-plan h3{margin:0}.personal-free-banner{align-items:flex-start;flex-direction:column}}
/* AmalChat v0.8.2 build 6884 — final market UI overrides. */
.workspace-welcome-card{width:min(350px,92%)!important;padding:16px 14px!important;border-radius:18px!important}
.workspace-welcome-logo{width:42px!important;height:42px!important;margin-bottom:6px!important}.workspace-welcome-card>h1{font-size:26px!important;margin:2px 0!important}.workspace-welcome-card>p{font-size:11px!important;margin:2px 0!important}.workspace-welcome-actions{gap:6px!important;margin:12px 0 6px!important}.workspace-welcome-actions button{min-height:36px!important;padding:7px!important;font-size:10px!important}.workspace-welcome-note{display:none!important}.workspace-quick-title{margin:10px 0 7px!important;font-size:8px!important}.workspace-quick-actions{gap:5px!important}.workspace-quick-actions button{min-height:42px!important;padding:5px!important;grid-template-columns:22px 1fr!important;gap:4px!important}.workspace-quick-actions button>span{width:22px!important;height:22px!important;font-size:11px!important}.workspace-quick-actions b{font-size:8px!important}.workspace-quick-actions small{display:none!important}
.settings-workspace-grid{display:flex!important;flex-direction:column!important}.settings-account-card{order:1!important}.appearance-settings{order:2!important}.license-information-card{order:3!important}.settings-mobile-identity{order:4!important}.settings-workspace-grid>.settings-mobile-card:not(.settings-account-card){order:5!important}.settings-signin-panel{order:6!important}.settings-card-title{margin:0;padding:15px 17px 8px;font-size:16px}.account-dock>.persistent-logout{display:none!important}
.register-contact-fields{display:grid;gap:8px}.register-contact-fields.hidden{display:none!important}.register-contact-tabs{display:grid;grid-template-columns:1fr 1fr;padding:4px;background:#f3f5fa;border-radius:12px}.register-contact-tabs button{min-height:34px;border:0;border-radius:9px;background:transparent;font-weight:800}.register-contact-tabs button.active{background:#fff;color:#5c55ed;box-shadow:0 2px 8px rgba(32,42,76,.09)}
@media(max-width:700px){.workspace-welcome-card{width:min(330px,94%)!important}.workspace-quick-actions{grid-template-columns:repeat(3,1fr)!important}}
.admin-title-actions{display:flex;gap:8px;align-items:center}.admin-title-actions .danger{border:1px solid #fecaca;border-radius:10px;background:#fff1f2;color:#b91c1c;padding:10px 13px;font-weight:800}.rail-item,.workspace-quick-actions button,.account-summary,.account-menu button{pointer-events:auto!important;cursor:pointer!important}

/* Build 6902 — final camera result controls. Keep this block at EOF so
   legacy photo/video rules cannot stretch or disable the review actions. */
html body #captureOverlay.capture-overlay.result-ready .capture-actions{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:max(12px,env(safe-area-inset-bottom))!important;
  top:auto!important;
  z-index:70!important;
  width:min(720px,calc(100vw - 24px))!important;
  height:auto!important;
  min-height:58px!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(72px,1fr)) 58px!important;
  align-items:center!important;
  gap:8px!important;
  padding:8px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:18px!important;
  background:rgba(20,20,20,.88)!important;
  box-shadow:0 14px 38px rgba(0,0,0,.38)!important;
  transform:translateX(-50%)!important;
  pointer-events:auto!important;
  -webkit-backdrop-filter:blur(12px)!important;
  backdrop-filter:blur(12px)!important;
}
html body #captureOverlay.capture-overlay.result-ready .capture-actions>button{
  position:relative!important;
  inset:auto!important;
  width:auto!important;
  height:42px!important;
  min-width:0!important;
  display:block!important;
  visibility:visible!important;
  margin:0!important;
  padding:0 8px!important;
  border:0!important;
  border-radius:11px!important;
  background:#303030!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:850!important;
  line-height:1!important;
  opacity:1!important;
  transform:none!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
}
html body #captureOverlay.capture-overlay.result-ready .capture-actions>button.hidden{
  display:none!important;
}
html body #captureOverlay.capture-overlay.result-ready #captureMainBtn,
html body #captureOverlay.capture-overlay.result-ready #captureSwitchBtn{
  display:none!important;
}
html body #captureOverlay.capture-overlay.result-ready #captureSendBtn{
  display:grid!important;
  place-items:center!important;
  width:50px!important;
  height:50px!important;
  justify-self:end!important;
  padding:0!important;
  border-radius:50%!important;
  background:#12b981!important;
  color:#fff!important;
  font-size:25px!important;
}
html body #captureOverlay.capture-overlay.result-ready #captureSendBtn.hidden{
  display:none!important;
}
@media(max-width:560px){
  html body #captureOverlay.capture-overlay.result-ready .capture-actions{
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:calc(100vw - 16px)!important;
    grid-template-columns:repeat(4,minmax(0,1fr)) 50px!important;
    gap:5px!important;
    padding:6px!important;
    border-radius:15px!important;
  }
  html body #captureOverlay.capture-overlay.result-ready .capture-actions>button{
    height:40px!important;
    padding:0 3px!important;
    font-size:10px!important;
  }
  html body #captureOverlay.capture-overlay.result-ready #captureSendBtn{
    width:44px!important;
    height:44px!important;
    font-size:22px!important;
  }
}

/* Build 6904 — camera send feedback must remain visible above the recorder. */
html body .toast{z-index:5000!important}
html body #captureOverlay .capture-send-status{
  position:fixed!important;left:50%!important;bottom:84px!important;z-index:72!important;
  width:min(680px,calc(100vw - 28px))!important;padding:10px 14px!important;
  border:1px solid rgba(167,243,208,.48)!important;border-radius:12px!important;
  background:rgba(6,78,59,.94)!important;color:#fff!important;text-align:center!important;
  font-size:13px!important;font-weight:850!important;line-height:1.35!important;
  transform:translateX(-50%)!important;pointer-events:none!important;
}
html body #captureOverlay .capture-send-status.error{border-color:rgba(254,202,202,.65)!important;background:rgba(127,29,29,.96)!important}
html body #captureOverlay .capture-send-status.hidden{display:none!important}
@media(max-width:560px){html body #captureOverlay .capture-send-status{bottom:72px!important;font-size:12px!important}}

/* Build 6913 — the final-loaded legacy sheet must not restore the red phone on mobile. */
@media(max-width:800px){
  html body #callOverlay.call-overlay.audio-call #videoStage.video-stage::before{
    content:none!important;
    display:none!important;
    width:0!important;
    height:0!important;
    border:0!important;
    box-shadow:none!important;
  }
  html body #callOverlay.call-overlay.audio-call #videoStage.video-stage #callAudioAvatar.call-audio-avatar{
    display:grid!important;
  }
}

/* Build 6966 — full-screen media workspace with actions */
.chat-media-viewer{z-index:10050;background:#0c0c0d;grid-template-rows:auto minmax(0,1fr) auto auto !important}
.chat-media-viewer-head{z-index:4}
.chat-media-viewer-head .chat-media-top-close{margin-left:auto}
.chat-media-viewer-stage{min-height:0;background:#111 !important;overflow:hidden;touch-action:none}
.chat-media-viewer-stage img{max-width:92vw !important;max-height:calc(100dvh - 210px) !important;width:auto !important;height:auto !important;object-fit:contain !important;transform-origin:center center;user-select:none;-webkit-user-drag:none}
.chat-media-viewer-stage video{max-width:92vw;max-height:calc(100dvh - 210px);object-fit:contain}
.chat-media-toolbar{display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 12px;background:#171719;border-top:1px solid rgba(255,255,255,.08);overflow-x:auto;z-index:5}
.chat-media-toolbar button{min-width:72px;border:0;border-radius:12px;padding:8px 10px;background:#27272a;color:#fff;display:grid;gap:2px;place-items:center;font-weight:800;cursor:pointer}
.chat-media-toolbar button span{font-size:11px;font-weight:700}.chat-media-toolbar button.danger{color:#ff7777}.chat-media-toolbar button.hidden{display:none!important}
.chat-media-reaction-picker{position:fixed;left:50%;bottom:74px;transform:translateX(-50%);display:flex;gap:6px;background:#fff;padding:8px;border-radius:999px;box-shadow:0 10px 35px #0008;z-index:10080}
.chat-media-reaction-picker.hidden{display:none!important}.chat-media-reaction-picker button{font-size:24px;border:0;background:transparent;padding:5px;cursor:pointer}
.chat-media-zoom-controls{z-index:6}
body.chat-media-viewer-open{overflow:hidden}
@media(max-width:800px){
 .chat-media-viewer-stage img{max-width:100vw !important;max-height:calc(100dvh - 190px) !important}
 .chat-media-toolbar{justify-content:flex-start;padding-bottom:max(8px,env(safe-area-inset-bottom))}
 .chat-media-toolbar button{min-width:64px;padding:7px 8px}
 .chat-media-reaction-picker{bottom:86px}
}


/* Build 6967 — media toolbar visibility + non-overlapping zoom + photo editor */
.chat-media-viewer{grid-template-rows:auto minmax(0,1fr) auto auto !important}
.chat-media-zoom-controls{position:static!important;left:auto!important;bottom:auto!important;transform:none!important;justify-self:center;margin:8px 0 4px;z-index:7}
.chat-media-toolbar{position:static!important;flex:0 0 auto;min-height:64px;overflow-x:auto;scrollbar-width:thin}
.chat-media-toolbar button{flex:0 0 auto}
.chat-media-reaction-picker{bottom:92px!important}
.chat-media-editor{position:fixed;inset:0;z-index:10120;background:rgba(0,0,0,.72);display:grid;place-items:center;padding:18px}
.chat-media-editor.hidden{display:none!important}
.chat-media-editor-card{width:min(980px,96vw);max-height:94dvh;overflow:auto;background:#151518;color:#fff;border:1px solid #34343a;border-radius:20px;box-shadow:0 24px 80px #000a;padding:14px}
.chat-media-editor-head{display:flex;align-items:center;gap:12px;justify-content:space-between}.chat-media-editor-head div{display:grid;gap:3px}.chat-media-editor-head small{color:#aaa}.chat-media-editor-head button{width:42px;height:42px;border:0;border-radius:50%;background:#29292e;color:#fff;font-size:24px}
.chat-media-editor-tabs{display:flex;gap:8px;margin:12px 0}.chat-media-editor-tabs button{border:1px solid #3a3a42;background:#222229;color:#ddd;border-radius:999px;padding:9px 16px;font-weight:800}.chat-media-editor-tabs button.active{background:#6657f5;color:#fff;border-color:#6657f5}
.chat-media-editor-preview{min-height:300px;max-height:58dvh;display:grid;place-items:center;overflow:auto;background:#0d0d0f;border-radius:16px;padding:10px}.chat-media-editor-preview canvas,.chat-media-editor-preview img{max-width:100%;max-height:54dvh;object-fit:contain}
.chat-media-user-tools,.chat-media-ai-tools{display:grid;gap:10px;margin-top:12px}.chat-media-user-tools label{display:grid;grid-template-columns:110px 1fr;align-items:center;gap:10px}.chat-media-user-tools>div,.chat-media-editor-actions{display:flex;flex-wrap:wrap;gap:8px}.chat-media-user-tools button,.chat-media-ai-tools button,.chat-media-editor-actions button{border:0;border-radius:11px;padding:10px 13px;background:#2a2a31;color:#fff;font-weight:800}.chat-media-ai-tools textarea{width:100%;box-sizing:border-box;border:1px solid #3b3b45;border-radius:12px;background:#0f0f12;color:#fff;padding:12px;resize:vertical}.chat-media-ai-tools small{color:#aaa}.chat-media-editor-actions{justify-content:flex-end;margin-top:12px}.chat-media-editor-actions button:last-child{background:#6657f5}
@media(max-width:800px){.chat-media-zoom-controls{margin:6px 0 2px}.chat-media-toolbar{min-height:60px;padding-bottom:max(8px,env(safe-area-inset-bottom))}.chat-media-reaction-picker{bottom:100px!important}.chat-media-editor{padding:8px}.chat-media-editor-card{width:100%;max-height:96dvh;border-radius:16px}.chat-media-editor-preview{min-height:240px}.chat-media-user-tools label{grid-template-columns:92px 1fr}}


/* Build 6968 — force zoom row above media actions; never overlap toolbar */
.chat-media-viewer{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) 58px 72px!important;
  height:100dvh!important;
  overflow:hidden!important;
}
.chat-media-viewer-head{grid-row:1!important}
.chat-media-viewer-stage{grid-row:2!important;min-height:0!important}
.chat-media-zoom-controls{
  grid-row:3!important;
  position:relative!important;
  inset:auto!important;
  left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  transform:none!important;
  align-self:center!important;
  justify-self:center!important;
  margin:0!important;
  z-index:7!important;
}
.chat-media-toolbar{
  grid-row:4!important;
  position:relative!important;
  inset:auto!important;
  align-self:stretch!important;
  width:100%!important;
  min-width:0!important;
  min-height:72px!important;
  height:72px!important;
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  z-index:8!important;
}
.chat-media-toolbar button{flex:0 0 auto!important}
.chat-media-viewer-stage img{max-height:100%!important}
@media(max-width:800px){
  .chat-media-viewer{grid-template-rows:auto minmax(0,1fr) 56px 68px!important}
  .chat-media-toolbar{height:68px!important;min-height:68px!important;justify-content:flex-start!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
  .chat-media-zoom-controls{height:auto!important}
}


/* Build 6969 — structural media footer: zoom and actions are stacked, never overlapping */
.chat-media-viewer{
  grid-template-rows:auto minmax(0,1fr) auto!important;
}
.chat-media-viewer-head{grid-row:1!important}
.chat-media-viewer-stage{grid-row:2!important;min-height:0!important}
.chat-media-footer{
  grid-row:3!important;
  display:flex!important;
  flex-direction:column!important;
  flex:0 0 auto!important;
  width:100%!important;
  min-width:0!important;
  position:relative!important;
  z-index:20!important;
  background:#171719!important;
  border-top:1px solid rgba(255,255,255,.10)!important;
  overflow:visible!important;
}
.chat-media-footer .chat-media-zoom-controls{
  order:1!important;
  position:static!important;
  inset:auto!important;
  transform:none!important;
  align-self:center!important;
  margin:7px 0 5px!important;
  min-height:46px!important;
  height:46px!important;
  flex:0 0 46px!important;
  z-index:1!important;
}
.chat-media-footer .chat-media-toolbar{
  order:2!important;
  position:static!important;
  inset:auto!important;
  transform:none!important;
  width:100%!important;
  height:66px!important;
  min-height:66px!important;
  flex:0 0 66px!important;
  margin:0!important;
  padding:5px 10px max(7px,env(safe-area-inset-bottom))!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin;
  z-index:1!important;
}
.chat-media-footer .chat-media-toolbar button{flex:0 0 auto!important}
.chat-media-viewer-stage img{max-height:100%!important}
@media(max-width:800px){
  .chat-media-footer .chat-media-toolbar{justify-content:flex-start!important}
  .chat-media-footer .chat-media-zoom-controls{margin:5px 0 3px!important}
}

/* Build 6970 — remove visible + / 100% / - zoom controls. Pinch, wheel, double-click and drag zoom remain active. */
.chat-media-footer .chat-media-zoom-controls,
.chat-media-zoom-controls{
  display:none!important;
}

/* Build 6973 — pointer-focused image zoom; cursor point stays under the mouse while zooming. */


/* Build 6976 — exact original-photo fit before zoom. Never crop at 100%. */
.chat-media-viewer-stage{padding:12px!important;box-sizing:border-box!important;place-items:center!important;overflow:hidden!important;background:#111!important}
.chat-media-viewer-stage #chatMediaViewerImage{
  display:block!important;
  width:auto;
  height:auto;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center center!important;
  transform-origin:50% 50%!important;
  margin:auto!important;
}


/* Build 6977 — simple full-photo viewer: whole image visible first, centred, then centre zoom. */
.chat-media-viewer-stage{
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  padding:18px 24px!important;
  box-sizing:border-box!important;
}
.chat-media-viewer-stage #chatMediaViewerImage{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:82%!important;
  max-height:82%!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:auto!important;
  transform-origin:50% 50%!important;
}
@media(max-width:800px){
  .chat-media-viewer-stage #chatMediaViewerImage{max-width:94%!important;max-height:88%!important;}
}


/* Build 6978 — verified media viewer fit and center zoom. */
.chat-media-viewer{
  grid-template-rows:auto minmax(0,1fr) auto!important;
  width:100vw!important;
  height:100dvh!important;
  overflow:hidden!important;
}
.chat-media-viewer-stage{
  grid-row:2!important;
  min-width:0!important;
  min-height:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  padding:16px 24px!important;
  box-sizing:border-box!important;
  background:#111!important;
}
.chat-media-viewer-stage #chatMediaViewerImage{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:calc(100vw - 48px)!important;
  max-height:calc(100dvh - 190px)!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:0!important;
  transform-origin:center center!important;
  flex:0 0 auto!important;
}
@media(max-width:800px){
  .chat-media-viewer-stage{padding:10px 12px!important}
  .chat-media-viewer-stage #chatMediaViewerImage{
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - 176px)!important;
  }
}

/* Build 6979 — image dimensions are calculated from the real photo and stage. */
.chat-media-viewer-stage{display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;}
.chat-media-viewer-stage #chatMediaViewerImage{display:block!important;object-fit:contain!important;object-position:center center!important;margin:0!important;flex:none!important;transform-origin:50% 50%!important;}

/* Build 6981 — authoritative original-photo viewer. Full image first, centered; zoom only after user input. */
.chat-media-viewer-stage{position:relative!important;overflow:hidden!important;padding:0!important;min-width:0!important;min-height:0!important;background:#111!important}
.chat-media-viewer-stage #chatMediaViewerImage{position:absolute!important;left:50%!important;top:50%!important;display:block!important;max-width:none!important;max-height:none!important;object-fit:contain!important;object-position:center center!important;margin:0!important;flex:none!important;transform-origin:50% 50%!important;user-select:none!important;-webkit-user-drag:none!important}

/* Build 6981 — clean reset viewer: full original photo first; no sizing JS. */
.chat-media-viewer-stage{
  position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;
  overflow:hidden!important;padding:12px!important;box-sizing:border-box!important;background:#111!important;min-width:0!important;min-height:0!important;
}
.chat-media-viewer-stage #chatMediaViewerImage{
  position:static!important;left:auto!important;top:auto!important;display:block!important;
  width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;
  object-fit:contain!important;object-position:center center!important;margin:0!important;
  transform:translate3d(0,0,0) scale(1);transform-origin:50% 50%!important;
  user-select:none!important;-webkit-user-drag:none!important;
}

/* Build 6985 — canvas-based media viewer. This bypasses all legacy image sizing rules. */
.chat-media-viewer-stage{position:relative!important;overflow:hidden!important;padding:0!important;background:#111!important;}
#chatMediaViewerImage{display:none!important;}
#chatMediaViewerCanvas{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;touch-action:none!important;}
#chatMediaViewerCanvas.hidden{display:none!important;}

/* BUILD 6985: reactions stay attached to their original message */
.message-reactions{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px;max-width:100%}
.msg.own .message-reactions,.group-message-bubble.own .message-reactions{justify-content:flex-end}
.message-reaction-chip{border:1px solid rgba(100,116,139,.22);background:#fff;border-radius:999px;padding:2px 7px;min-height:25px;display:inline-flex;align-items:center;gap:3px;font-size:15px;line-height:1;cursor:pointer;box-shadow:0 1px 2px rgba(15,23,42,.06)}
.message-reaction-chip b{font-size:11px;color:#475569;font-weight:700}.message-reaction-chip.reacted{outline:2px solid rgba(59,130,246,.25);background:#eff6ff}


/* BUILD 7062 — Android private-chat composer visibility and safe mobile placement. */
@media(max-width:800px){
  .workspace-chat > .composer,
  html[data-composer="essential"] .workspace-chat > .composer{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    position:absolute!important;
    left:7px!important;
    right:7px!important;
    bottom:7px!important;
    z-index:80!important;
    min-height:54px!important;
    margin:0!important;
    padding:5px 6px!important;
    grid-template-columns:40px 40px minmax(0,1fr) 44px!important;
    grid-template-areas:"attach camera entry action"!important;
    align-items:center!important;
    gap:3px!important;
    border:0!important;
    border-radius:28px!important;
    background:#fff!important;
    box-shadow:0 2px 8px rgba(11,20,26,.20)!important;
  }
  .workspace-chat > .composer #emojiBtn,
  .workspace-chat > .composer #composerAiBtn{display:none!important}
  .workspace-chat > .composer #attachBtn{grid-area:attach!important;display:grid!important}
  .workspace-chat > .composer #cameraBtn{grid-area:camera!important;display:grid!important}
  .workspace-chat > .composer .message-entry{grid-area:entry!important;display:block!important;min-width:0!important}
  .workspace-chat > .composer #recordBtn,
  .workspace-chat > .composer #sendBtn{grid-area:action!important}
  .workspace-chat > .composer:not(.has-text) #recordBtn{display:grid!important}
  .workspace-chat > .composer:not(.has-text) #sendBtn{display:none!important}
  .workspace-chat > .composer.has-text #recordBtn{display:none!important}
  .workspace-chat > .composer.has-text #sendBtn{display:grid!important}
  .workspace-chat > .composer textarea{display:block!important;visibility:visible!important;width:100%!important;min-height:30px!important;max-height:88px!important}
  .workspace-chat > .messages{padding-bottom:108px!important;scroll-padding-bottom:116px!important}
  .workspace-chat > .composer > #voiceRecordPanel{grid-column:1/-1!important;grid-row:1!important}
}


/* BUILD 7063 — keep Android private-chat composer above the fixed mobile navigation.
   BUILD 7062 correctly forced the composer visible, but bottom:7px placed it behind
   the fixed 68px mobile rail. This rule anchors it above that rail. */
@media(max-width:800px){
  .workspace-chat > .composer,
  html[data-composer="essential"] .workspace-chat > .composer{
    bottom:calc(var(--mobile-nav-height,68px) + env(safe-area-inset-bottom) + 8px)!important;
  }
  .workspace-chat > .messages{
    padding-bottom:calc(var(--mobile-nav-height,68px) + env(safe-area-inset-bottom) + 112px)!important;
    scroll-padding-bottom:calc(var(--mobile-nav-height,68px) + env(safe-area-inset-bottom) + 120px)!important;
  }
}


/* BUILD 7064 — Android private-chat composer hard-anchor above mobile bottom navigation.
   Use viewport-fixed placement so later workspace sizing/overflow rules cannot push the
   composer underneath the task bar. Keep the task bar above it and reserve feed space. */
@media(max-width:800px){
  body.app-open .workspace-chat > .composer,
  body.app-open html[data-composer="essential"] .workspace-chat > .composer,
  .workspace-chat > .composer,
  html[data-composer="essential"] .workspace-chat > .composer{
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    width:auto!important;
    bottom:calc(var(--shufy-mobile-bottom-h,68px) + env(safe-area-inset-bottom) + 12px)!important;
    z-index:125!important;
    margin:0!important;
    transform:none!important;
    -webkit-transform:none!important;
  }
  body.app-open .workspace-chat > .messages,
  body.app-open .workspace-chat > #messages,
  .workspace-chat > .messages,
  .workspace-chat > #messages{
    padding-bottom:calc(var(--shufy-mobile-bottom-h,68px) + env(safe-area-inset-bottom) + 118px)!important;
    scroll-padding-bottom:calc(var(--shufy-mobile-bottom-h,68px) + env(safe-area-inset-bottom) + 126px)!important;
  }
  .rail{z-index:130!important;}
}

/* BUILD 7065 — compact Android private-chat composer. */
@media (max-width:800px){
  .workspace-chat > .composer,
  html[data-composer="essential"] .workspace-chat > .composer{
    min-height:60px!important;
    height:auto!important;
    max-height:76px!important;
    padding:7px 10px!important;
    gap:6px!important;
    border-radius:22px!important;
    align-items:center!important;
    grid-auto-rows:min-content!important;
  }
  .workspace-chat > .composer .message-entry{
    min-height:44px!important;
    height:44px!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
  }
  .workspace-chat > .composer #messageInput{
    min-height:44px!important;
    height:44px!important;
    max-height:88px!important;
    padding:10px 4px!important;
    line-height:24px!important;
    resize:none!important;
  }
  .workspace-chat > .composer .composer-hint{display:none!important}
  .workspace-chat > .composer .circle-btn,
  .workspace-chat > .composer .send-btn,
  .workspace-chat > .composer #attachBtn,
  .workspace-chat > .composer #cameraBtn,
  .workspace-chat > .composer #emojiBtn,
  .workspace-chat > .composer #recordBtn{
    width:44px!important;min-width:44px!important;
    height:44px!important;min-height:44px!important;
    margin:0!important;
  }
  .workspace-chat > .messages{padding-bottom:154px!important}
}

/* BUILD 7068 — FINAL Android private/group composer parity.
   This file loads after style.css, so this block intentionally owns the final mobile
   private-chat composer geometry. Values mirror the live .whatsapp-group-composer. */
@media(max-width:800px){
  body.app-open .workspace-chat > .composer,
  .workspace-chat > .composer,
  html[data-composer="essential"] .workspace-chat > .composer{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    position:fixed!important;

    /* Same location as group composer: directly above fixed bottom navigation. */
    left:0!important;
    right:0!important;
    width:100%!important;
    bottom:calc(var(--shufy-mobile-bottom-h,68px) + env(safe-area-inset-bottom))!important;

    /* Same compact group-composer row geometry. */
    min-height:48px!important;
    height:48px!important;
    max-height:48px!important;
    margin:0!important;
    padding:6px 6px!important;
    gap:2px!important;
    grid-template-columns:32px 32px 32px minmax(120px,1fr) 40px!important;
    grid-template-areas:"emoji attach camera entry action"!important;
    align-items:center!important;
    grid-auto-rows:48px!important;

    border:0!important;
    border-top:1px solid #d8dee3!important;
    border-radius:0!important;
    background:#f0f2f5!important;
    box-shadow:none!important;
    transform:none!important;
    -webkit-transform:none!important;
    z-index:125!important;
    overflow:visible!important;
  }

  /* Same three left controls as group chat. */
  .workspace-chat > .composer #emojiBtn{
    grid-area:emoji!important;
    display:grid!important;
  }
  .workspace-chat > .composer #attachBtn{
    grid-area:attach!important;
    display:grid!important;
  }
  .workspace-chat > .composer #cameraBtn{
    grid-area:camera!important;
    display:grid!important;
  }

  .workspace-chat > .composer #emojiBtn,
  .workspace-chat > .composer #attachBtn,
  .workspace-chat > .composer #cameraBtn{
    width:32px!important;
    min-width:32px!important;
    height:36px!important;
    min-height:36px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:transparent!important;
    box-shadow:none!important;
    font-size:17px!important;
  }

  /* Same 36px group input. */
  .workspace-chat > .composer .message-entry{
    grid-area:entry!important;
    position:relative!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    min-height:36px!important;
    height:36px!important;
    padding:0!important;
    margin:0!important;
  }
  .workspace-chat > .composer #messageInput{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    min-height:36px!important;
    height:36px!important;
    max-height:36px!important;
    margin:0!important;
    padding:6px 40px 6px 12px!important;
    border:0!important;
    border-radius:999px!important;
    outline:0!important;
    background:#fff!important;
    line-height:24px!important;
    resize:none!important;
    overflow:hidden!important;
  }
  .workspace-chat > .composer .composer-hint,
  .workspace-chat > .composer #composerAiBtn{
    display:none!important;
  }

  /* Same group behavior: mic overlays right side of input; send occupies final column. */
  .workspace-chat > .composer #recordBtn{
    grid-area:unset!important;
    display:grid!important;
    position:absolute!important;
    right:49px!important;
    top:6px!important;
    z-index:3!important;
    width:34px!important;
    min-width:34px!important;
    height:36px!important;
    min-height:36px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  .workspace-chat > .composer #sendBtn{
    grid-area:action!important;
    grid-column:5!important;
    position:relative!important;
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0!important;
    border-radius:50%!important;
    box-shadow:none!important;
  }

  .workspace-chat > .composer:not(.has-text) #recordBtn{display:grid!important}
  .workspace-chat > .composer:not(.has-text) #sendBtn{display:none!important}
  .workspace-chat > .composer.has-text #recordBtn{display:none!important}
  .workspace-chat > .composer.has-text #sendBtn{display:grid!important}

  .workspace-chat > .composer > #voiceRecordPanel{
    grid-column:1/-1!important;
  }
  .workspace-chat > .composer .pending-attachment-tray{
    bottom:calc(100% + 6px)!important;
  }

  /* Reserve exactly enough room for composer + mobile nav. */
  body.app-open .workspace-chat > .messages,
  body.app-open .workspace-chat > #messages,
  .workspace-chat > .messages,
  .workspace-chat > #messages{
    padding-bottom:calc(var(--shufy-mobile-bottom-h,68px) + env(safe-area-inset-bottom) + 56px)!important;
    scroll-padding-bottom:calc(var(--shufy-mobile-bottom-h,68px) + env(safe-area-inset-bottom) + 60px)!important;
  }

  .rail{z-index:130!important}
}
