/* Owner 2026-10-26 — restore mobile-grade multiline composer in Desktop Site.
   Higher priority than unified-workspace and dock polish. Native mobile <=890px untouched.
   HTML hidden attributes are respected: entitlement / service gates remain authoritative. */
@media (min-width:891px) {
  body.service-os .service-main > #service-shell.service-shell {
    --unified-bottom-h:174px;
  }
  body.service-os #service-shell #stage-2 > .agent-composer {
    flex:0 0 var(--unified-bottom-h)!important;
    height:var(--unified-bottom-h)!important;
    min-height:var(--unified-bottom-h)!important;
    max-height:var(--unified-bottom-h)!important;
    padding:10px 12px 8px!important;
    display:flex!important;
    flex-direction:column!important;
    gap:4px!important;
    overflow:visible!important;
    position:relative!important;
  }
  body.service-os #service-shell #stage-2 > .agent-composer #visitor-message {
    display:block!important;
    flex:0 0 98px!important;
    width:100%!important;
    min-width:0!important;
    height:98px!important;
    min-height:98px!important;
    max-height:98px!important;
    padding:12px 14px!important;
    font-size:16px!important;
    line-height:1.55!important;
    border:2px solid var(--dock-card-ring)!important;
    border-radius:13px!important;
    box-sizing:border-box!important;
    resize:none!important;
    overflow-y:auto!important;
    direction:auto;
    text-align:start!important;
    unicode-bidi:plaintext!important;
    caret-color:var(--dock-text)!important;
    -webkit-text-size-adjust:100%;
    touch-action:pan-y;
  }
  body.service-os #service-shell #stage-2 > .agent-composer #visitor-message::placeholder {
    color:var(--dock-placeholder)!important;
    opacity:1!important;
  }
  body.service-os #service-shell #stage-2 > .agent-composer .composer-bottom {
    display:flex!important;
    flex:0 0 42px!important;
    width:100%!important;
    min-width:0!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    margin-top:1px!important;
    padding:1px!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    overflow:visible!important;
    flex-wrap:nowrap!important;
    border:0!important;
  }
  body.service-os #service-shell #stage-2 > .agent-composer .composer-tools {
    display:flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:6px!important;
    min-width:0!important;
    width:auto!important;
    max-width:none!important;
    overflow:visible!important;
    flex-wrap:nowrap!important;
  }
  body.service-os #service-shell #stage-2 > .agent-composer .composer-tool:not([hidden]){
    display:grid!important;
    flex:0 0 36px!important;
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    place-items:center!important;
    visibility:visible!important;
    opacity:1!important;
  }
  /* Mirror the already-verified native mobile rail. The runtime historically
     marks tools hidden even when mobile CSS renders all four accessible actions.
     Keep the exact same existing actions/handlers, without inventing new ones. */
  body.service-os #service-shell #stage-2 > .agent-composer .composer-tool[hidden] {
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    flex:0 0 36px!important;
  }
  body.service-os #service-shell #stage-2 > .agent-composer #chat-status{
    flex:1 1 auto!important;
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  body.service-os #service-shell #stage-2 > .agent-composer #visitor-send{
    margin-inline-start:auto!important;
    flex:0 0 40px!important;
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    position:relative!important;
    z-index:2!important;
  }
  body.service-os #service-shell .service-project-pane > .service-project-new,
  body.service-os #service-shell > .service-catalog > .desktop-service-pane-footer {
    height:var(--unified-bottom-h)!important;
    min-height:var(--unified-bottom-h)!important;
    max-height:var(--unified-bottom-h)!important;
    flex:0 0 var(--unified-bottom-h)!important;
  }
}
/* The coarse-pointer Desktop Site uses a wide layout viewport inside a small
   physical display. Compute pre-focus device-correct font sizing in existing
   keyboard viewport module, rather than disabling pinch zoom. */
@media (min-width:891px) and (pointer:coarse) {
  body.service-os .service-main > #service-shell.service-shell {
    --unified-bottom-h:216px;
  }
  body.service-os #service-shell #stage-2 > .agent-composer {
    padding:11px 12px 9px!important;
  }
  body.service-os #service-shell #stage-2 > .agent-composer #visitor-message,
  body.service-os #service-shell #stage-2 > .agent-composer #visitor-message:focus {
    flex:0 0 140px!important;
    height:140px!important;
    min-height:140px!important;
    max-height:140px!important;
    font-size:var(--hihiro-chat-touch-font,20px)!important;
    line-height:1.3!important;
    -webkit-text-size-adjust:100%;
  }
  body.service-os #service-shell #stage-2 > .agent-composer .composer-bottom {
    flex:0 0 44px!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
  }
  /* Keyboard detection is installed once by chat-keyboard-viewport.js.
     Let the application viewport resize, not a browser-wide scaling transform. */
  html.hihiro-chat-keyboard-open body.service-os #service-shell #stage-2 > .agent-composer {
    scroll-margin:0!important;
    transform:none!important;
  }
}
