/* HANA minimal mobile install text and compact memo windows.
 * Mobile-only presentation; original install/notes events and PC layout remain unchanged.
 */
@media screen and (max-width:980px) {
  #hanaAppInstallButton.hana-mobile-install-inline {
    position:static!important;
    inset:auto!important;
    top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
    transform:none!important;
    height:auto!important;
    min-height:30px!important;
    width:auto!important;min-width:0!important;max-width:none!important;
    margin:0!important;padding:5px 8px!important;
    border:0!important;border-radius:5px!important;
    box-shadow:none!important;
    background:transparent!important;
    color:#75889a!important;
    font:550 12px/1.4 system-ui,"Malgun Gothic",sans-serif!important;
    white-space:nowrap!important;
    text-decoration:none!important;
    opacity:.9!important;
    cursor:pointer!important;
    z-index:auto!important;
    flex:none!important;
  }
  #hanaAppInstallButton.hana-mobile-install-inline[hidden] {
    display:none!important;
  }
  #hanaAppInstallButton.hana-mobile-install-inline:focus-visible {
    outline:2px solid #7898b5!important;
    outline-offset:1px!important;
  }
  #officeSidebar .sidebar-main #hanaAppInstallButton.hana-mobile-install-inline{
    display:inline-flex;
    width:100%!important;
    max-width:100%!important;
    min-height:38px!important;
    align-items:center!important;
    justify-content:flex-start!important;
    text-align:left!important;
    padding:8px 13px!important;
    font-size:13px!important;
    font-weight:500!important;
    border-radius:7px!important;
    color:#677b8f!important;
  }
  #officeSidebar .sidebar-main #hanaAppInstallButton.hana-mobile-install-inline[hidden] {
    display:none!important;
  }
  .public-app .public-quick-filters:has(#hanaAppInstallButton.hana-mobile-install-inline:not([hidden])) > #public-property-type-filter,
  .public-app .public-quick-filters:has(#hanaAppInstallButton.hana-mobile-install-inline:not([hidden])) > #public-trade-filter {
    box-sizing:border-box!important;
    flex:0 0 calc((100% - 38px)/2)!important;
    width:calc((100% - 38px)/2)!important;
    max-width:none!important;
    min-width:0!important;
  }
  .public-app .public-quick-filters #hanaAppInstallButton.hana-mobile-install-inline {
    display:inline-flex;
    flex:0 0 auto!important;
    align-items:center!important;
    justify-content:center!important;
    align-self:center!important;
    height:34px!important;
    min-height:34px!important;
    padding:3px 7px!important;
    color:#8a969f!important;
    font-size:12px!important;
    font-weight:500!important;
  }
  .public-app .public-quick-filters #hanaAppInstallButton.hana-mobile-install-inline[hidden]{
    display:none!important;
  }

  /* Standard notes drawer: leave space to tap the dark backdrop for closing. */
  html body.quick-notes-drawer-visible #quickNotesView:not([hidden]) {
    width:min(80vw,342px)!important;
    max-width:min(80vw,342px)!important;
    min-width:0!important;
    padding:calc(12px + env(safe-area-inset-top,0px)) 11px calc(70px + env(safe-area-inset-bottom,0px))!important;
  }
  html body.quick-notes-drawer-visible #quickNotesView .quick-notes-head {
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    justify-content:space-between!important;
    gap:5px!important;
    position:sticky!important;
    top:calc(-12px - env(safe-area-inset-top,0px))!important;
    z-index:4!important;
    box-sizing:border-box!important;
    margin:0 0 10px!important;
    padding:8px 0!important;
    background:#f6f8fb!important;
  }
  html body.quick-notes-drawer-visible #quickNotesView .quick-notes-head .quick-notes-mobile-home {
    display:inline-flex!important;
    flex:0 1 auto!important;
    align-items:center!important;
    min-width:0!important;
    min-height:34px!important;
    margin:0!important;
    padding:5px 3px!important;
    font-size:12px!important;
    white-space:nowrap!important;
  }
  html body.quick-notes-drawer-visible #quickNotesView .quick-notes-head h1 {
    flex:0 1 auto!important;
    min-width:0!important;
    margin:0!important;
    font-size:15px!important;
    white-space:nowrap!important;
  }
  html body.quick-notes-drawer-visible #quickNotesView #hanaCompactMemoClose {
    display:inline-flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:54px!important;
    min-height:35px!important;
    margin:0 0 0 auto!important;
    padding:5px 7px!important;
    border:1px solid #d8e0e8!important;
    border-radius:8px!important;
    background:#fff!important;
    color:#405c74!important;
    font-size:12px!important;
    font-weight:650!important;
    cursor:pointer!important;
  }
  /* Memo editor: smaller centered modal and writing area with scrolling retained. */
  html body.quick-notes-drawer-visible #quickNotesView.quick-notes-composing .quick-notes-editor {
    position:fixed!important;
    inset:50% auto auto 50%!important;
    transform:translate(-50%,-50%)!important;
    width:min(312px,calc(80vw - 22px))!important;
    min-width:0!important;
    max-width:calc(80vw - 22px)!important;
    height:auto!important;
    max-height:min(70dvh,570px)!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    padding:0 11px 10px!important;
    border:1px solid #d9e3ed!important;
    border-radius:14px!important;
    gap:9px!important;
  }
  html body.quick-notes-drawer-visible #quickNotesView.quick-notes-composing .quick-notes-editor > textarea {
    box-sizing:border-box!important;
    height:125px!important;
    min-height:110px!important;
    max-height:25dvh!important;
    resize:vertical!important;
    overflow:auto!important;
    line-height:1.5!important;
  }
  html body.quick-notes-drawer-visible #quickNotesView.quick-notes-composing .quick-notes-mobile-editor-head{
    display:flex!important;
    align-items:center!important;
    position:sticky!important;
    top:0!important;
    z-index:3!important;
    min-height:44px!important;
    margin:0 -11px!important;
    padding:6px 11px!important;
    background:#fff!important;
  }
  html body.quick-notes-drawer-visible #quickNotesView.quick-notes-composing .quick-notes-editor-actions {
    position:sticky!important;
    bottom:-10px!important;
    margin:0 -11px -10px!important;
    padding:9px 11px 10px!important;
    background:#fff!important;
  }

  /* Original quick memo entry on the right tool strip. Keep every button and input. */
  html body.hana-mobile-quick-tools-ready #hanaQuickMemoPanel:not([hidden]) {
    position:fixed!important;
    left:max(10px,env(safe-area-inset-left,0px))!important;
    right:auto!important;
    top:auto!important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
    transform:none!important;
    box-sizing:border-box!important;
    width:min(330px,calc(100vw - 74px))!important;
    min-width:0!important;
    max-width:calc(100vw - 74px)!important;
    max-height:min(58dvh,480px)!important;
    overflow-y:auto!important;
    padding:13px 12px!important;
    border-radius:15px!important;
  }
  html body.hana-mobile-quick-tools-ready #hanaQuickMemoPanel:not([hidden]) #hanaQuickMemoText {
    box-sizing:border-box!important;
    width:100%!important;
    min-height:96px!important;
    height:112px!important;
    max-height:23dvh!important;
    resize:vertical!important;
    overflow:auto!important;
    font-size:16px!important;
  }
  html body.hana-mobile-quick-tools-ready.hana-mobile-keyboard #hanaQuickMemoPanel:not([hidden]) {
    max-height:45dvh!important;
  }
}
@media screen and (min-width:981px){
  #hanaCompactMemoClose {display:none!important;}
}
