/* CHAT FRAME (CC-ASK-4977; Shawn, 11-26): the look half of brand/chat-frame.js. Phone only. Reads --cf-h / --cf-top (the visible area, set by the script) and nothing else new.
   Pinch and double-tap are off INSIDE a chat (touch-action:pan-y) and nowhere else; content pages stay zoomable (docs/standards/screen-lock.md). */
@media (max-width:860px){
  #askPageChat,.ask-panel,[data-chat-frame]{touch-action:pan-y}
  #askPageChat .ask-log,.ask-panel .ask-log,[data-chat-frame] .ask-log{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  #askPageChat .cf-head{display:none}
  html.ar-cf{overflow:hidden;overscroll-behavior:none}
  html.ar-cf #askPageChat,html.ar-cf .ask-panel,html.ar-cf [data-chat-frame]{
    position:fixed;left:0;right:0;top:var(--cf-top,0px);bottom:auto;width:auto;max-width:none;height:var(--cf-h,100dvh);max-height:none;min-height:0;
    margin:0;border:0;border-radius:0;box-shadow:none;z-index:10000;box-sizing:border-box}
  html.ar-cf #askPageChat .cf-head{display:flex;padding-top:calc(12px + env(safe-area-inset-top,0px))}
  html.ar-cf .ask-panel .ask-head{padding-top:calc(12px + env(safe-area-inset-top,0px))}
  html.ar-cf #askPageChat .ask-log,html.ar-cf .ask-panel .ask-log{flex:1;min-height:0}
  /* the composer rests on the keys; with the keys down it clears the home indicator */
  html.ar-cf:not(.ar-cf-keys) #askPageChat .ask-fine,html.ar-cf:not(.ar-cf-keys) .ask-panel .ask-fine{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
  html.ar-cf #rwBugBtn,html.ar-cf .ask-dock,html.ar-cf .sponsor-bar-slot{display:none !important}
  /* admin chat pages (app/admin/chat.html): already a whole screen, so only the size and the stillness */
  body[data-chat-page]{position:fixed;left:0;right:0;top:0;overflow:hidden;touch-action:pan-y}
  body[data-chat-page] .ch{height:calc(var(--cf-h,100dvh) - var(--vaband,0px));transform:translateY(var(--cf-top,0px))}
  body[data-chat-page] .ch-thread{overscroll-behavior:contain}
}
